/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

:root {
    /* Colores oficiales de Ututo */
    --primary-color: #4a2554; /* Púrpura oscuro principal */
    --primary-dark: #3a1d42; /* Púrpura más oscuro */
    --secondary-color: #A565A6; /* Púrpura claro/lavanda */
    --accent-color: #BCA228; /* Amarillo dorado/mostaza */
    --tertiary-color: #75613D; /* Verde oliva oscuro/marrón */
    --quaternary-color: #70992B; /* Verde oliva */
    --success-color: #70992B; /* Verde oliva para éxito */
    --warning-color: #BCA228; /* Amarillo dorado para advertencia */
    --error-color: #ef4444; /* Rojo de error */
    
    /* Colores neutros */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Colores de fondo */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    /* Tipografía */
    --font-primary: 'Montserrat', sans-serif;
    --font-mono: 'Montserrat', sans-serif;
    
    /* Espaciado */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Bordes */
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    --border-radius-2xl: 1.5rem;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Tema oscuro */
.dark-theme {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --gray-50: #1e293b;
    --gray-100: #334155;
    --gray-200: #475569;
    --gray-300: #64748b;
    --gray-400: #94a3b8;
    --gray-500: #cbd5e1;
    --gray-600: #e2e8f0;
    --gray-700: #f1f5f9;
    --gray-800: #f8fafc;
    --gray-900: #ffffff;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Header */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--gray-200);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

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

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-xl);
}

.nav-menu a {
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-md);
    transition: background-color 0.3s ease;
}

.theme-toggle:hover {
    background: var(--gray-100);
}

.download-nav-btn {
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--border-radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.download-nav-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Main content */
.main {
    margin-top: 70px;
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: var(--spacing-3xl) 0;
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--border-radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--spacing-lg);
}

.gradient-text {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: var(--spacing-xl);
    opacity: 0.9;
}

.hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.download-btn.primary {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.download-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.download-btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.download-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.download-btn.large {
    font-size: 1.125rem;
    padding: var(--spacing-lg) var(--spacing-2xl);
}

.hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.download-stat-card {
    background: white;
    border: 2px solid var(--accent-color);
    border-radius: 16px;
    padding: var(--spacing-xl) var(--spacing-2xl);
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    grid-column: 1 / -1;
    position: relative;
    overflow: hidden;
}

.download-stat-card:hover {
    background: var(--accent-color);
    border-color: var(--primary-color);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(188, 162, 40, 0.3),
        0 12px 24px rgba(0, 0, 0, 0.15);
}

.download-stat-card:hover .stat-number {
    color: white;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

.download-stat-card:hover .stat-label {
    color: white;
}

.stat-icon {
    width: 64px;
    height: 64px;
    background: var(--accent-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    box-shadow: 
        0 8px 16px rgba(188, 162, 40, 0.3);
    transition: all 0.3s ease;
}

.download-stat-card:hover .stat-icon {
    background: white;
    color: var(--accent-color);
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.1);
}

.stat-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xs);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--accent-color);
    text-shadow: 0 2px 4px rgba(188, 162, 40, 0.2);
    letter-spacing: -0.02em;
    transition: all 0.3s ease;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
    transition: all 0.3s ease;
}

/* Terminal visual */
.terminal-window {
    background: var(--gray-900);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
}

.dark-theme .terminal-window {
    background: #1a1a1a;
    border: 1px solid var(--gray-600);
}

.terminal-header {
    background: var(--gray-800);
    padding: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-700);
}

.terminal-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

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

.btn.close { background: #ef4444; }
.btn.minimize { background: #f59e0b; }
.btn.maximize { background: #10b981; }

.terminal-title {
    color: var(--gray-300);
    font-size: 0.875rem;
    font-family: var(--font-mono);
}

.dark-theme .terminal-title {
    color: #a0a0a0;
}

.terminal-body {
    padding: var(--spacing-lg);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
}

.terminal-line {
    margin-bottom: var(--spacing-sm);
}

.prompt {
    color: var(--success-color);
}

.dark-theme .prompt {
    color: #4ade80;
}

.command {
    color: var(--accent-color);
}

.dark-theme .command {
    color: #fbbf24;
}

.terminal-output {
    color: var(--gray-300);
    margin-bottom: var(--spacing-md);
}

.dark-theme .terminal-output {
    color: #d1d5db;
}

.cursor {
    color: var(--warning-color);
    animation: blink 1s infinite;
}

.dark-theme .cursor {
    color: #fbbf24;
}

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

/* Why Ututo section */
.why-ututo {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    color: var(--gray-900);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-xl);
}

.feature-card {
    background: var(--bg-primary);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-lg);
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--gray-900);
}

.feature-card p {
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
}

.feature-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.feature-link:hover {
    color: var(--primary-dark);
}

/* History section */
.history {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-primary);
}

.history-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
    align-items: center;
}

.history-text p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--gray-600);
    margin-bottom: var(--spacing-lg);
}

.history-highlight {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: var(--gray-50);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    border-left: 4px solid var(--primary-color);
    margin-top: var(--spacing-xl);
}

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

.highlight-text {
    color: var(--gray-700);
}

/* Keyboard visual */
.keyboard-visual {
    position: relative;
}

.keyboard {
    background: var(--gray-800);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    transform: perspective(1000px) rotateX(10deg);
}

.dark-theme .keyboard {
    background: #2a2a2a;
    border: 1px solid var(--gray-600);
}

.keyboard-row {
    display: flex;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-xs);
    justify-content: center;
}

.key {
    background: var(--gray-700);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
    transition: all 0.2s ease;
}

.dark-theme .key {
    background: #404040;
    color: #e5e5e5;
    border: 1px solid #555555;
}

.key.wide {
    min-width: 60px;
}

.key:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.dark-theme .key:hover {
    background: var(--accent-color);
    color: #1a1a1a;
}

.ututo-badge {
    position: absolute;
    top: -20px;
    right: -20px;
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-lg);
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: var(--shadow-lg);
}

.dark-theme .ututo-badge {
    background: var(--accent-color);
    color: #1a1a1a;
    border: 1px solid var(--primary-color);
}

/* Wallpapers section */
.wallpapers {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-secondary);
}

.wallpapers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.wallpaper-item {
    text-align: center;
}

.wallpaper-preview {
    width: 100%;
    height: 120px;
    border-radius: var(--border-radius-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.wallpaper-preview:hover {
    transform: scale(1.05);
}

.wallpaper-item h4 {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* Wallpaper previews */
.ututo-colors-centered {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%);
}

.ututo-colors-simple {
    background: linear-gradient(45deg, #1e40af 0%, #7c3aed 100%);
}

.ututo-colors-texture {
    background: linear-gradient(135deg, #1d4ed8 0%, #7c3aed 50%, #ec4899 100%);
}

.ututo-violetas {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #c084fc 100%);
}

.emirchus-green {
    background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
}

.emirchus-violet {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 50%, #a78bfa 100%);
}

.wallpapers-cta {
    text-align: center;
}

/* Download section */
.download-section {
    padding: var(--spacing-3xl) 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.download-cta {
    text-align: center;
}

.download-cta h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
}

.download-cta p {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.9;
}

.download-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-3xl);
    margin-top: var(--spacing-xl);
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: var(--spacing-3xl) 0 var(--spacing-lg);
}

.dark-theme .footer {
    background: #1a1a1a;
    color: #d1d5db;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.footer-logo .logo-icon {
    font-size: 1.5rem;
}

.footer-logo .logo-text {
    font-size: 1.25rem;
    color: white;
}

.footer-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: white;
}

.dark-theme .footer-section h3 {
    color: #f3f4f6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--spacing-sm);
}

.footer-section a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color 0.3s ease;
}

.dark-theme .footer-section a {
    color: #9ca3af;
}

.footer-section a:hover {
    color: white;
}

.dark-theme .footer-section a:hover {
    color: #f3f4f6;
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom-content p {
    color: var(--gray-400);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xs);
}

.dark-theme .footer-bottom-content p {
    color: #9ca3af;
}

.footer-social {
    display: flex;
    gap: var(--spacing-md);
}

.social-link {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.dark-theme .social-link {
    color: #9ca3af;
}

.social-link:hover {
    color: white;
}

.dark-theme .social-link:hover {
    color: #f3f4f6;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-xl);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
    }
    
    .history-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .download-stats {
        flex-direction: column;
        gap: var(--spacing-lg);
    }
    
    .download-stat-card {
        padding: var(--spacing-lg) var(--spacing-xl);
        width: calc(100% - var(--spacing-sm));
        max-width: calc(100% - var(--spacing-sm));
        gap: var(--spacing-md);
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .wallpapers-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .download-btn {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: 0.875rem;
    }
    
    .download-btn.large {
        padding: var(--spacing-md) var(--spacing-xl);
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .feature-card {
        padding: var(--spacing-lg);
    }
    
    .terminal-window {
        transform: none;
    }
    
    .keyboard {
        transform: none;
    }
}