
/* === RESET === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

/* ========== FONDO CON PARTÍCULAS ========== */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('img/background.jpg') center/cover;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(3px) brightness(0.3);
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(15, 23, 42, 0.95) 0%, 
        rgba(30, 41, 59, 0.92) 50%, 
        rgba(15, 23, 42, 0.95) 100%);
}

#particlesCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ========== ANIMACIONES ========== */
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.5s ease-out;
}

.animate-slide-in {
    animation: slide-in 0.5s ease-out;
    animation-fill-mode: both;
}

.animate-fadeInUp {
    animation: fadeInUp 1s ease;
}

/* ========== ESTILOS PERSONALIZADOS ========== */
.service-card {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.service-card:hover {
    transform: scale(1.02);
}

.service-card.selected {
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
}

.gradient-text {
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    backdrop-filter: blur(10px);
    background: rgba(17, 24, 39, 0.6);
}

.glass-card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.05);
}

/* Scroll personalizado */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* === ESTILOS MEJORADOS PARA ENLACE === */

.enlace-box {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border-radius: 16px;
    padding: 25px;
    margin: 20px 0;
    color: white;
    box-shadow: 0 8px 25px rgba(238, 90, 111, 0.3);
    animation: slideIn 0.4s ease-out;
}

.enlace-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.enlace-header .icono-info {
    font-size: 28px;
    animation: bounce 2s infinite;
}

.enlace-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.enlace-descripcion {
    background: rgba(255, 255, 255, 0.15);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.6;
    border-left: 4px solid rgba(255, 255, 255, 0.5);
}

.enlace-descripcion strong {
    color: #fff;
    font-weight: 700;
}

/* Botón de obtener código */
.btn-obtener-codigo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: white;
    color: #e50914;
    text-decoration: none;
    padding: 18px 30px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    margin: 20px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-obtener-codigo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(229, 9, 20, 0.2), transparent);
    transition: left 0.5s;
}

.btn-obtener-codigo:hover::before {
    left: 100%;
}

.btn-obtener-codigo:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.4);
    background: #f8f8f8;
}

.btn-obtener-codigo:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-icono {
    font-size: 20px;
}

.btn-texto {
    flex: 1;
}

.btn-flecha {
    font-size: 20px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.btn-obtener-codigo:hover .btn-flecha {
    transform: translateX(5px);
}

.enlace-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.enlace-nota {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.5;
}

.enlace-nota strong {
    font-weight: 700;
}

/* === ESTILOS MEJORADOS PARA CÓDIGO === */

.codigo-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 16px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.codigo-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    margin-bottom: 15px;
    font-weight: 600;
}

.icono-codigo {
    font-size: 20px;
}

.codigo {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 36px;
    font-weight: 900;
    padding: 20px;
    border-radius: 12px;
    margin: 15px 0;
    letter-spacing: 8px;
    font-family: 'Courier New', monospace;
    user-select: all;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.codigo:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.btn-copiar {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    padding: 12px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.3s ease;
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-copiar:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-copiar:active {
    transform: translateY(0);
}

.codigo-expiracion {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.icono-reloj {
    font-size: 16px;
}

/* === HEADER DEL CORREO === */

.correo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.numero-correo {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
}

.badges-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fecha-correo {
    font-size: 12px;
    color: #888;
}

.asunto-correo {
    color: #fff;
    font-size: 18px;
    margin: 15px 0;
    font-weight: 600;
    line-height: 1.4;
}

/* === SIN CÓDIGO === */

.sin-codigo {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin: 15px 0;
}

.icono-vacio {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
    opacity: 0.5;
}

.sin-codigo p {
    color: #888;
    font-style: italic;
    margin: 0;
}

/* === ANIMACIONES === */

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === RESPONSIVE === */

@media (max-width: 768px) {
    .codigo {
        font-size: 28px;
        letter-spacing: 5px;
        padding: 15px;
    }
    
    .btn-obtener-codigo {
        padding: 15px 20px;
        font-size: 14px;
    }
    
    .enlace-box {
        padding: 20px;
    }
    
    .enlace-header h4 {
        font-size: 16px;
    }
}

/* ========== RESPONSIVE PARA MÓVILES ========== */
@media (max-width: 1024px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Grid de 1 columna en tablets */
    .grid.lg\\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Ajustar padding del header */
    header .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Reducir tamaño del título */
    .text-4xl {
        font-size: 2rem;
    }

    .text-3xl {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    /* Header responsive */
    header .container {
        padding: 0.75rem 1rem;
    }

    .gradient-text {
        font-size: 1.25rem;
    }

    /* Navegación en móvil - solo iconos */
    nav.flex.gap-6 {
        gap: 0.75rem;
    }

    nav a span:not(.w-5) {
        display: none;
    }

    /* Títulos más pequeños */
    h2.text-4xl {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .text-3xl.md\\:text-4xl {
        font-size: 1.5rem;
    }

    /* Ajustar espaciado */
    .py-12 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    /* Cards de servicio más compactas */
    .service-card {
        padding: 1rem;
    }

    .service-card .text-4xl {
        font-size: 2rem;
        padding: 0.5rem;
    }

    .service-card h3 {
        font-size: 1rem;
    }

    .service-card p {
        font-size: 0.75rem;
    }

    /* Formulario responsive */
    .flex.gap-3 {
        flex-direction: column;
        gap: 0.75rem;
    }

    .flex.gap-3 button {
        width: 100%;
        justify-content: center;
    }

    /* Glass card padding */
    .glass-card {
        padding: 1.5rem;
    }

    /* Padding general de elementos redondeados */
    .rounded-xl {
        padding: 1rem;
    }

    /* Íconos más pequeños */
    .w-12.h-12 {
        width: 2.5rem;
        height: 2.5rem;
    }

    /* Ajustar check de servicio */
    .service-check svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    /* Reducir partículas en móvil */
    #particlesCanvas {
        opacity: 0.5;
    }
}

@media (max-width: 480px) {
    /* Móviles muy pequeños */
    .gradient-text {
        font-size: 1.1rem;
    }

    h2.text-4xl {
        font-size: 1.5rem;
    }

    .text-3xl.md\\:text-4xl {
        font-size: 1.25rem;
    }

    /* Cards más compactas */
    .service-card {
        padding: 0.875rem;
    }

    .service-card .text-4xl {
        font-size: 1.75rem;
    }

    /* Formulario más compacto */
    input[type="email"] {
        padding: 0.75rem 0.75rem 0.75rem 2.5rem;
        font-size: 0.875rem;
    }

    button.px-8 {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }

    /* Reducir padding general */
    .glass-card {
        padding: 1rem;
    }

    .rounded-xl {
        padding: 0.875rem;
    }

    /* Ocultar iconos SVG en textos muy pequeños */
    svg.w-5.h-5 {
        width: 1.125rem;
        height: 1.125rem;
    }

    /* Ajustar separador de gradiente */
    .h-1.w-32 {
        width: 5rem;
    }

    .h-1.w-48 {
        width: 8rem;
    }

    /* Reducir aún más las partículas */
    #particlesCanvas {
        opacity: 0.3;
    }
}

/* Landscape móvil */
@media (max-width: 768px) and (orientation: landscape) {
    .py-12 {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    header {
        padding: 0.5rem 0;
    }

    .service-card {
        padding: 0.75rem;
    }

    #particlesCanvas {
        opacity: 0.2;
    }
}

/* Touch devices - áreas de toque más grandes */
@media (hover: none) and (pointer: coarse) {
    .service-card {
        min-height: 80px;
    }

    button,
    a {
        min-height: 44px;
        min-width: 44px;
    }

    input[type="email"] {
        min-height: 48px;
    }
}

/* Reducir blur en móviles para mejor performance */
@media (max-width: 768px) {
    .background-image {
        filter: blur(2px) brightness(0.3);
    }
}