/* --- CONFIGURACIÓN Y VARIABLES --- */
:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary: #6366f1;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --success: #22c55e;
    --error: #ef4444;
}

/* --- RESET Y GENERAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
}

/* --- UTILIDADES --- */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* --- ESPACIADO DE SECCIONES --- */
section {
    padding: 120px 0; 
    position: relative;
}

/* --- ESTILO DE TÍTULOS DE SECCIÓN --- */
.section-title {
    text-align: center;
    font-size: 3.5rem; 
    margin-top: 40px;    
    margin-bottom: 80px; 
    font-weight: 900;
}

/* --- ANIMACIONES --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- NAVEGACIÓN --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: 0.3s;
}

nav.scrolled {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
}

/* --- HERO --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: -50px;
    right: -50px;
}

.hero h1 {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.btn-glow {
    padding: 15px 40px;
    background: var(--gradient);
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
    display: inline-block;
}

/* --- FLIP CARDS --- */
.comparison-wrapper {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.flip-card {
    width: 300px;
    height: 400px;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-front,
.flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.flip-back {
    background: var(--gradient);
    transform: rotateY(180deg);
    color: white;
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

/* --- ACORDEÓN --- */
.accordion {
    max-width: 900px;
    margin: 0 auto;
}

.accordion-item {
    margin-bottom: 20px;
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 20px;
    background: none;
    border: none;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: left;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.accordion-body {
    padding: 0 20px 20px 20px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- TECH GRID --- */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.tech-card {
    padding: 40px;
    transition: 0.3s;
}

.tech-card:hover {
    transform: translateY(-10px);
}

/* --- TERMINAL JUEGOS --- */
.games-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.game-terminal {
    background: #0a0a0a;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.terminal-header {
    background: #1a1a1a;
    padding: 10px;
    display: flex;
}

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

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

.terminal-screen {
    padding: 20px;
    font-family: monospace;
    color: #00ff00;
    height: 200px;
}

.game-controls {
    padding: 20px;
    display: flex;
    gap: 15px;
}

.btn-game {
    flex: 1;
    padding: 12px;
    background: none;
    border: 1px solid var(--primary);
    color: var(--primary);
    cursor: pointer;
    font-weight: bold;
    border-radius: 8px;
    transition: 0.2s;
}

.btn-game:hover {
    background: rgba(255,255,255,0.1);
}