/* Estilos comunes para templates públicos de quiz y otros templates restantes */

/* ===== VARIABLES CSS COMUNES ===== */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --danger-color: #dc3545;
    --dark-bg: #1a1a1a;
    --card-bg: #2a2a2a;
    --card-hover: #333333;
    --border-color: #404040;
    --text-primary: #ffffff;
    --text-muted: #b0b0b0;
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --border-radius: 15px;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* ===== ESTILOS BASE PARA TEMPLATES PÚBLICOS ===== */
.public-container {
    padding: 2rem 0;
}

.public-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin-bottom: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.public-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}

.public-card * {
    position: relative;
    z-index: 1;
}

.public-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* ===== ESTILOS PARA TARJETAS DE LIBROS ===== */
.book-card {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    border-radius: var(--border-radius);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow);
    transition: var(--transition);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.book-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}

.book-card * {
    position: relative;
    z-index: 1;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.book-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.book-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
    font-size: 1.5rem;
}

.book-info {
    flex: 1;
}

.book-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.book-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.book-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.book-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #666;
}

.book-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ===== ESTILOS PARA BOTONES PÚBLICOS ===== */
.public-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: var(--transition);
}

.public-btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.public-btn-quick-quiz {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.public-btn-quick-quiz:hover {
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    color: white;
}

.public-btn-full-quiz {
    background: linear-gradient(135deg, var(--success-color), #20c997);
    color: white;
}

.public-btn-full-quiz:hover {
    box-shadow: 0 10px 20px rgba(40, 167, 69, 0.3);
    color: white;
}

.public-btn span {
    font-weight: 600;
}

.public-btn small {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 400;
}

/* ===== ESTILOS PARA SECCIONES GENERALES ===== */
.general-quiz-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
}

.general-quiz-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    border: 3px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
    color: white;
    position: relative;
    overflow: hidden;
}

.general-quiz-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}

.general-quiz-card * {
    position: relative;
    z-index: 1;
}

.general-quiz-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.4);
}

.quiz-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    color: white;
    margin: -1rem -1rem 1.5rem -1rem;
}

.quiz-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    color: white;
    font-size: 2rem;
    backdrop-filter: blur(10px);
}

/* ===== ESTILOS PARA RESULTADOS PÚBLICOS ===== */
.public-score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.public-score-number {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
}

.public-score-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.public-stat-card {
    text-align: center;
    padding: 1.5rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.public-stat-card:hover {
    transform: translateY(-5px);
}

.public-stat-icon {
    margin-bottom: 1rem;
}

.public-stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.public-stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

/* ===== ESTILOS PARA TEMA OSCURO ===== */
.dark-theme {
    background: var(--dark-bg) !important;
}

.dark-theme .container {
    background: var(--dark-bg) !important;
}

.dark-theme .card {
    background: linear-gradient(145deg, var(--card-bg), #252525) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 15px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
    color: var(--text-primary) !important;
    transition: var(--transition);
}

.dark-theme .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5) !important;
    background: linear-gradient(145deg, var(--card-hover), #303030) !important;
}

.dark-theme .card-header {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.dark-theme .text-muted {
    color: var(--text-muted) !important;
}

.dark-theme .text-primary {
    color: var(--accent-primary) !important;
}

.dark-theme .text-success {
    color: var(--success-color) !important;
}

.dark-theme .text-warning {
    color: var(--warning-color) !important;
}

.dark-theme .text-info {
    color: var(--info-color) !important;
}

.dark-theme .btn {
    border-radius: 10px !important;
    font-weight: 600 !important;
    transition: var(--transition) !important;
}

.dark-theme .btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3) !important;
}

.dark-theme .btn-outline-primary {
    border-color: var(--accent-primary) !important;
    color: var(--accent-primary) !important;
}

.dark-theme .btn-outline-primary:hover {
    background: var(--accent-primary) !important;
    color: var(--text-primary) !important;
}

.dark-theme .btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)) !important;
    border: none !important;
    color: var(--text-primary) !important;
}

.dark-theme .btn-success {
    background: var(--success-color) !important;
    border: none !important;
    color: var(--text-primary) !important;
}

.dark-theme .btn-warning {
    background: var(--warning-color) !important;
    border: none !important;
    color: var(--text-primary) !important;
}

.dark-theme .btn-info {
    background: var(--info-color) !important;
    border: none !important;
    color: var(--text-primary) !important;
}

.dark-theme .hover-card {
    transition: var(--transition);
}

.dark-theme .hover-card:hover {
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5) !important;
}

/* ===== ESTILOS PARA PREGUNTAS PÚBLICAS - CONSISTENTES CON INDEX.HTML ===== */
.public-question-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
    transition: var(--transition);
    padding: 1.5rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.public-question-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 181, 246, 0.15);
    background: rgba(255, 255, 255, 0.1);
}

.public-question-card.selected {
    border-color: var(--accent-blue);
    box-shadow: 0 4px 12px rgba(100, 181, 246, 0.2);
    background: rgba(100, 181, 246, 0.2);
}

/* ===== ESTILOS PARA ANALYTICS - CONSISTENTES CON INDEX.HTML ===== */
.analytics-public-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
    transition: var(--transition);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.analytics-public-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(100, 181, 246, 0.15);
    background: rgba(255, 255, 255, 0.1);
}

/* ===== ESTILOS PARA HISTORIAL - CONSISTENTES CON INDEX.HTML ===== */
.history-public-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.history-public-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(100, 181, 246, 0.15);
    background: rgba(255, 255, 255, 0.1);
}

/* ===== RESPONSIVE - IDÉNTICO A INDEX.HTML ===== */
@media (max-width: 768px) {
    .public-card {
        margin-bottom: 1rem;
    }
    
    .book-card {
        margin-bottom: 1rem;
    }
    
    .book-actions {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .public-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .quiz-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-right: 1rem;
    }
    
    .public-score-circle {
        width: 120px;
        height: 120px;
    }
    
    .public-score-number {
        font-size: 1.5rem;
    }
    
    .book-title {
        font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    }
    
    .public-score-number {
        font-size: clamp(1.3rem, 3vw, 1.8rem);
    }
}

/* Media queries específicas para orientación */
@media (max-width: 768px) and (orientation: landscape) {
    .public-card {
        padding: 1.5rem;
    }
    
    .book-card {
        padding: 1.25rem;
    }
    
    .book-title {
        font-size: clamp(1rem, 2.2vw, 1.3rem);
    }
    
    .public-score-number {
        font-size: clamp(1.2rem, 2.8vw, 1.6rem);
    }
}

@media (max-width: 480px) and (orientation: landscape) {
    .public-card {
        padding: 1rem;
    }
    
    .book-card {
        padding: 1rem;
    }
    
    .book-title {
        font-size: clamp(0.9rem, 2vw, 1.2rem);
    }
    
    .public-score-number {
        font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    }
}

@media (max-width: 480px) and (orientation: portrait) {
    .public-card {
        padding: 1.25rem;
    }
    
    .book-card {
        padding: 1.25rem;
    }
    
    .book-title {
        font-size: clamp(1rem, 2.3vw, 1.3rem);
    }
    
    .public-score-number {
        font-size: clamp(1.2rem, 2.7vw, 1.5rem);
    }
}

/* ===== ANIMACIONES ===== */
.public-fade-in {
    animation: publicFadeIn 0.5s ease-in-out;
}

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

.public-slide-in {
    animation: publicSlideIn 0.5s ease-in-out;
}

@keyframes publicSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
} 