@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;900&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --bg: #0f0c29;
    --bg-gradient: linear-gradient(135deg, #240b36 0%, #c31432 50%, #240b36 100%);
    --card: #ffffff;
    --text: #1a1a2e;
    --accent: #ff6b6b;
    --accent-2: #feca57;
    --accent-3: #48dbfb;
    --purple: #5f27cd;
    --pink: #ff9ff3;
    --radius: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Outfit', system-ui, sans-serif;
    background: var(--bg);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    padding: 2rem 1rem;
    min-height: 100vh;
}

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

/* Header épico */
header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.2);
    animation: fadeInDown 0.8s ease;
}

header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
    margin-bottom: .5rem;
    letter-spacing: -0.02em;
}

header .date {
    color: var(--accent-2);
    font-size: 1.3rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Navegación de días */
.day-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.nav-link {
    display: inline-block;
    padding: .7rem 1.5rem;
    background: rgba(255,255,255,0.15);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: .95rem;
    border: 2px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.nav-link:hover {
    background: var(--accent-2);
    color: var(--text);
    border-color: var(--accent-2);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(254, 202, 87, 0.4);
}

.nav-today {
    background: linear-gradient(135deg, var(--accent), var(--pink));
    border-color: transparent;
    color: #fff;
}

.nav-today:hover {
    background: linear-gradient(135deg, var(--pink), var(--accent));
    color: #fff;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
}

/* Portadas */
.portadas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.portada-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid transparent;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: fadeInUp 0.6s ease both;
}

.portada-card:nth-child(1) { animation-delay: 0.1s; }
.portada-card:nth-child(2) { animation-delay: 0.2s; }
.portada-card:nth-child(3) { animation-delay: 0.3s; }
.portada-card:nth-child(4) { animation-delay: 0.4s; }
.portada-card:nth-child(5) { animation-delay: 0.5s; }

.portada-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: var(--accent-3);
    box-shadow: 0 20px 50px rgba(72, 219, 251, 0.3);
}

.portada-card img {
    width: 100%;
    aspect-ratio: 640 / 851;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.5s ease;
}

.portada-card:hover img {
    transform: scale(1.05);
}

.portada-placeholder {
    width: 100%;
    aspect-ratio: 640 / 851;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e0e0, #f0f0f0);
    color: #888;
    font-size: .9rem;
    font-weight: 600;
}

.portada-card .name {
    padding: .8rem;
    font-weight: 800;
    text-transform: uppercase;
    font-size: .9rem;
    letter-spacing: .08em;
    color: var(--purple);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 12, 41, 0.95);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    backdrop-filter: blur(10px);
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    color: #fff;
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transition: transform 0.2s;
}

.lightbox-close:hover {
    transform: scale(1.2);
    color: var(--accent);
}

/* Votación */
.vote-section {
    background: var(--card);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease 0.4s both;
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.vote-section::before {
    content: '';
    position: absolute;
    top: -3px; left: -3px; right: -3px; bottom: -3px;
    background: linear-gradient(135deg, var(--accent), var(--accent-3), var(--accent-2));
    border-radius: calc(var(--radius) + 3px);
    z-index: -1;
}

.vote-section h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--purple);
    text-align: center;
}

/* Advertencia */
.vote-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-left: 5px solid var(--accent-2);
    padding: 1rem 1.2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: .95rem;
    color: #856404;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(254, 202, 87, 0.2);
}

.vote-warning strong {
    color: #d4ac0d;
}

.vote-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.vote-options {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    justify-content: center;
}

.vote-options label {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: .7rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--text);
}

.vote-options label:hover {
    border-color: var(--accent-3);
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(72, 219, 251, 0.3);
}

.vote-options input[type="radio"] {
    accent-color: var(--purple);
    width: 18px;
    height: 18px;
}

.vote-form input[type="text"],
.vote-form textarea {
    width: 100%;
    padding: .9rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s;
    background: #fafafa;
}

.vote-form input[type="text"]:focus,
.vote-form textarea:focus {
    outline: none;
    border-color: var(--accent-3);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(72, 219, 251, 0.15);
}

/* Botón épico */
.vote-form button {
    align-self: center;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    color: #fff;
    border: none;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    position: relative;
    overflow: hidden;
}

.vote-form button::after {
    content: ' 🗳️';
}

.vote-form button:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.6);
    background: linear-gradient(135deg, var(--purple), var(--accent));
}

.vote-form button:active {
    transform: translateY(-1px) scale(0.98);
}

/* Votación deshabilitada */
.vote-disabled {
    text-align: center;
}

.no-vote-msg {
    padding: 3rem 1rem;
    color: #888;
}

.no-vote-msg p:first-child {
    font-size: 1.4rem;
    margin-bottom: .5rem;
    color: var(--accent);
    font-weight: 700;
}

/* Alertas */
.alert {
    padding: 1rem 1.2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 2px solid #28a745;
}

.alert-error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 2px solid #dc3545;
}

/* Votaciones */
.votes-list {
    background: var(--card);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease 0.5s both;
}

.votes-list h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    color: var(--purple);
}

.vote-item {
    border-bottom: 2px solid #f0f0f0;
    padding: 1.2rem 0;
    transition: all 0.3s;
}

.vote-item:hover {
    background: #fafafa;
    border-radius: 8px;
    padding: 1.2rem;
    margin: 0 -0.5rem;
}

.vote-item:last-child { border-bottom: none; }

.vote-item .meta {
    font-size: .9rem;
    color: #666;
    margin-bottom: .4rem;
}

.vote-item .meta strong {
    color: var(--purple);
    font-weight: 700;
}

.vote-item .comment {
    font-style: italic;
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.5;
}

.vote-ip {
    display: inline-block;
    margin-left: .5rem;
    font-family: 'Courier New', monospace;
    font-size: .75rem;
    background: #f0f0f0;
    padding: .15rem .5rem;
    border-radius: 4px;
    color: #999;
}

.empty {
    color: #aaa;
    font-style: italic;
    text-align: center;
    padding: 2rem;
    font-size: 1.1rem;
}

/* Calendario */
.calendar-section {
    background: var(--card);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.calendar-section h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    text-align: center;
    color: var(--purple);
}

.calendar {
    max-width: 420px;
    margin: 0 auto;
}

.cal-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: .5rem;
    text-align: center;
    font-weight: 800;
    color: var(--purple);
    font-size: .9rem;
    margin-bottom: .6rem;
    text-transform: uppercase;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: .5rem;
}

.cal-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    background: #f5f5f5;
    color: #bbb;
    transition: all 0.3s ease;
}

.cal-cell a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: var(--purple);
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.cal-cell a:hover {
    background: linear-gradient(135deg, var(--accent), var(--pink));
    color: #fff;
    transform: scale(1.15);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.cal-available {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
}

.cal-today {
    outline: 3px solid var(--accent);
    outline-offset: -3px;
    background: linear-gradient(135deg, #fff3e0, #ffe0b2) !important;
}

.cal-today.cal-available a {
    color: var(--accent);
}

footer {
    text-align: center;
    margin-top: 3rem;
    color: rgba(255,255,255,0.6);
    font-size: .9rem;
    padding: 1rem;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive */
@media (max-width: 480px) {
    header h1 { font-size: 2rem; }
    .portadas-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .day-nav { gap: .5rem; }
    .nav-link { padding: .5rem 1rem; font-size: .85rem; }
    .vote-section { padding: 1.5rem; }
    .vote-section h2 { font-size: 1.4rem; }
    .vote-form button { padding: .9rem 2rem; font-size: 1rem; }
}
