@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Space+Grotesk:wght@300;400;500;600;700&family=Fira+Code:wght@300;400;500;600&display=swap');

:root {
    /* New Color Palette */
    --true-blue: #0466c8;
    --yellow-gold: #fffc31;
    --ivory: #f6f7eb;
    --cinnabar: #e94f37;
    --chamoisee: #a38560;
    
    /* Derived colors for better design */
    --dark-blue: #033f8a;
    --light-blue: #4d9de0;
    --warm-yellow: #f7c52d;
    --soft-ivory: #f8faff;
    --muted-ivory: #e8eadd;
    --dark-chamoisee: #8a6f47;
    --desktop-blue: #1a2b4c;
}

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

body {
    font-family: 'Space Grotesk', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-blue);
    background-color: var(--desktop-blue);
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 20px 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    box-sizing: border-box;
}

.paper-container {
    background-color: var(--soft-ivory);
    max-width: 800px;
    min-height: calc(100vh - 4rem);
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}


.container {
    max-width: 100%;
    margin: 0;
    padding: 0 2rem;
}

/* Header */
header {
    background: var(--true-blue);
    color: var(--ivory);
    padding: 0.75rem 0;
    width: 100%;
    border-bottom: 1px solid var(--yellow-gold);
    flex-shrink: 0;
}

.nav-container {
    max-width: 100%;
    margin: 0;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--yellow-gold);
    letter-spacing: -0.5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo::after {
    content: '';
    width: 32px;
    height: 32px;
    background-image: url('../images/guy_64_white.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Homepage uses yellow sprite */
body.homepage .logo::after {
    background-image: url('../images/guy_64.png');
}

/* Ensure logo link maintains white text color on game pages */
a .logo {
    color: white;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    color: var(--ivory);
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
    letter-spacing: 0.5px;
}

.nav-menu a:hover {
    color: var(--yellow-gold);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* Hero Section (removed but keeping styles for potential use) */
.hero {
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--true-blue) 100%);
    color: var(--ivory);
    padding: 150px 0 100px;
    text-align: center;
    margin-top: 80px;
}

.hero-content h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--yellow-gold);
    letter-spacing: -1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--ivory);
}

.cta-button {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    background: var(--cinnabar);
    color: var(--ivory);
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    box-shadow: 0 3px 10px rgba(233, 79, 55, 0.3);
}

.cta-button:hover {
    background: #d4432e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 79, 55, 0.4);
}

/* Games Section */
.games-section {
    padding: 80px 0;
    background: var(--soft-ivory);
}

.games-section h2 {
    font-family: 'Space Grotesk', sans-serif;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 3rem;
    color: var(--true-blue);
    letter-spacing: -1px;
}

.games-grid {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 1rem;
}

.game-card {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    transition: background-color 0.2s ease;
    border: none;
    border-bottom: 1px solid var(--muted-ivory);
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    gap: 0.75rem;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.game-card:visited {
    color: inherit;
}

.game-card:active {
    color: inherit;
}

.game-card:hover {
    background-color: var(--muted-ivory);
}

.game-image {
    width: 280px;
    height: 60px;
    min-width: 280px;
    background: var(--muted-ivory);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-blue);
    font-size: 0.7rem;
    border-radius: 4px;
    border: 1px solid var(--chamoisee);
    text-align: center;
    overflow: hidden;
    object-fit: cover;
}

.game-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
}

.game-content-top {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.game-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--true-blue);
    letter-spacing: -0.3px;
    flex-shrink: 0;
}


.game-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--cinnabar);
    margin: 0;
    letter-spacing: -0.3px;
    flex-shrink: 0;
}


.purchase-status {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--chamoisee);
    margin: 0;
    letter-spacing: 0;
    flex-shrink: 0;
}

.game-description {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--dark-blue);
    margin: 0;
    line-height: 1.3;
    opacity: 0.8;
}


/* Game Detail Page */
.game-detail {
    padding: 120px 0 80px;
    background: var(--soft-ivory);
}

.game-detail-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.game-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.game-detail-image {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 12px;
    border: 3px solid var(--yellow-gold);
    box-shadow: 0 6px 20px rgba(4, 102, 200, 0.15);
    overflow: hidden;
}

.image-gallery {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--muted-ivory) 0%, var(--chamoisee) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-blue);
    font-weight: 600;
    display: none;
}

.gallery-image.active {
    display: flex;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    z-index: 10;
    opacity: 0.6;
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 0.5);
    color: white;
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
}

.gallery-nav.prev {
    left: 10px;
}

.gallery-nav.next {
    right: 10px;
}

.gallery-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.gallery-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.2s ease;
}

.gallery-indicator.active {
    background: var(--yellow-gold);
}

.game-detail-info h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--true-blue);
    letter-spacing: -1px;
}

.game-detail-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem;
    color: var(--cinnabar);
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
}

.game-detail-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--dark-blue);
}

.paypal-button-container {
    margin-bottom: 2rem;
}

/* Thank You Page */
.thank-you {
    padding: 120px 0 80px;
    background: var(--soft-ivory);
    text-align: center;
}

.thank-you h1 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--true-blue);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.thank-you p {
    color: var(--dark-blue);
}

.download-section {
    background: var(--ivory);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    border: 3px solid var(--yellow-gold);
    box-shadow: 0 6px 20px rgba(4, 102, 200, 0.15);
}

.download-section h2 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--true-blue);
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.download-section p {
    color: var(--dark-blue);
}

.download-link {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    background: var(--cinnabar);
    color: var(--ivory);
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    box-shadow: 0 3px 10px rgba(233, 79, 55, 0.3);
    margin-top: 1.5em;
}

.download-link:hover {
    background: #d4432e;
    box-shadow: 0 4px 12px rgba(233, 79, 55, 0.4);
}

/* Main content area */
main {
    flex: 1;
    overflow-y: auto;
}

/* Footer */
footer {
    background: var(--true-blue);
    color: var(--ivory);
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid var(--yellow-gold);
    flex-shrink: 0;
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    .paper-container {
        min-height: calc(100vh - 2rem);
        border-radius: 0;
    }
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .games-grid {
        gap: 0.5rem;
    }
    
    .game-card {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 0.75rem 0;
    }
    
    .game-image {
        width: 100%;
        height: 90px;
        min-width: auto;
        align-self: center;
    }
    
    .game-content {
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
    }
    
    
    .game-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Additional color accents */
a {
    color: var(--true-blue);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--cinnabar);
}

strong {
    color: var(--cinnabar);
    font-weight: 600;
}