/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables CSS */
:root {
    --background: 240 50% 5%;
    --foreground: 210 100% 95%;
    --card: 240 50% 8%;
    --card-foreground: 210 100% 90%;
    --primary: 200 100% 50%;
    --primary-foreground: 240 50% 5%;
    --secondary: 260 50% 40%;
    --secondary-foreground: 210 100% 95%;
    --muted: 240 30% 15%;
    --muted-foreground: 210 50% 70%;
    --accent: 280 100% 70%;
    --accent-foreground: 240 50% 5%;
    --border: 240 30% 20%;
    --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
    --font-display: 'Orbitron', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

body {
    font-family: var(--font-sans);
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Enhanced Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes glow {
    from { box-shadow: 0 0 20px hsl(var(--primary)), 0 0 40px hsl(var(--primary)), 0 0 60px hsl(var(--primary)); }
    to { box-shadow: 0 0 30px hsl(var(--primary)), 0 0 50px hsl(var(--primary)), 0 0 70px hsl(var(--primary)); }
}

@keyframes particles {
    0% { transform: translateY(100vh) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(100px); opacity: 0; }
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

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

/* Nuevas animaciones de entrada mejoradas */
@keyframes slideInFromBottom {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeInScale {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes rotateIn {
    0% {
        transform: rotate(-200deg) scale(0.8);
        opacity: 0;
    }
    100% {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
}

@keyframes flipIn {
    0% {
        transform: rotateY(-90deg);
        opacity: 0;
    }
    100% {
        transform: rotateY(0deg);
        opacity: 1;
    }
}

/* Background cosmico */
.cosmic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: radial-gradient(ellipse at center, hsl(var(--card)) 0%, hsl(var(--background)) 100%);
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: particles 20s linear infinite;
}

/* Layout principal */
.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1rem;
}

/* Hero Section con animaciones mejoradas */
.hero-section {
    text-align: center;
    margin-bottom: 3rem;
    animation: float 6s ease-in-out infinite, fadeInScale 1.5s ease-out;
}

.brand-section {
    margin-bottom: 2rem;
}

.main-title {
    font-size: clamp(3rem, 8vw, 8rem);
    font-family: var(--font-display);
    font-weight: 900;
    background: linear-gradient(45deg, hsl(var(--primary)), hsl(var(--accent)));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    position: relative;
    animation: bounceIn 2s ease-out 0.5s both;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    animation: glitch 0.3s infinite;
    color: hsl(var(--primary));
    z-index: -1;
}

.glitch-text::after {
    animation: glitch 0.3s infinite reverse;
    color: hsl(var(--accent));
    z-index: -2;
}

.subtitle {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-family: var(--font-mono);
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
    animation: slideInFromLeft 1.5s ease-out 0.8s both;
}

.tagline {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: hsl(var(--foreground));
    max-width: 42rem;
    margin: 0 auto;
    animation: slideInFromRight 1.5s ease-out 1.2s both;
}

.typing-text {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid hsl(var(--primary));
    animation: typing 3.5s steps(30) 1s 1 normal both;
}

/* Glass card effect con animaciones escalonadas */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
    width: 100%;
    max-width: 42rem;
    animation: slideInFromBottom 1s ease-out both;
}

/* Animaciones escalonadas para cada sección */
.countdown-container {
    animation-delay: 0.3s;
}

.features-section {
    animation-delay: 0.6s;
}

.newsletter-section {
    animation-delay: 0.9s;
}

.social-section {
    animation-delay: 1.2s;
}

/* Countdown Timer con animaciones mejoradas */
.countdown-container {
    max-width: 64rem;
    padding: 2rem;
    position: relative;
}

.pixel-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, hsl(var(--primary)), hsl(var(--accent)));
    border-radius: inherit;
    z-index: -1;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite alternate;
}

.countdown-title {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-family: var(--font-display);
    font-weight: bold;
    text-align: center;
    margin-bottom: 2rem;
    color: hsl(var(--primary));
    animation: flipIn 1.2s ease-out 0.5s both;
}

.countdown-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.countdown-item {
    text-align: center;
    min-width: 4rem;
    animation: rotateIn 1s ease-out both;
}

.countdown-item:nth-child(1) { animation-delay: 0.2s; }
.countdown-item:nth-child(2) { animation-delay: 0.4s; }
.countdown-item:nth-child(3) { animation-delay: 0.6s; }
.countdown-item:nth-child(4) { animation-delay: 0.8s; }

.countdown-digit {
    /* Estilos de texto mejorados para mayor visibilidad */
    color: #ffffff;
    text-shadow: 
        0 0 5px hsl(var(--primary)),
        0 0 10px hsl(var(--primary)),
        0 0 15px hsl(var(--primary)),
        0 0 20px hsl(var(--primary)),
        0 0 25px hsl(var(--primary));
    font-weight: 900;
    font-family: var(--font-mono);
    font-size: clamp(2.5rem, 6vw, 5rem);
    position: relative;
    
    /* Estilos de contenedor con mayor contraste */
    background: rgba(0, 150, 255, 0.2);
    border: 3px solid hsl(var(--primary) / 0.8);
    border-radius: 16px;
    padding: 0.8rem 1rem;
    margin: 0.3rem;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 0 30px hsl(var(--primary) / 0.6),
        inset 0 0 30px hsl(var(--primary) / 0.2),
        0 0 50px hsl(var(--primary) / 0.3);
    
    /* Transición suave mejorada */
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    margin-bottom: 0.5rem;
    will-change: transform, box-shadow;
    min-width: clamp(3rem, 8vw, 5rem);
    text-align: center;
}

.countdown-digit::before {
    content: attr(data-value);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: -1;
    color: hsl(var(--accent));
    text-shadow: 
        0 0 8px hsl(var(--accent)),
        0 0 15px hsl(var(--accent)),
        0 0 25px hsl(var(--accent));
    transform: translate(3px, 3px);
    transition: all 0.5s ease;
}

.countdown-digit:hover {
    border-color: hsl(var(--primary));
    box-shadow: 
        0 0 40px hsl(var(--primary) / 0.8),
        inset 0 0 40px hsl(var(--primary) / 0.3),
        0 0 60px hsl(var(--primary) / 0.5);
    transform: scale(1.05) translateY(-3px);
    background: rgba(0, 150, 255, 0.3);
}

.countdown-digit.updating {
    animation: pulse 0.5s ease-in-out;
}

.countdown-label {
    font-size: clamp(0.8rem, 2vw, 1.1rem);
    font-weight: 600;
    color: hsl(var(--foreground));
    text-shadow: 0 0 8px hsl(var(--primary) / 0.5);
    letter-spacing: 0.1em;
}

/* Features Section con animaciones para elementos */
.features-section {
    max-width: 48rem;
}

.features-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-family: var(--font-display);
    font-weight: bold;
    text-align: center;
    margin-bottom: 1.5rem;
    color: hsl(var(--accent));
}

.features-list {
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    animation: slideInFromLeft 0.8s ease-out both;
}

.feature-item:nth-child(1) { animation-delay: 0.2s; }
.feature-item:nth-child(2) { animation-delay: 0.4s; }
.feature-item:nth-child(3) { animation-delay: 0.6s; }

.feature-item:hover {
    transform: translateX(10px) scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.15);
}

.feature-check {
    color: hsl(var(--primary));
    font-size: 1.5rem;
    font-weight: bold;
    filter: drop-shadow(0 0 10px hsl(var(--primary)));
    transition: all 0.3s ease;
}

.feature-item:hover .feature-check {
    transform: scale(1.2);
    filter: drop-shadow(0 0 15px hsl(var(--primary)));
}

.feature-text {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 500;
    color: hsl(var(--foreground));
}

.features-footer {
    text-align: center;
}

.description-1 {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
    animation: fadeInScale 1s ease-out 0.8s both;
}

.description-2 {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 600;
    color: hsl(var(--primary));
    animation: fadeInScale 1s ease-out 1s both;
}

/* Newsletter Section */
.newsletter-section {
    max-width: 32rem;
}

.newsletter-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.newsletter-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: pulse 2s infinite, bounceIn 1.5s ease-out;
}

.newsletter-title {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-family: var(--font-display);
    font-weight: bold;
    color: hsl(var(--accent));
    margin-bottom: 0.5rem;
}

.newsletter-description {
    color: hsl(var(--muted-foreground));
}

.newsletter-form {
    margin-bottom: 1rem;
}

.input-group {
    position: relative;
    margin-bottom: 1rem;
}

.email-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    background: hsl(var(--background) / 0.5);
    border: 2px solid hsl(var(--primary) / 0.3);
    border-radius: 0.5rem;
    color: hsl(var(--foreground));
    font-size: 1rem;
    transition: all 0.3s ease;
}

.email-input:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
    transform: scale(1.02);
}

.input-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: hsl(var(--muted-foreground));
}

.subscribe-button {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(45deg, hsl(var(--primary)), hsl(var(--accent)));
    border: none;
    border-radius: 0.5rem;
    color: hsl(var(--primary-foreground));
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.subscribe-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px hsl(var(--primary) / 0.4);
}

.form-message {
    text-align: center;
    padding: 0.5rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    display: none;
    animation: slideInFromBottom 0.5s ease-out;
}

.form-message.success {
    background: hsl(120 50% 20%);
    color: hsl(120 50% 80%);
    border: 1px solid hsl(120 50% 40%);
}

.form-message.error {
    background: hsl(0 50% 20%);
    color: hsl(0 50% 80%);
    border: 1px solid hsl(0 50% 40%);
}

/* Social Links Section */
.social-section {
    max-width: 32rem;
}

.social-title {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-family: var(--font-display);
    font-weight: bold;
    text-align: center;
    margin-bottom: 1.5rem;
    color: hsl(var(--secondary));
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.social-icon {
    font-size: 2rem;
    color: hsl(var(--primary));
    text-decoration: none;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    padding: 0.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    animation: rotateIn 1s ease-out both;
}

.social-icon:nth-child(1) { animation-delay: 0.2s; }
.social-icon:nth-child(2) { animation-delay: 0.4s; }
.social-icon:nth-child(3) { animation-delay: 0.6s; }
.social-icon:nth-child(4) { animation-delay: 0.8s; }

.social-icon:hover {
    transform: translateY(-8px) scale(1.2) rotate(10deg);
    filter: drop-shadow(0 15px 25px rgba(0, 212, 255, 0.4));
    color: hsl(var(--accent));
    background: rgba(255, 255, 255, 0.1);
}

.social-info {
    text-align: center;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Footer */
.footer {
    margin-top: 3rem;
    text-align: center;
    animation: fadeInScale 1s ease-out 1.5s both;
}

.hashtags {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    font-family: var(--font-mono);
}

/* Media Queries para mejores animaciones responsivas */
@media (max-width: 768px) {
    .countdown-grid {
        gap: 0.8rem;
    }
    
    .countdown-item {
        min-width: 3.5rem;
    }
    
    .countdown-digit {
        font-size: clamp(2rem, 8vw, 3.5rem);
        padding: 0.6rem 0.8rem;
    }
    
    .social-links {
        gap: 1rem;
    }
    
    .feature-item:hover {
        transform: scale(1.02);
    }
    
    .main-container {
        padding: 0.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}