/* Civic Sense Scorer - Custom Styles */

/* Root Variables */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --font-family: 'Poppins', sans-serif;
}

/* Base Styles */
body {
    font-family: var(--font-family);
    background-color: #f8f9fa;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
}

/* Main Content */
.main-content {
    padding-top: 76px; /* Account for fixed navbar */
    min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: calc(100vh - 76px);
    padding-top: 2rem;
}

.hero-illustration {
    position: relative;
}

.placeholder-illustration {
    padding: 3rem;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 20px;
}

/* Stat Cards */
.stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

/* Feature Icons */
.feature-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Category Cards */
.category-card {
    transition: all 0.3s ease;
    cursor: default;
}

.category-card:hover {
    background-color: #e9ecef !important;
    transform: translateY(-2px);
}

/* Cards */
.card {
    border-radius: 12px;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* Quiz Styles */
.quiz-icon {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Option Buttons */
.option-btn {
    text-align: left;
    padding: 1rem 1.25rem;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.option-btn:hover {
    border-color: var(--primary-color);
    background-color: #f8f9fa;
}

.option-btn.selected {
    border-color: var(--primary-color);
    background-color: #e7f1ff;
}

.option-btn.correct {
    border-color: var(--success-color);
    background-color: #d1e7dd;
}

.option-btn.incorrect {
    border-color: var(--danger-color);
    background-color: #f8d7da;
}

.option-btn .option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #e9ecef;
    margin-right: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.option-btn.selected .option-letter {
    background-color: var(--primary-color);
    color: white;
}

.option-btn.correct .option-letter {
    background-color: var(--success-color);
    color: white;
}

.option-btn.incorrect .option-letter {
    background-color: var(--danger-color);
    color: white;
}

/* Progress Bar */
.progress {
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.5s ease;
}

/* Score Circle */
.score-circle {
    position: relative;
    width: 200px;
    height: 200px;
}

.score-circle .score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.score-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-ring-progress {
    stroke: var(--primary-color);
    transition: stroke-dasharray 1s ease;
}

/* Level Badges */
.badge.level-excellent {
    background-color: var(--success-color);
}

.badge.level-good {
    background-color: #20c997;
}

.badge.level-average {
    background-color: var(--warning-color);
    color: #212529;
}

.badge.level-needs_improvement {
    background-color: #fd7e14;
}

.badge.level-poor {
    background-color: var(--danger-color);
}

/* Tables */
.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* Footer */
.footer {
    background: linear-gradient(to bottom, #343a40, #212529);
}

.footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--primary-color) !important;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-lg {
    padding: 0.8rem 1.8rem;
}

.btn-primary {
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
    transform: translateY(-2px);
}

/* Accordion */
.accordion-button:not(.collapsed) {
    background-color: #e7f1ff;
    color: var(--primary-color);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(13, 110, 253, 0.25);
}

/* Feedback Modal */
#feedbackModal .modal-content {
    border-radius: 15px;
    border: none;
}

.feedback-icon-success {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #d1e7dd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.feedback-icon-success i {
    font-size: 2.5rem;
    color: var(--success-color);
}

.feedback-icon-partial {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #fff3cd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.feedback-icon-partial i {
    font-size: 2.5rem;
    color: var(--warning-color);
}

.feedback-icon-incorrect {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #f8d7da;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.feedback-icon-incorrect i {
    font-size: 2.5rem;
    color: var(--danger-color);
}

/* Category Breakdown */
.category-bar {
    height: 30px;
    border-radius: 5px;
    background-color: #e9ecef;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.category-bar-fill {
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 10px;
    color: white;
    font-weight: 500;
    font-size: 0.85rem;
    transition: width 0.5s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }
    
    .hero-section .d-flex {
        justify-content: center;
    }
    
    .score-circle {
        width: 150px;
        height: 150px;
    }
    
    .score-circle .score-value {
        font-size: 2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Print Styles */
@media print {
    .navbar, .footer, .btn {
        display: none !important;
    }
    
    .main-content {
        padding-top: 0;
    }
}
