/* =====================================================
   SNACKANARCHY - IMMERSIVE 2D WEBSITE
   Design ultra-stylé avec monde 2D animé
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&family=Russo+One&display=swap');

:root {
    /* Palette du jeu */
    --tacos-primary: #FF6B35;
    --tacos-secondary: #FFD93D;
    --tacos-bg: #E8A87C;
    
    --kebab-primary: #4A90D9;
    --kebab-secondary: #45B7AA;
    --kebab-bg: #2C5F6E;
    
    --street-color: #4A4A5C;
    --sidewalk-color: #8B8B9B;
    
    --bg-dark: #1a1a2e;
    --bg-darker: #0f0f1a;
    --text-light: #ffffff;
    --text-gold: #FFD700;
    --danger: #FF3333;
    --success: #33FF57;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'VT323', monospace;
    background: var(--bg-darker);
    color: var(--text-light);
    overflow-x: hidden;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32"><text y="24" font-size="24">🌮</text></svg>'), auto;
}

/* =====================================================
   SCENE 2D - LE MONDE DU JEU (Fixed Background)
   ===================================================== */

.game-world {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
}

/* Ciel */
.sky {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(
        180deg,
        #1a1a3e 0%,
        #2d1b4e 30%,
        #4a2c6a 60%,
        #6b3a7d 80%,
        #8b4a8f 100%
    );
}

/* Nuages */
.clouds {
    position: absolute;
    top: 5%;
    width: 100%;
    height: 200px;
    pointer-events: none;
}

.cloud {
    position: absolute;
    font-size: 4rem;
    opacity: 0.3;
    animation: float-cloud 60s linear infinite;
    filter: blur(2px);
}

.cloud-1 { top: 20px; animation-delay: 0s; }
.cloud-2 { top: 60px; animation-delay: -20s; font-size: 3rem; }
.cloud-3 { top: 100px; animation-delay: -40s; font-size: 5rem; }

@keyframes float-cloud {
    from { transform: translateX(-100px); }
    to { transform: translateX(calc(100vw + 100px)); }
}

/* Bâtiments de fond */
.background-buildings {
    position: absolute;
    bottom: 35%;
    left: 0;
    width: 100%;
    height: 200px;
    background: 
        linear-gradient(90deg, 
            transparent 0%, 
            #2a2a4a 0%, #2a2a4a 5%,
            transparent 5%, transparent 8%,
            #3a3a5a 8%, #3a3a5a 12%,
            transparent 12%, transparent 15%,
            #252545 15%, #252545 22%,
            transparent 22%, transparent 28%,
            #2d2d4d 28%, #2d2d4d 35%,
            transparent 35%, transparent 40%,
            #353555 40%, #353555 48%,
            transparent 48%, transparent 52%,
            #2a2a4a 52%, #2a2a4a 58%,
            transparent 58%, transparent 65%,
            #3a3a5a 65%, #3a3a5a 72%,
            transparent 72%, transparent 78%,
            #252545 78%, #252545 85%,
            transparent 85%, transparent 92%,
            #2d2d4d 92%, #2d2d4d 100%
        );
    opacity: 0.6;
}

/* SCENE PRINCIPALE */
.main-scene {
    position: absolute;
    bottom: 15%;
    left: 0;
    width: 100%;
    height: 55%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 0;
}

/* Restaurants */
.restaurant {
    position: relative;
    flex: 0 0 auto;
}

.restaurant .facade {
    height: 350px;
    width: auto;
    image-rendering: pixelated;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.5));
    transition: transform 0.3s ease;
}

.restaurant:hover .facade {
    transform: scale(1.02);
}

.restaurant .interior {
    display: none;
}

/* Chefs animés */
.chef {
    position: absolute;
    bottom: 20px;
    width: 80px;
    height: auto;
    z-index: 10;
}

.chef-tacos {
    right: 30%;
    animation: chef-idle 2s ease-in-out infinite;
}

.chef-kebab {
    left: 30%;
    animation: chef-idle 2s ease-in-out infinite;
    animation-delay: 0.5s;
}

.chef-sprite {
    width: 100%;
    image-rendering: pixelated;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.5));
}

@keyframes chef-idle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Zone de la rue */
.street-area {
    position: relative;
    flex: 0 0 250px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.street-ground {
    width: 100%;
    height: 150px;
    background: 
        repeating-linear-gradient(
            90deg,
            var(--street-color) 0px,
            var(--street-color) 60px,
            #3a3a4c 60px,
            #3a3a4c 62px
        );
    border-top: 8px solid var(--sidewalk-color);
    border-bottom: 8px solid var(--sidewalk-color);
}

/* Titre flottant */
.floating-title {
    position: absolute;
    top: 10%;
    text-align: center;
    z-index: 20;
    animation: title-float 3s ease-in-out infinite;
}

.floating-title h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.5rem;
    color: white;
    text-shadow: 
        4px 4px 0 var(--tacos-primary),
        -4px -4px 0 var(--kebab-primary),
        0 0 40px rgba(255,107,53,0.5);
    letter-spacing: 4px;
}

.floating-title .anarchy {
    display: block;
    background: linear-gradient(90deg, var(--tacos-primary), var(--danger), var(--kebab-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.floating-title .tagline {
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    color: var(--text-gold);
    margin-top: 10px;
    text-shadow: 2px 2px 0 black;
}

@keyframes title-float {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

/* Clients qui marchent */
.clients-container {
    position: absolute;
    bottom: 50px;
    left: 0;
    width: 100%;
    height: 100px;
    pointer-events: none;
}

.walking-client {
    position: absolute;
    bottom: 0;
    width: 60px;
    height: auto;
    image-rendering: pixelated;
    filter: drop-shadow(0 3px 5px rgba(0,0,0,0.5));
    animation: walk-across 15s linear infinite;
}

@keyframes walk-across {
    from { transform: translateX(-100px); }
    to { transform: translateX(calc(100vw + 100px)); }
}

/* Sol */
.ground {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15%;
    background: linear-gradient(180deg, var(--sidewalk-color) 0%, #5a5a6a 100%);
}

.sidewalk-pattern {
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            90deg,
            rgba(255,255,255,0.05) 0px,
            rgba(255,255,255,0.05) 50px,
            transparent 50px,
            transparent 100px
        );
}

/* =====================================================
   EFFETS VISUELS
   ===================================================== */

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0,0,0,0.1) 0px,
        rgba(0,0,0,0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 9999;
    opacity: 0.5;
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.7) 100%);
    pointer-events: none;
    z-index: 9998;
}

/* =====================================================
   NAVIGATION ARCADE
   ===================================================== */

.arcade-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 100%);
    border-bottom: 4px solid var(--text-gold);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    z-index: 1000;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.doc-btn {
    background: var(--kebab-primary) !important;
}

.doc-btn:hover {
    background: #5a9ee8 !important;
}

.coin {
    font-size: 1.5rem;
    animation: coin-spin 1s ease infinite;
}

@keyframes coin-spin {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

.credit {
    color: var(--text-gold);
    animation: blink 1s step-end infinite;
}

.high-score {
    color: var(--danger);
}

.play-btn {
    background: var(--success);
    color: black;
    padding: 10px 30px;
    text-decoration: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    border: 4px solid white;
    box-shadow: 
        inset -4px -4px 0 rgba(0,0,0,0.3),
        4px 4px 0 black;
    transition: all 0.1s;
}

.play-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 
        inset -4px -4px 0 rgba(0,0,0,0.3),
        2px 2px 0 black;
}

.play-btn:active {
    transform: translate(4px, 4px);
    box-shadow: none;
}

/* =====================================================
   CONTENU PRINCIPAL
   ===================================================== */

.content {
    position: relative;
    z-index: 10;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 50px;
}

.hero-overlay {
    text-align: center;
}

.press-start {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    color: var(--text-gold);
}

.blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* =====================================================
   SECTIONS
   ===================================================== */

.features-section,
.gallery-section,
.download-section {
    background: linear-gradient(180deg, rgba(15,15,26,0.95) 0%, rgba(26,26,46,0.98) 100%);
    padding: 80px 20px;
    border-top: 4px solid var(--text-gold);
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    margin-bottom: 50px;
    color: var(--text-gold);
}

.pixel-border {
    display: inline-block;
    padding: 15px 30px;
    background: var(--bg-dark);
    border: 4px solid var(--text-gold);
    box-shadow: 8px 8px 0 rgba(0,0,0,0.5);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.feature-card {
    background: var(--bg-dark);
    border: 4px solid #444;
    overflow: hidden;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--text-gold);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.card-header {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.card-header.tacos-theme {
    background: linear-gradient(135deg, var(--tacos-primary), var(--tacos-secondary));
}

.card-header.kebab-theme {
    background: linear-gradient(135deg, var(--kebab-primary), var(--kebab-secondary));
}

.card-header.vs-theme {
    background: linear-gradient(135deg, #333, #555);
}

.card-icon {
    height: 120px;
    image-rendering: pixelated;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
    animation: card-bounce 2s ease-in-out infinite;
}

@keyframes card-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.vs-icon {
    font-family: 'Press Start 2P', cursive;
    font-size: 3rem;
    color: var(--danger);
    text-shadow: 4px 4px 0 black;
    animation: vs-pulse 1s ease-in-out infinite;
}

@keyframes vs-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.card-body {
    padding: 20px;
    text-align: center;
}

.card-body h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    margin-bottom: 15px;
    color: var(--text-gold);
}

.card-body p {
    font-size: 1.2rem;
    color: #aaa;
    margin-bottom: 15px;
    line-height: 1.6;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

kbd {
    background: #333;
    border: 2px solid #555;
    border-bottom-width: 4px;
    padding: 5px 10px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    color: white;
}

.mode-badge {
    display: inline-block;
    background: var(--danger);
    color: white;
    padding: 10px 20px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    animation: badge-flash 2s ease infinite;
}

@keyframes badge-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Mécaniques */
.mechanics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.mechanic {
    background: rgba(255,255,255,0.05);
    border: 2px solid #333;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s;
}

.mechanic:hover {
    background: rgba(255,215,0,0.1);
    border-color: var(--text-gold);
    transform: scale(1.05);
}

.mechanic-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.mechanic h4 {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    color: var(--text-gold);
    margin-bottom: 10px;
}

.mechanic p {
    font-size: 1.1rem;
    color: #888;
}

/* =====================================================
   GALERIE
   ===================================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border: 4px solid #333;
    transition: all 0.3s;
}

.gallery-item.large {
    grid-column: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    transition: transform 0.5s;
}

.gallery-item:hover {
    border-color: var(--text-gold);
    z-index: 10;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.8);
    color: var(--text-gold);
    padding: 10px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-label {
    transform: translateY(0);
}

/* =====================================================
   SECTION TÉLÉCHARGEMENT
   ===================================================== */

.download-section {
    background: 
        linear-gradient(rgba(0,0,0,0.9), rgba(0,0,0,0.9)),
        url('assets/street.png');
    background-size: 64px;
}

.download-box {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-dark);
    border: 4px solid var(--success);
    box-shadow: 0 0 60px rgba(51,255,87,0.2);
}

.download-header {
    background: linear-gradient(90deg, var(--tacos-primary), var(--kebab-primary));
    padding: 30px;
    text-align: center;
}

.download-header h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.download-header p {
    font-size: 1.2rem;
    opacity: 0.8;
}

.download-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
}

.requirements h3,
.install-code h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    color: var(--text-gold);
    margin-bottom: 20px;
}

.requirements ul {
    list-style: none;
}

.requirements li {
    font-size: 1.3rem;
    padding: 10px 0;
    border-bottom: 1px solid #333;
}

/* Terminal */
.terminal {
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    font-family: 'Fira Code', 'Consolas', monospace;
}

.terminal-header {
    background: #333;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca40; }

.terminal-title {
    margin-left: 10px;
    font-size: 0.8rem;
    color: #888;
}

.terminal-body {
    padding: 20px;
}

.terminal-body code {
    display: block;
    font-size: 0.9rem;
    color: #0f0;
    margin-bottom: 8px;
}

.terminal-body .prompt {
    color: #ff6b35;
    margin-right: 10px;
}

.terminal-body .output {
    color: #ffcc00;
    margin-top: 15px;
}

/* Boutons téléchargement */
.download-buttons {
    display: flex;
    gap: 20px;
    padding: 30px;
    justify-content: center;
    background: rgba(0,0,0,0.3);
}

.btn-download {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 30px;
    text-decoration: none;
    border: 4px solid;
    font-family: 'VT323', monospace;
    transition: all 0.2s;
}

.btn-download.primary {
    background: var(--success);
    border-color: white;
    color: black;
}

.btn-download.secondary {
    background: transparent;
    border-color: var(--text-gold);
    color: var(--text-gold);
}

.btn-download:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.btn-icon {
    font-size: 2rem;
}

.btn-label strong {
    display: block;
    font-size: 1.4rem;
}

.btn-label small {
    font-size: 1rem;
    opacity: 0.7;
}

/* =====================================================
   FOOTER
   ===================================================== */

.game-footer {
    background: var(--bg-darker);
    padding: 50px 20px;
    text-align: center;
    border-top: 4px solid var(--text-gold);
    position: relative;
}

.footer-scene {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-char {
    width: 60px;
    image-rendering: pixelated;
    animation: footer-dance 1s ease-in-out infinite;
}

.footer-char.c1 { animation-delay: 0s; }
.footer-char.c2 { animation-delay: 0.2s; }
.footer-char.c3 { animation-delay: 0.4s; }

@keyframes footer-dance {
    0%, 100% { transform: translateY(0) scaleX(1); }
    25% { transform: translateY(-10px) scaleX(1); }
    50% { transform: translateY(0) scaleX(-1); }
    75% { transform: translateY(-10px) scaleX(-1); }
}

.footer-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem;
    color: var(--text-gold);
    margin-bottom: 20px;
}

.footer-text small {
    font-size: 0.7rem;
    color: #666;
}

.footer-credits {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    color: #444;
    animation: blink 2s step-end infinite;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 1024px) {
    .doc-btn {
        display: none !important;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .mechanics-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-item.large {
        grid-column: span 1;
    }
    
    .download-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .arcade-nav {
        padding: 0 10px;
        font-size: 0.5rem;
    }
    
    .floating-title h1 {
        font-size: 1.5rem;
    }
    
    .floating-title .tagline {
        font-size: 1rem;
    }
    
    .restaurant .facade {
        height: 200px;
    }
    
    .street-area {
        flex: 0 0 100px;
    }
    
    .mechanics-row {
        grid-template-columns: 1fr;
    }
    
    .download-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .main-scene {
        flex-direction: column;
        align-items: center;
    }
    
    .restaurant {
        display: none;
    }
    
    .street-area {
        width: 100%;
    }
}
