/* --- SETĂRI GENERALE ȘI FONTURI --- */
@font-face {
    font-family: 'Minecraftia';
    src: url('Assets/Minecraftia-Regular.ttf') format('truetype');
}

:root {
    --bg-dark: #09090b;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #f59e0b; /* Portocaliu elegant */
    --accent-glow: rgba(245, 158, 11, 0.3);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif; /* Font modern pentru citit */
    line-height: 1.6;
    overflow-x: hidden;
}

/* Fontul retro aplicat DOAR pe elemente cheie */
h1, h2, h3, .logo, .cta-button, .badge {
    font-family: 'Minecraftia', monospace;
    font-weight: normal;
}

/* --- EFECTE DE STICLĂ (GLASSMORPHISM) --- */
.glass-header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 5%;
    background: rgba(9, 9, 11, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    z-index: 1000;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.4); /* Glow portocaliu la hover */
}

/* --- NAVIGARE --- */
.logo { font-size: 20px; color: var(--text-main); letter-spacing: 1px; }
nav { display: flex; gap: 30px; align-items: center; }
.nav-link { color: var(--text-muted); text-decoration: none; font-size: 14px; transition: color 0.3s; }
.nav-link:hover { color: var(--text-main); }

.cta-button {
    background: var(--accent);
    color: #000;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px var(--accent-glow);
}
.cta-button:hover {
    background: #fbbf24;
    box-shadow: 0 0 25px var(--accent-glow);
    transform: scale(1.05);
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding-top: 80px;
    overflow: hidden;
}
/* Fundal blurat foarte elegant */
.hero-background {
    position: absolute;
    top: -20%; left: -10%; width: 120%; height: 120%;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.1) 0%, var(--bg-dark) 60%),
                url('Assets/images/Tiles/Autotiles walls.png');
    background-size: 128px;
    opacity: 0.3;
    z-index: -1;
}

.hero-content { text-align: center; max-width: 800px; padding: 0 20px; z-index: 1; }

.badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 50px;
    font-size: 10px;
    color: var(--accent);
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.title {
    font-size: 48px; line-height: 1.2; margin-bottom: 24px; text-shadow: 0 10px 30px rgba(0,0,0,0.8);
}
.gradient-text {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 18px; color: var(--text-muted); margin-bottom: 50px; font-weight: 300; max-width: 600px; margin-left: auto; margin-right: auto;
}

.hero-visual-container { margin-top: 40px; perspective: 1000px; }
.floating-menu {
    max-width: 350px; width: 100%; image-rendering: pixelated;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.7));
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0% { transform: translateY(0px) rotateX(5deg); }
    50% { transform: translateY(-15px) rotateX(0deg); }
    100% { transform: translateY(0px) rotateX(5deg); }
}

/* --- THE ENGINE (Unde e Player-ul) --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.engine-section { padding: 120px 0; position: relative; }
.section-heading { font-size: 32px; text-align: center; margin-bottom: 60px; color: var(--text-main); }
.left-align { text-align: left; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.feature-card { padding: 40px 30px; text-align: center; }
.feature-card h3 { font-size: 18px; color: var(--accent); margin-bottom: 16px; }
.feature-card p { color: var(--text-muted); font-size: 15px; }

.card-icon { height: 100px; display: flex; justify-content: center; align-items: center; margin-bottom: 30px; }
.static-icon img { height: 80px; image-rendering: pixelated; filter: drop-shadow(0 10px 10px rgba(0,0,0,0.5)); }

/* ========================================================================= */
/* 💥 ANIMAȚIA PLAYER-ULUI (Perfect Calculată) 💥                            */
/* Imaginea are 2 coloane, 1 rând.                                           */
/* ========================================================================= */
.player-thinking-anim {
    width: 64px; /* O facem decentă ca mărime */
    height: 64px;
    background-image: url('Assets/images/player/sprite_sheet_scratching.png');
    background-size: 128px 64px; /* Lățime totală 128 (2x64), înălțime 64 */
    image-rendering: pixelated;
    animation: play-scratch 0.8s steps(2) infinite;
    transform: scale(1.5); /* O mărim din CSS ca să rămână sharp */
}
@keyframes play-scratch {
    0% { background-position: 0px 0; }
    100% { background-position: -128px 0; }
}

/* --- SHOWCASE SECTION --- */
.showcase-section { padding: 80px 0 120px; }
.showcase-row { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.showcase-text p { font-size: 18px; color: var(--text-muted); margin-bottom: 24px; }
.showcase-image { padding: 10px; border-radius: 12px; overflow: hidden; }
.showcase-image img { width: 100%; height: auto; border-radius: 8px; image-rendering: pixelated; display: block; }

@media (max-width: 768px) {
    .showcase-row { grid-template-columns: 1fr; }
    .title { font-size: 36px; }
    nav { display: none; } /* Ascundem meniul pe mobil pt simplitate */
}

/* --- FOOTER --- */
.site-footer {
    text-align: center; padding: 40px 20px;
    border-top: 1px solid var(--border-glass);
    background: rgba(0,0,0,0.5);
}
.site-footer .logo { margin-bottom: 10px; color: #555; }
.site-footer p { color: #555; font-size: 12px; font-family: 'Outfit', sans-serif; }


/* ========================================================================= */
/* 💥 ANIMAȚIA CĂRȚII MAGICE (8 CADRE, 5 FPS, SKIP CADRUL 9) 💥              */
/* ========================================================================= */

.hero-book-anim {
    /* Dimensiunea de afișare pe site (Proporție 4:3) */
    width: 256px; 
    height: 192px; 
    margin: 0 auto;
    
    /* Încărcăm muniția */
    background-image: url('Assets/carte/sprite_sheet_book.png');
    background-repeat: no-repeat;
    
    /* SCALAREA: Lățime = 3 coloane * 256px | Înălțime = 3 linii * 192px */
    background-size: 768px 576px; 
    
    /* Efect de umbră și plutire ca să pară 3D */
    filter: drop-shadow(0 30px 40px rgba(0,0,0,0.8)) drop-shadow(0 0 20px rgba(245, 158, 11, 0.2));
    transform-origin: center bottom;
    
    /* DECLANȘĂM ANIMAȚIA: 1.6 secunde (8 cadre la 5 fps) folosind step-end */
    animation: 
        float-book 6s ease-in-out infinite,
        play-book-exact 1.6s step-end infinite;
}

/* --- EFECTUL DE PLUTIRE --- */
@keyframes float-book {
    0% { transform: translateY(0px) rotate(-2deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(-2deg); }
}

/* --- LUNETISTUL CADRULUI (Citire manuală a 8 din 9 cadre) --- */
@keyframes play-book-exact {
    /* RÂNDUL 1 */
    0%      { background-position: 0px 0px; }       /* Cadrul 1 */
    12.5%   { background-position: -256px 0px; }    /* Cadrul 2 */
    25%     { background-position: -512px 0px; }    /* Cadrul 3 */
    
    /* RÂNDUL 2 */
    37.5%   { background-position: 0px -192px; }    /* Cadrul 4 */
    50%     { background-position: -256px -192px; } /* Cadrul 5 */
    62.5%   { background-position: -512px -192px; } /* Cadrul 6 */
    
    /* RÂNDUL 3 */
    75%     { background-position: 0px -384px; }    /* Cadrul 7 */
    87.5%   { background-position: -256px -384px; } /* Cadrul 8 */
    
    /* 100% sare înapoi la Cadrul 1, EVITÂND Cadrul 9 (care ar fi fost -512px -384px) */
    100%    { background-position: 0px 0px; }       
}
