/* static/css/style.css */

/* --- Variables (Optional - using Bootstrap defaults mostly) --- */
:root {
    --primary-color: #0d6efd; /* Bootstrap Primary */
    --secondary-color: #6c757d; /* Bootstrap Secondary */
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #343a40;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --navbar-height: 56px; /* Match Bootstrap's default */
}

/* --- Global Styles --- */
body {
    padding-top: var(--navbar-height); /* Adjust if navbar height changes */
    background-color: var(--light-gray); /* Light background for contrast */
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* Bootstrap 5 font stack */
    color: #212529; /* Default text color */
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 500; /* Slightly bolder headings */
}

a {
    /* color: var(--primary-color); */ /* Already default */
    text-decoration: none; /* Remove underlines by default */
    transition: color 0.2s ease-in-out;
}

a:hover {
   /* color: darken(var(--primary-color), 10%); */ /* Handled by Bootstrap */
   text-decoration: underline; /* Add underline on hover */
}

/* --- Navbar --- */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
}

/* Adjust dropdown menu style if needed */
.dropdown-menu {
     box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
     border-radius: 0.375rem; /* Match Bootstrap's default */
}

/* --- Cards --- */
.card {
    border: none; /* Remove default border */
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    margin-bottom: 1.5rem; /* Consistent spacing */
    border-radius: 0.5rem; /* Slightly more rounded */
}

.card:hover {
   transform: translateY(-5px); /* Lift effect on hover */
   box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.card-header {
    background-color: var(--medium-gray); /* Lighter header */
    border-bottom: 1px solid #dee2e6;
    font-weight: 500;
}

.card-title {
    margin-bottom: 1rem; /* Spacing below title */
}

/* Specific Card Styles (e.g., Dashboard Stats) */
.dashboard-stat-card .card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-stat-card .stat-icon {
    font-size: 3rem;
    opacity: 0.6;
}

/* --- Tables --- */
.table {
    margin-bottom: 0; /* Remove default margin when inside card */
}

.table thead th {
    background-color: var(--dark-gray);
    color: white;
    border-color: #495057; /* Darker border for header */
    vertical-align: middle;
}

.table tbody td {
    vertical-align: middle;
}

/* Styles for action buttons in tables */
.table-actions form,
.table-actions a {
    display: inline-block;
    margin-left: 5px;
    vertical-align: middle;
}
.table-actions .btn-sm {
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
}

/* Style for delete warning text */
.delete-warning {
    font-size: 0.8em;
    color: var(--bs-danger);
    margin-left: 5px;
    font-style: italic;
    vertical-align: middle;
}

/* --- Forms --- */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #86b7fe; /* Bootstrap focus color */
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* Bootstrap focus shadow */
}

/* --- Buttons --- */
.btn {
    border-radius: 0.375rem; /* Match card/input radius */
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    padding: 0.5rem 1rem; /* Slightly larger padding */
    font-weight: 500;
}

.btn i {
    margin-right: 0.3rem; /* Space between icon and text */
    vertical-align: middle; /* Align icons better */
}

/* --- Footer --- */
.footer {
    background-color: var(--medium-gray);
    padding: 1.5rem 0;
    margin-top: 3rem;
    font-size: 0.9em;
    color: var(--secondary-color);
    border-top: 1px solid #dee2e6;
}

/* --- Alerts / Flash Messages --- */
.alert {
     margin-top: 1rem;
     margin-bottom: 1rem;
     border-radius: 0.375rem;
     /* Dismiss button won't work without JS */
}

/* --- Specific Page Styles --- */

/* Quiz Attempt Page */
.question-card .card-header {
    background-color: white;
    font-size: 1.1rem;
}
.question-card .options-list .form-check {
    padding: 0.75rem 1.25rem;
    border: 1px solid #eee;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem !important;
    transition: background-color 0.2s ease;
}
.question-card .options-list .form-check:hover {
    background-color: #f8f9fa;
}
.question-card .options-list .form-check-input {
    margin-top: 0.2em; /* Align radio button better */
    margin-right: 0.75rem;
}

/* User History Progress Bar */
.progress {
     background-color: var(--medium-gray); /* Background for the track */
}
.progress-bar {
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
    font-size: 0.85em;
    /* Colors are handled by Bootstrap classes based on percentage */
}

/* Analytics page stat cards */
.analytics-stat-card .card-body {
    padding: 0.8rem;
}
.analytics-stat-card .stat-label {
    font-size: 0.9rem;
    color: var(--secondary-color);
}
.analytics-stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--dark-gray);
}


/* --- Responsive Adjustments (Example) --- */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }
    .table-actions form,
    .table-actions a {
        margin-left: 2px; /* Slightly less space on small screens */
    }
    .delete-warning {
        display: none; /* Hide text warning on very small screens */
    }
    .footer {
         margin-top: 2rem;
         padding: 1rem 0;
    }
}