/* ==========================================================================
   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: #0b0f19;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    --primary: #8b5cf6;       /* Violeta */
    --primary-glow: rgba(139, 92, 246, 0.4);
    --secondary: #06b6d4;     /* Cyan */
    --secondary-glow: rgba(6, 182, 212, 0.4);
    
    --text-main: #f3f4f6;     /* Blanco grisáceo */
    --text-muted: #9ca3af;    /* Gris atenuado */
    
    --success: #10b981;       /* Esmeralda */
    --success-glow: rgba(16, 185, 129, 0.2);
    --danger: #ef4444;        /* Coral/Rojo */
    --danger-glow: rgba(239, 68, 68, 0.2);
    --warning: #f59e0b;       /* Ámbar */
    
    /* Gradientes */
    --gradient-hero: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    --gradient-glow: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
    --gradient-dark: radial-gradient(circle at 50% 50%, #1e1b4b 0%, #0b0f19 100%);
    
    /* Efectos */
    --glass-blur: blur(16px);
    --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    
    --transition: all 0.3s 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: 8px;
}
::-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 80px 24px;
}

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

.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(-4px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

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

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

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

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

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 15px var(--danger-glow);
}

.btn-danger:hover {
    transform: translateY(-2px);
    background: #dc2626;
}

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

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

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

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

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 16px center;
    background-size: 18px;
    padding-right: 40px;
}

/* Grid para seleccionar varios colegas */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.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: 10px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

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

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


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

header {
    background: rgba(11, 15, 25, 0.7);
    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: 16px 24px;
}

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

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

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

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

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

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


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

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

.countdown-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(6,182,212,0.08) 0%, rgba(0,0,0,0) 70%);
    pointer-events: none;
}

.countdown-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

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

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

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

.clock-item {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    min-width: 90px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 16px rgba(0,0,0,0.25);
    animation: countdownPulse 2s infinite ease-in-out;
}

.clock-item:nth-child(2) { animation-delay: 0.3s; }
.clock-item:nth-child(3) { animation-delay: 0.6s; }
.clock-item:nth-child(4) { animation-delay: 0.9s; }

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

.clock-label {
    font-size: 0.75rem;
    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.03); border-color: rgba(139, 92, 246, 0.3); }
}


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

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

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

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


/* ==========================================================================
   SECCIÓN 1: INICIO / BLOG
   ========================================================================== */

.blog-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

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

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

.blog-post {
    padding: 30px;
}

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

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

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-family: 'Outfit', sans-serif;
}

.author-info h4 {
    font-size: 1rem;
}

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

.post-tag {
    background: rgba(6, 182, 212, 0.15);
    color: var(--secondary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.post-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin: 16px 0;
    border: 1px solid var(--border-light);
}

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

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

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

/* Sidebar del Blog */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    padding: 24px;
}

.widget-title {
    font-size: 1.1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
}

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

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

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

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


/* ==========================================================================
   SECCIÓN 2: VIAJE A TENERIFE Y TRICOUNT
   ========================================================================== */

.trip-hero {
    height: 350px;
    border-radius: var(--radius-lg);
    background-image: linear-gradient(rgba(0,0,0,0.1), rgba(11,15,25,0.9)), url('tenerife_hero.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 40px;
    margin-bottom: 30px;
    border: 1px solid var(--border-light);
}

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

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

.trip-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 12px;
}

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

.trip-tab-btn.active {
    color: white;
    background: var(--gradient-glow);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

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

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

/* Grid Tenerife */
.trip-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.info-card {
    padding: 24px;
}

.info-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

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

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

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

.expense-list-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 8px;
    margin-top: 16px;
}

.expense-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

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

.expense-info h4 {
    font-size: 1rem;
    font-weight: 600;
}

.expense-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.expense-amount {
    text-align: right;
}

.expense-val {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
}

.expense-by {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.delete-expense-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    margin-left: 10px;
    border-radius: 50%;
    transition: var(--transition);
}

.delete-expense-btn:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Balances y Cuentas */
.balance-section-title {
    font-size: 1.1rem;
    margin-top: 24px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.balance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

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

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

.balance-card.negative {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.03);
}

.balance-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.balance-val {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    margin-top: 4px;
}

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

/* Transferencias para saldar deudas */
.transfers-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

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

.transfer-debtor { font-weight: 700; color: var(--danger); }
.transfer-arrow { color: var(--text-muted); font-size: 1.1rem; }
.transfer-creditor { font-weight: 700; color: var(--success); }

.transfer-amount {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: white;
    background: var(--gradient-hero);
    padding: 4px 12px;
    border-radius: 20px;
}


/* ==========================================================================
   SECCIÓN 3: MINIJUEGOS (TRIVIA)
   ========================================================================== */

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

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

.trivia-main-card {
    padding: 40px;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.trivia-main-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(139,92,246,0.1) 0%, rgba(0,0,0,0) 70%);
    pointer-events: none;
}

/* Estados de Trivia */
.trivia-state {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    animation: fadeIn 0.3s ease-out;
}

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

/* Pantalla Inicio Trivia */
.trivia-start-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

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

.trivia-subtitle {
    color: var(--text-muted);
    margin-bottom: 24px;
    max-width: 500px;
}

/* Pantalla de Pregunta Activa */
.quiz-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.quiz-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    margin-bottom: 30px;
    overflow: hidden;
}

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

.quiz-question {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: left;
    width: 100%;
}

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

.quiz-option-btn {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-light);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: inherit;
    font-weight: 500;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.quiz-option-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.08);
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.quiz-option-btn:disabled {
    cursor: not-allowed;
}

/* Clases de feedback para opciones */
.quiz-option-btn.correct {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--success);
    color: white;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.quiz-option-btn.incorrect {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--danger);
    color: white;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* Pantalla Resultados */
.result-score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--gradient-glow);
    border: 3px solid var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: 0 0 20px var(--primary-glow);
}

.result-score-val {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.result-score-total {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 4px;
}

/* Creador de preguntas */
.trivia-sidebar-card {
    padding: 30px;
}


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

footer {
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--border-light);
    padding: 40px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 80px;
}

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

/* ==========================================================================
   ESTILOS DE AVATARES Y FOTOS DE PERFIL (AVATARS)
   ========================================================================== */

.avatar-img {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-light);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: inline-block;
    transition: var(--transition);
}

.avatar-placeholder {
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-light);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    font-family: 'Outfit', sans-serif;
    transition: var(--transition);
}

/* Tamaños */
.avatar-img.mini, .avatar-placeholder.mini {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
}

.avatar-img.small, .avatar-placeholder.small {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
}

.avatar-img.medium, .avatar-placeholder.medium {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
}

.avatar-img.large, .avatar-placeholder.large {
    width: 60px;
    height: 60px;
    font-size: 1.4rem;
}

/* ==========================================================================
   DISEÑO RESPONSIVO MÓVIL (MOBILE OPTIMIZATIONS)
   ========================================================================== */

@media (max-width: 600px) {
    /* Ajustes generales del contenedor */
    .container {
        padding: 0 16px 40px 16px;
    }

    /* Navegación Móvil */
    .nav-container {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
        text-align: center;
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav-menu {
        width: 100%;
        justify-content: center;
        gap: 4px;
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 8px 12px;
        gap: 4px;
    }

    /* Banner Cuenta Atrás */
    .countdown-banner {
        padding: 20px 16px;
        margin-bottom: 24px;
    }

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

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

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

    .clock-label {
        font-size: 0.65rem;
    }

    /* Banner Hero Tenerife */
    .trip-hero {
        height: 220px;
        padding: 20px;
        margin-bottom: 20px;
        border-radius: var(--radius-md);
    }

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

    .trip-hero-content p {
        font-size: 0.9rem;
    }

    /* Pestañas de Viaje */
    .trip-tabs {
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
        padding-bottom: 8px;
    }

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

    /* Tricount y Gastos */
    .tricount-card {
        padding: 16px;
    }

    .expense-item {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .expense-item > div:last-child {
        width: 100%;
        justify-content: space-between;
        border-top: 1px dashed var(--border-light);
        padding-top: 8px;
    }

    .expense-amount {
        text-align: left;
    }

    /* Transferencias resolutivas */
    .transfer-item {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .transfer-amount {
        align-self: flex-end;
    }

    /* Trivia y Minijuegos */
    .trivia-main-card {
        padding: 20px;
        min-height: auto;
    }

    .quiz-question {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }

    .quiz-option-btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .result-score-circle {
        width: 120px;
        height: 120px;
    }

    .result-score-val {
        font-size: 2.5rem;
    }

    /* Creador de Preguntas */
    .trivia-sidebar-card {
        padding: 20px;
    }
}

/* ==========================================================================
   SISTEMA DE MODAL (EDITAR POSTS) Y ACCIONES DE CABECERA
   ========================================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 18, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

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

.post-header-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.post-header-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-color);
    transform: translateY(-2px);
}

.post-header-btn.delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

/* ==========================================================================
   CARRUSEL DE FOTOS
   ========================================================================== */
.photo-carousel-card {
    padding: 24px;
}

.carousel-container {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.carousel-container::-webkit-scrollbar {
    display: none;
}

.photo-item {
    min-width: 200px;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

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

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

.photo-item .photo-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    padding: 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    font-size: 0.8rem;
}

/* ==========================================================================
   TABLÓN DE PLANNING (VIAJE)
   ========================================================================== */
.planning-board {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
}

.planning-day-col {
    min-width: 220px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    padding: 12px;
}

.planning-day-header {
    text-align: center;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.planning-day-header h4 {
    margin: 0;
    color: var(--primary);
}

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

.planning-proposals {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.proposal-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.proposal-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

.proposal-author {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 4px;
}

.proposal-content {
    font-size: 0.95rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.proposal-actions {
    display: flex;
    gap: 8px;
}

.vote-btn {
    flex: 1;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 4px;
    padding: 4px 0;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

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

.add-proposal-btn {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
    border: 1px dashed rgba(139, 92, 246, 0.4);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-weight: bold;
    transition: all 0.2s;
}

.add-proposal-btn:hover {
    background: rgba(139, 92, 246, 0.2);
}

@media (max-width: 1024px) {
    .planning-board {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .planning-board {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .planning-board {
        grid-template-columns: 1fr;
    }
}
