/* ==========================================================================
   SISTEMA DE DISEÑO - WEB DE COLEGAS (style.css)
   ========================================================================== */

/* Importar tipografías premium */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* Paleta de colores Premium */
    --bg-dark: #070913;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    
    --primary: #a78bfa;       /* Violeta */
    --primary-glow: rgba(167, 139, 250, 0.3);
    --secondary: #14b8a6;     /* Turquesa */
    --secondary-glow: rgba(20, 184, 166, 0.3);
    
    --text-main: #f3f4f6;     /* Blanco grisáceo */
    --text-muted: #9ca3af;    /* Gris atenuado */
    
    --success: #10b981;       /* Verde Esmeralda */
    --success-glow: rgba(16, 185, 129, 0.15);
    --danger: #f87171;        /* Rojo Coral */
    --danger-glow: rgba(248, 113, 113, 0.15);
    --warning: #fbbf24;       /* Ámbar */
    
    /* Gradientes */
    --gradient-hero: linear-gradient(135deg, #a78bfa 0%, #14b8a6 100%);
    --gradient-glow: linear-gradient(135deg, rgba(167, 139, 250, 0.12) 0%, rgba(20, 184, 166, 0.12) 100%);
    --gradient-dark: radial-gradient(circle at 50% 50%, #111029 0%, #070913 100%);
    
    /* Efectos */
    --glass-blur: blur(18px);
    --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 8px;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset de estilos básicos */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
}

body {
    min-height: 100vh;
    background: var(--gradient-dark);
    background-attachment: fixed;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==========================================================================
   COMPONENTES GLOBALES Y CONTENEDORES
   ========================================================================== */

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

.main-layout {
    display: grid;
    grid-template-columns: 2.3fr 1fr;
    gap: 28px;
    align-items: start;
    margin-top: 10px;
}

@media (max-width: 950px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.text-gradient {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Tarjetas Estilo Glassmorphism */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-main);
    transition: var(--transition);
}

.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 35px 0 rgba(0, 0, 0, 0.55);
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-size: 0.90rem;
    color: var(--text-main);
}

.btn-primary {
    background: var(--gradient-hero);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(167, 139, 250, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

.btn-danger {
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.btn-danger:hover {
    background: rgba(248, 113, 113, 0.25);
    transform: translateY(-1px);
}

/* Inputs de Formulario */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-light);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
    background: rgba(0, 0, 0, 0.45);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 36px;
}

/* Grid para checkboxes de colegas */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-top: 6px;
}

.checkbox-btn {
    display: block;
    position: relative;
    cursor: pointer;
    user-select: none;
}

.checkbox-btn input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-btn .checkmark {
    display: block;
    padding: 8px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.checkbox-btn:hover .checkmark {
    background: rgba(255, 255, 255, 0.08);
}

.checkbox-btn input:checked ~ .checkmark {
    background: var(--gradient-glow);
    border-color: var(--primary);
    color: var(--text-main);
    box-shadow: 0 0 8px rgba(167, 139, 250, 0.25);
}


/* ==========================================================================
   CABECERA, LOGO Y MENÚ
   ========================================================================== */

header {
    background: rgba(7, 9, 19, 0.75);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo span {
    font-family: 'Outfit', sans-serif;
}

.nav-menu {
    display: flex;
    gap: 6px;
    list-style: none;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
    background: var(--gradient-glow);
    border: 1px solid rgba(167, 139, 250, 0.25);
    color: var(--primary);
}


/* ==========================================================================
   BANNER CUENTA ATRÁS
   ========================================================================== */

.countdown-banner {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.75)), var(--gradient-glow);
    border-bottom: 1px solid var(--border-light);
    padding: 24px;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.countdown-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.countdown-title {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.countdown-title span {
    color: var(--secondary);
    font-weight: 800;
}

.countdown-clock {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.clock-item {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    min-width: 80px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: countdownPulse 2.5s infinite ease-in-out;
}

.clock-item:nth-child(2) { animation-delay: 0.4s; }
.clock-item:nth-child(3) { animation-delay: 0.8s; }
.clock-item:nth-child(4) { animation-delay: 1.2s; }

.clock-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.15);
}

.clock-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

@keyframes countdownPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); border-color: rgba(167, 139, 250, 0.25); }
}


/* ==========================================================================
   SECCIONES Y ENRUTADOR SPA
   ========================================================================== */

.app-section {
    display: none;
    animation: fadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-section.active {
    display: block;
}

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


/* ==========================================================================
   SECCIÓN: VIAJE (TRICOUNT & PLANNING & DOCS)
   ========================================================================== */

.trip-hero {
    height: 250px;
    border-radius: var(--radius-lg);
    background-image: linear-gradient(rgba(0,0,0,0.1), rgba(7,9,19,0.92)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="800" height="400" viewBox="0 0 800 400"><rect width="100%" height="100%" fill="%230c0c1b"/><circle cx="400" cy="-200" r="600" fill="%231a153b" opacity="0.4"/><path d="M-100 350 C200 250, 400 450, 900 320 L900 400 L-100 400 Z" fill="%23152535" opacity="0.3"/><path d="M-100 380 C300 280, 500 420, 900 360 L900 400 L-100 400 Z" fill="%2312384a" opacity="0.2"/></svg>');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 30px;
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
}

.trip-hero-content h2 {
    font-size: 2rem;
    margin-bottom: 4px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.trip-hero-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.trip-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
    flex-wrap: wrap;
}

.trip-tab-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 30px;
    transition: var(--transition);
}

.trip-tab-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
}

.trip-tab-btn.active {
    color: white;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.2) 0%, rgba(20, 184, 166, 0.2) 100%);
    border: 1px solid var(--primary);
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.25);
}

.trip-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.trip-tab-content.active {
    display: block;
}

/* Tricount Layout */
.tricount-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 24px;
}

@media (max-width: 850px) {
    .tricount-grid {
        grid-template-columns: 1fr;
    }
}

.tricount-card {
    padding: 24px;
    height: fit-content;
}

.expense-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 4px;
}

.expense-item {
    display: flex;
    flex-direction: column;
    padding: 14px;
    background: rgba(255,255,255,0.01);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: var(--transition);
    gap: 10px;
}

.expense-item:hover {
    background: rgba(255,255,255,0.03);
    border-color: var(--border-hover);
}

.delete-expense-btn:hover {
    color: var(--danger);
}

/* Balances y Cuentas */
.balance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.balance-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px 6px;
    text-align: center;
    transition: var(--transition);
}

.balance-card.positive {
    background: rgba(16, 185, 129, 0.03);
    border-color: rgba(16, 185, 129, 0.2);
}

.balance-card.positive .balance-val {
    color: var(--success);
}

.balance-card.negative {
    background: rgba(248, 113, 113, 0.03);
    border-color: rgba(248, 113, 113, 0.2);
}

.balance-card.negative .balance-val {
    color: var(--danger);
}

.balance-name {
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.balance-val {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
}

/* Lista de Transferencias */
.transfers-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.transfer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    flex-wrap: wrap;
    gap: 8px;
}

.transfer-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.transfer-amount {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary);
}


/* ==========================================================================
   TABLÓN DE PLANNING POR DÍAS
   ========================================================================== */

.planning-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

@media (max-width: 600px) {
    .planning-board {
        grid-template-columns: 1fr;
    }
}

.planning-day-col {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 380px;
    height: fit-content;
}

.planning-day-header {
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.planning-day-header h4 {
    font-size: 1rem;
    color: #fff;
}

.planning-day-header span {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.planning-proposals {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    overflow-y: auto;
    min-height: 100px;
}

.proposal-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: var(--transition);
}

.proposal-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
}

.proposal-author {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.proposal-content {
    font-size: 0.85rem;
    color: var(--text-main);
    white-space: pre-wrap;
}

.proposal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 4px;
}

.vote-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-main);
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.vote-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

.add-proposal-btn {
    width: 100%;
    background: rgba(167, 139, 250, 0.1);
    border: 1px dashed rgba(167, 139, 250, 0.3);
    color: var(--primary);
    padding: 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: var(--transition);
    text-align: center;
}

.add-proposal-btn:hover {
    background: rgba(167, 139, 250, 0.18);
    border-color: var(--primary);
}


/* ==========================================================================
   SECCIÓN: DOCUMENTOS COMPARTIDOS
   ========================================================================== */

.documentos-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}

@media (max-width: 850px) {
    .documentos-layout {
        grid-template-columns: 1fr;
    }
}

.document-list-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.document-group-card {
    padding: 18px;
}

.document-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}


/* ==========================================================================
   SECCIÓN: BLOG / ANUNCIOS
   ========================================================================== */

.blog-feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.blog-post {
    padding: 24px;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
}

.author-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.post-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-tag {
    background: rgba(20, 184, 166, 0.12);
    color: var(--secondary);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid rgba(20, 184, 166, 0.2);
}

.post-header-btn {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: var(--transition);
}

.post-header-btn:hover {
    color: white;
    background: rgba(255,255,255,0.08);
}

.post-header-btn.delete-btn:hover {
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger);
    border-color: rgba(248, 113, 113, 0.2);
}

.post-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.post-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.post-action-btn:hover {
    color: var(--primary);
}


/* ==========================================================================
   SECCIÓN: TRIVIA / JUEGO
   ========================================================================== */

.trivia-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .trivia-layout {
        grid-template-columns: 1fr;
    }
}

.trivia-main-card {
    padding: 30px;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.trivia-state {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.trivia-state.active {
    display: flex;
}

.trivia-start-icon {
    font-size: 4rem;
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.trivia-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 500px;
    line-height: 1.5;
}

.quiz-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 10px;
}

.quiz-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-top: -8px;
}

.quiz-progress-fill {
    height: 100%;
    background: var(--gradient-hero);
    width: 0%;
    transition: width 0.35s ease;
}

.quiz-question {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 16px 0;
    color: #fff;
}

.quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    max-width: 550px;
}

@media (max-width: 500px) {
    .quiz-options {
        grid-template-columns: 1fr;
    }
}

.quiz-option-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    color: var(--text-main);
    padding: 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.92rem;
    transition: var(--transition);
    text-align: center;
}

.quiz-option-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.quiz-option-btn.correct {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: var(--success) !important;
    color: #fff !important;
    box-shadow: 0 0 10px var(--success-glow);
}

.quiz-option-btn.incorrect {
    background: rgba(248, 113, 113, 0.15) !important;
    border-color: var(--danger) !important;
    color: #fff !important;
    box-shadow: 0 0 10px var(--danger-glow);
}

.result-score-circle {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--primary-glow);
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 12px;
}

.result-score-val {
    font-size: 2.8rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.result-score-total {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.trivia-aside {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.trivia-sidebar-card {
    padding: 20px;
}


/* ==========================================================================
   SIDEBAR LATERAL (EQUIPO & FOTOS)
   ========================================================================== */

.sidebar-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    padding: 20px;
}

.colega-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.colega-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255,255,255,0.015);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.colega-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
}

.status-indicator.offline {
    background: var(--text-muted);
    box-shadow: none;
}

/* Carrusel de fotos de barra lateral */
.photo-carousel-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.photo-carousel {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    padding: 4px 0;
    width: 100%;
}

.photo-carousel::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.photo-item {
    flex: 0 0 140px;
    height: 100px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-light);
    scroll-snap-align: start;
    transition: var(--transition);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.photo-item:hover img {
    transform: scale(1.08);
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    padding: 6px 8px;
    font-size: 0.65rem;
    color: white;
    pointer-events: none;
}

.carousel-control {
    position: absolute;
    background: rgba(7, 9, 19, 0.7);
    border: 1px solid var(--border-light);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
    z-index: 10;
    transition: var(--transition);
}

.carousel-control:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.carousel-control.prev { left: -8px; }
.carousel-control.next { right: -8px; }


/* ==========================================================================
   AVATARES Y INICIALES
   ========================================================================= */

.avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    text-transform: uppercase;
}

.avatar-placeholder.mini {
    width: 18px;
    height: 18px;
    font-size: 0.55rem;
}

.avatar-placeholder.small {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
}

.avatar-placeholder.medium {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
}

.avatar-placeholder.large {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
}


/* ==========================================================================
   MODALES Y CAPAS SUPERPUESTAS
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 9, 19, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
    animation: fadeInModal 0.25s ease-out;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #0f1224;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.7);
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleInModal 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleInModal {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Lightbox de Fotos */
.modal-overlay.lightbox {
    background: rgba(5, 6, 12, 0.95);
    padding: 0;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 250;
}

.lightbox-close:hover {
    color: white;
}

.lightbox-nav {
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    z-index: 210;
    transition: var(--transition);
}

.lightbox-nav:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.lightbox-nav.prev { left: 24px; }
.lightbox-nav.next { right: 24px; }

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 85vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.lightbox-info {
    margin-top: 14px;
    color: white;
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 600px) {
    .lightbox-nav {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    .lightbox-nav.prev { left: 10px; }
    .lightbox-nav.next { right: 10px; }
}


/* ==========================================================================
   PIE DE PÁGINA
   ========================================================================== */

footer {
    border-top: 1px solid var(--border-light);
    background: rgba(7, 9, 19, 0.8);
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 40px;
}

footer span {
    color: var(--primary);
    font-weight: 600;
}

/* ==========================================================================
   AVATAR IMAGES AND MOBILE RESPONSIVENESS ADDITIONS
   ========================================================================== */

.avatar-img {
    border-radius: 50%;
    object-fit: cover;
}
.avatar-img.mini {
    width: 18px;
    height: 18px;
}
.avatar-img.small {
    width: 24px;
    height: 24px;
}
.avatar-img.medium {
    width: 36px;
    height: 36px;
}
.avatar-img.large {
    width: 48px;
    height: 48px;
}

@media (max-width: 600px) {
    .container {
        padding: 0 12px 40px 12px;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
        text-align: center;
    }
    
    .logo {
        margin: 0 auto;
        font-size: 1.4rem;
    }
    
    .nav-menu {
        justify-content: center;
        width: 100%;
    }
    
    .nav-link {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .countdown-banner {
        padding: 16px 10px;
        margin-bottom: 20px;
    }

    .countdown-title {
        font-size: 0.9rem;
    }

    .countdown-clock {
        gap: 8px;
    }

    .clock-item {
        min-width: 62px;
        padding: 6px 8px;
    }

    .clock-value {
        font-size: 1.5rem;
    }

    .clock-label {
        font-size: 0.6rem;
        margin-top: 2px;
    }

    .trip-hero {
        height: 150px;
        padding: 16px;
        margin-bottom: 16px;
    }

    .trip-hero-content h2 {
        font-size: 1.35rem;
    }

    .trip-tabs {
        gap: 6px;
        margin-bottom: 16px;
        padding-bottom: 8px;
    }

    .trip-tab-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .tricount-card {
        padding: 16px;
    }

    .balance-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
    }

    .balance-card {
        padding: 8px 4px;
    }

    .balance-val {
        font-size: 0.85rem;
    }

    .planning-day-col {
        min-height: 280px;
        padding: 12px;
    }

    .trivia-main-card {
        padding: 20px 16px;
    }

    .quiz-question {
        font-size: 1.15rem;
    }

    .quiz-option-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

