:root {
    --bg-paper: #fdfbf7;
    --ink-color: #27272a;
    --blue-ink: #2563eb;
    --red-ink: #ef4444;
    --highlighter: #fef08a;
    --pencil-gray: #52525b;
    
    /* New Palette from Screenshots */
    --btn-blue: #eff6ff;
    --btn-green: #dcfce7;
    --btn-pink: #fce7f3;
    --btn-purple: #f3e8ff;
    --btn-yellow: #fef9c3;
    --btn-gold: #fbbf24;
    
    --font-hand: 'Architects Daughter', cursive;
    --font-marker: 'Permanent Marker', cursive;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-paper);
    color: var(--ink-color);
    font-family: var(--font-hand);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Effects */
.paper-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Subtle noise texture */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -2;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Graph paper grid */
    background-image: 
        linear-gradient(var(--pencil-gray) 1px, transparent 1px),
        linear-gradient(90deg, var(--pencil-gray) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(5px);
    z-index: 1000;
    border-bottom: 2px dashed rgba(0,0,0,0.1);
}

.logo-img {
    height: 60px;
    transform: rotate(-2deg);
    transition: transform 0.3s;
}

.logo-img:hover {
    transform: rotate(2deg) scale(1.05);
}

.nav-links a {
    text-decoration: none;
    color: var(--ink-color);
    font-weight: bold;
    margin-left: 2rem;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--blue-ink);
    text-decoration: underline;
    text-decoration-style: wavy;
}

.btn-nav {
    background: var(--ink-color);
    color: white !important;
    padding: 0.5rem 1.2rem;
    /* Sketchy border radius */
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    transition: transform 0.2s !important;
    border: 2px solid transparent;
}

.btn-nav:hover {
    transform: scale(1.05) rotate(1deg);
    background: white;
    color: var(--ink-color) !important;
    border: 2px solid var(--ink-color);
    text-decoration: none !important;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8%;
    padding-top: 100px; /* navbar offset */
    position: relative;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 2;
}

.hero-title {
    font-family: var(--font-marker);
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--ink-color);
    text-shadow: 4px 4px 0px rgba(0,0,0,0.1);
    transform: rotate(-1deg);
}

.hero-title .highlight {
    color: var(--blue-ink);
    position: relative;
    white-space: nowrap;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: -5px;
    width: 105%;
    height: 15px;
    background: var(--highlighter);
    z-index: -1;
    opacity: 0.7;
    transform: rotate(-1deg);
    border-radius: 20px;
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    color: var(--pencil-gray);
    font-weight: bold;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Sketch Button Style */
.sketch-btn {
    padding: 1rem 2rem;
    font-size: 1.3rem;
    font-weight: bold;
    text-decoration: none;
    border: 2px solid var(--ink-color);
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    box-shadow: 5px 5px 0px rgba(0,0,0,0.15);
    background: white;
    color: var(--ink-color);
    transform: rotate(-1deg);
}

.sketch-btn:hover {
    transform: translate(-2px, -2px) rotate(1deg);
    box-shadow: 8px 8px 0px rgba(0,0,0,0.2);
}

.sketch-btn.primary {
    background: var(--btn-gold);
}

.sketch-btn.secondary {
    background: var(--btn-blue);
}

/* Hero Visual (Game Board) */
.hero-visual {
    flex: 1.2;
    display: flex;
    justify-content: center;
    position: relative;
    perspective: 1000px;
}

.game-board-container {
    width: 100%;
    max-width: 500px;
    transform: rotate(3deg) translateY(20px);
    transition: transform 0.5s ease;
    filter: drop-shadow(15px 15px 10px rgba(0,0,0,0.2));
}

.game-board-container:hover {
    transform: rotate(0deg) scale(1.02);
}

.game-board-img {
    width: 100%;
    height: auto;
    border-radius: 5px; /* Slight rounding for paper feel */
    background: white;
    padding: 10px; /* White border effect around screenshot */
}

/* Doodles */
.doodle-decor {
    position: absolute;
    font-family: var(--font-marker);
    color: var(--pencil-gray);
    opacity: 0.6;
    pointer-events: none;
    z-index: -1;
}

.star-1 { top: -40px; right: 20px; font-size: 5rem; transform: rotate(15deg); color: var(--highlighter); opacity: 0.9; }
.arrow-1 { bottom: 20px; left: -20px; font-size: 6rem; transform: rotate(-45deg); color: var(--red-ink); }
.scribble-1 { 
    top: 50%; left: -50px; 
    width: 100px; height: 100px; 
    border: 2px dashed var(--blue-ink); 
    border-radius: 50%;
    transform: rotate(-10deg);
}

/* Game Modes Section (Menu Style) */
.game-modes {
    padding: 6rem 10%;
    background: transparent;
    position: relative;
}

.mode-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.mode-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    border: 2px solid var(--ink-color);
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 6px 6px 0px rgba(0,0,0,0.15);
    transition: transform 0.2s;
    cursor: default;
    transform: rotate(-0.5deg);
}

.mode-card:hover {
    transform: scale(1.02) rotate(0.5deg);
}

.mode-card i {
    font-size: 1.5rem;
    opacity: 0.7;
}

.mode-ai { background: var(--btn-blue); }
.mode-duel { background: var(--btn-green); }
.mode-adventure { background: var(--btn-pink); }
.mode-online { background: var(--btn-purple); }
.mode-rankings { background: var(--btn-yellow); transform: rotate(1deg); width: 48%; display: inline-flex; }
.mode-settings { background: white; transform: rotate(-1deg); width: 48%; display: inline-flex; }

.bottom-row {
    display: flex;
    justify-content: space-between;
}

.premium-banner {
    background: var(--btn-gold);
    padding: 1.5rem;
    border: 2px solid var(--ink-color);
    border-radius: 15px; /* More regular for the banner */
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 6px 6px 0px rgba(0,0,0,0.15);
    transform: rotate(-1deg);
}

.premium-content h3 {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.premium-content p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Features Section */
.features {
    padding: 6rem 10%;
    background: white;
    border-top: 3px solid var(--ink-color);
    border-bottom: 3px solid var(--ink-color);
    position: relative;
    clip-path: polygon(0 2%, 100% 0, 100% 98%, 0 100%);
}

.section-title {
    text-align: center;
    font-family: var(--font-marker);
    font-size: 3.5rem;
    margin-bottom: 4rem;
    color: var(--ink-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.feature-card {
    text-align: center;
    padding: 2.5rem;
    background: var(--bg-paper);
    border: 2px solid var(--ink-color);
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    box-shadow: 8px 8px 0px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px) rotate(1deg);
}

.icon-circle {
    width: 80px;
    height: 80px;
    background: var(--btn-blue);
    color: var(--ink-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    border: 2px solid var(--ink-color);
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
}

.feature-card:nth-child(2) .icon-circle { background: var(--btn-pink); }
.feature-card:nth-child(3) .icon-circle { background: var(--btn-green); }
.feature-card:nth-child(4) .icon-circle { background: var(--btn-yellow); }

.feature-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

/* Showcase Section */
.showcase {
    background: var(--ink-color);
    color: white;
    padding: 8rem 10%;
    text-align: center;
    position: relative;
    /* Dot pattern */
    background-image: radial-gradient(#3f3f46 2px, transparent 2px);
    background-size: 30px 30px;
}

.showcase .section-title {
    color: white;
    border-bottom: 2px solid white;
    display: inline-block;
}

.stats-container {
    display: flex;
    justify-content: center;
    gap: 5rem;
    flex-wrap: wrap;
    margin-top: 4rem;
}

.stat-item .count {
    font-family: var(--font-marker);
    font-size: 5rem;
    color: var(--btn-gold);
    line-height: 1;
    text-shadow: 3px 3px 0px rgba(0,0,0,0.5);
}

.stat-item .label {
    font-size: 1.3rem;
    opacity: 0.9;
    letter-spacing: 1px;
}

/* Download Section */
.download-section {
    padding: 6rem 10%;
    text-align: center;
    background: var(--bg-paper);
}

.download-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border: 3px solid var(--ink-color);
    padding: 4rem;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    transform: rotate(1deg);
    box-shadow: 10px 10px 0px rgba(0,0,0,0.1);
}

.store-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--ink-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s;
    font-family: sans-serif;
    box-shadow: 5px 5px 0px rgba(0,0,0,0.2);
}

.store-btn:hover {
    transform: scale(1.05);
    background: black;
}

/* Footer */
footer {
    background: #e4e4e7;
    padding: 3rem 10%;
    text-align: center;
    border-top: 2px solid var(--ink-color);
}

.footer-logo {
    font-family: var(--font-marker);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--ink-color);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 100px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual {
        margin-top: 3rem;
        width: 100%;
    }
    
    .game-board-container {
        transform: rotate(2deg);
        max-width: 90%;
    }

    .nav-links {
        display: none; 
    }
    
    .mode-card {
        padding: 1rem;
        font-size: 1.2rem;
    }
    
    .stats-container {
        gap: 2rem;
    }
}
