/* Variables de colores verde y azul modernos */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --secondary-light: #34d399;
    --accent: #06b6d4;
    --accent-dark: #0891b2;
    --accent-light: #22d3ee;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    --gradient-primary: linear-gradient(135deg, #2563eb, #10b981);
    --gradient-secondary: linear-gradient(135deg, #10b981, #06b6d4);
    --gradient-accent: linear-gradient(135deg, #06b6d4, #8b5cf6);
    --gradient-success: linear-gradient(135deg, #10b981, #84cc16);
    --gradient-warning: linear-gradient(135deg, #f59e0b, #f97316);
    --gradient-error: linear-gradient(135deg, #ef4444, #dc2626);
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --bg-surface: #475569;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #475569;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Fondo con gradiente animado */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
    z-index: -1;
}

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

/* Header moderno */
.header {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
}

.header-nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Botones modernos */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-size: 0.95rem;
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s;
}

.btn:hover::before {
    left: 100%;
}

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

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
}

.btn-secondary {
    background: var(--gradient-secondary);
    border: none;
    color: white;
}

.btn-accent {
    background: var(--gradient-accent);
    border: none;
    color: white;
}

.btn-success {
    background: var(--gradient-success);
    border: none;
    color: white;
}

.btn-warning {
    background: var(--gradient-warning);
    border: none;
    color: white;
}

.btn-error {
    background: var(--gradient-error);
    border: none;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Formularios modernos */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 1rem;
}

.form-row .form-group {
    flex: 1;
    min-width: 250px;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

input, select, textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.phone-input {
    display: flex;
    gap: 10px;
}

.phone-input select {
    width: 35%;
    border-radius: 12px 0 0 12px;
}

.phone-input input {
    width: 65%;
    border-radius: 0 12px 12px 0;
    border-left: none;
}

/* Login moderno */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: 
        radial-gradient(circle at 15% 50%, rgba(37, 99, 235, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.2) 0%, transparent 50%),
        var(--bg-primary);
    position: relative;
}

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

.login-card {
    background: rgba(51, 65, 85, 0.8);
    backdrop-filter: blur(20px);
    padding: 3rem 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--border);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.login-card h1 {
    margin-bottom: 1rem;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.login-card p {
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.login-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Landing page moderna */
.landing-body {
    background: 
        radial-gradient(circle at 25% 25%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
        var(--bg-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.landing-container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    width: 100%;
    background: rgba(51, 65, 85, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--border);
}

.evento-info, .invitacion-form {
    flex: 1;
    min-width: 350px;
    padding: 3rem;
}

.evento-info {
    background: var(--gradient-primary);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.evento-info::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: float 20s infinite linear;
}

.evento-info h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.invitacion-form h2 {
    margin-bottom: 2rem;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Tarjetas de eventos modernas */
.eventos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 25px;
    margin-top: 2rem;
}

.evento-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.evento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.evento-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.evento-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.evento-nombre {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.evento-estado {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.estado-proximo {
    background: var(--gradient-warning);
    color: white;
}

.estado-curso {
    background: var(--gradient-success);
    color: white;
}

.estado-finalizado {
    background: linear-gradient(135deg, #64748b, #94a3b8);
    color: white;
}

.evento-detalles p {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.evento-acciones {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.btn-accion {
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-accion:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.btn-whatsapp:hover {
    background: #25D366;
    color: white;
    border-color: #25D366;
}

.btn-facebook:hover {
    background: #3b5998;
    color: white;
    border-color: #3b5998;
}

.btn-enlace:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Calendario moderno */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 3rem 0;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.calendar-header {
    background: var(--gradient-primary);
    color: white;
    padding: 18px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
}

.calendar-day {
    background-color: var(--bg-card);
    padding: 15px;
    min-height: 120px;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.calendar-day:hover {
    background-color: var(--bg-surface);
    transform: scale(1.02);
}

.calendar-day.empty {
    background-color: var(--bg-secondary);
}

.calendar-day.has-events::after {
    content: '';
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.4);
}

.calendar-event {
    background: var(--gradient-primary);
    color: white;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.calendar-event:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.eventos-calendario {
    margin-top: 3rem;
    padding: 2.5rem;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* Secciones principales */
.event-form-section, .eventos-section {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.event-form-section h2, .eventos-section h2 {
    margin-bottom: 2rem;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Animaciones */
@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-50px, -50px) rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

.bounce {
    animation: bounce 2s infinite;
}

/* Notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    box-shadow: var(--shadow);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    backdrop-filter: blur(10px);
}

.notification.success {
    background: var(--gradient-success);
}

.notification.error {
    background: var(--gradient-error);
}

.notification.info {
    background: var(--gradient-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row .form-group {
        width: 100%;
    }
    
    .landing-container {
        flex-direction: column;
    }
    
    .calendar-controls {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .evento-acciones {
        justify-content: center;
    }
    
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .login-card {
        padding: 2rem 1.5rem;
    }
    
    .evento-info, .invitacion-form {
        padding: 2rem;
    }
    
    .eventos-grid {
        grid-template-columns: 1fr;
    }
}

/* Efectos de partículas mejorados */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    background: rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    animation: float-particle 25s infinite linear;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}