/* ==========================================================================
   Quiz App - Custom Standalone Responsive Stylesheet (No External Dependencies)
   ========================================================================== */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-rgb: 99, 102, 241;
    
    --secondary: #64748b;
    --secondary-dark: #475569;
    --secondary-light: #94a3b8;
    
    --accent: #ec4899;
    --accent-light: #f472b6;
    
    --success: #10b981;
    --success-rgb: 16, 185, 129;
    
    --warning: #f59e0b;
    --warning-rgb: 245, 158, 11;
    
    --danger: #ef4444;
    --danger-rgb: 239, 68, 68;
    
    --info: #06b6d4;
    --info-rgb: 6, 182, 212;
    
    --dark-bg: #0b0f19;
    --body-bg: #0f172a;
    --card-bg: rgba(22, 30, 49, 0.95);
    --card-header-bg: rgba(30, 41, 69, 0.85);
    --input-bg: rgba(15, 23, 42, 0.9);
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-dark: #0f172a;
    
    --border-color: #334155;
    --border-light: rgba(255, 255, 255, 0.1);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background: linear-gradient(135deg, #0b0f19 0%, #111827 40%, #1e1b4b 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin-bottom: 1rem;
    color: inherit;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover {
    color: #a5b4fc;
    text-decoration: underline;
}

.lead {
    font-size: 1.15rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.small {
    font-size: 0.875rem;
}

.fs-1 { font-size: 2.25rem !important; }
.fs-2 { font-size: 1.75rem !important; }
.fs-3 { font-size: 1.5rem !important; }
.fs-4 { font-size: 1.25rem !important; }
.fs-5 { font-size: 1.1rem !important; }
.fs-6 { font-size: 0.95rem !important; }

.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-normal { font-weight: 400 !important; }

.text-light { color: #ffffff !important; }
.text-dark { color: var(--text-dark) !important; }
.text-primary { color: var(--primary-light) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: #f87171 !important; }
.text-info { color: var(--info) !important; }

.text-center { text-align: center !important; }
.text-start { text-align: start !important; }
.text-end { text-align: end !important; }

.opacity-75 { opacity: 0.75 !important; }
.opacity-50 { opacity: 0.5 !important; }

/* Icons */
.icon-filter {
    filter: brightness(0) invert(1);
    vertical-align: middle;
}

.brand-icon {
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.navbar-brand:hover .brand-icon {
    transform: rotate(12deg) scale(1.1);
}

/* Layout & Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 576px) {
    .container { padding-left: 1.25rem; padding-right: 1.25rem; }
}

@media (min-width: 992px) {
    .container { padding-left: 1.5rem; padding-right: 1.5rem; }
}

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

.row > * {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

.g-1 { margin-right: -0.25rem; margin-left: -0.25rem; }
.g-1 > * { padding-right: 0.25rem; padding-left: 0.25rem; margin-bottom: 0.5rem; }

.g-2 { margin-right: -0.5rem; margin-left: -0.5rem; }
.g-2 > * { padding-right: 0.5rem; padding-left: 0.5rem; margin-bottom: 1rem; }

.g-3 { margin-right: -0.75rem; margin-left: -0.75rem; }
.g-3 > * { padding-right: 0.75rem; padding-left: 0.75rem; margin-bottom: 1.5rem; }

.g-4 { margin-right: -1rem; margin-left: -1rem; }
.g-4 > * { padding-right: 1rem; padding-left: 1rem; margin-bottom: 2rem; }

.col-12 { flex: 0 0 auto; width: 100%; }
.col-6 { flex: 0 0 auto; width: 50%; }
.col-4 { flex: 0 0 auto; width: 33.333333%; }
.col-3 { flex: 0 0 auto; width: 25%; }

@media (min-width: 768px) {
    .col-md-3 { flex: 0 0 auto; width: 25%; }
    .col-md-4 { flex: 0 0 auto; width: 33.333333%; }
    .col-md-6 { flex: 0 0 auto; width: 50%; }
    .col-md-8 { flex: 0 0 auto; width: 66.666667%; }
    .col-md-10 { flex: 0 0 auto; width: 83.333333%; }
    .col-md-12 { flex: 0 0 auto; width: 100%; }
}

@media (min-width: 992px) {
    .col-lg-3 { flex: 0 0 auto; width: 25%; }
    .col-lg-4 { flex: 0 0 auto; width: 33.333333%; }
    .col-lg-5 { flex: 0 0 auto; width: 41.666667%; }
    .col-lg-6 { flex: 0 0 auto; width: 50%; }
    .col-lg-7 { flex: 0 0 auto; width: 58.333333%; }
    .col-lg-8 { flex: 0 0 auto; width: 66.666667%; }
    .col-lg-12 { flex: 0 0 auto; width: 100%; }
}

/* Flexbox Utilities */
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }
.d-inline { display: inline !important; }
.d-none { display: none !important; }

.flex-column { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }

.justify-content-start { justify-content: flex-start !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-between { justify-content: space-between !important; }

.align-items-start { align-items: flex-start !important; }
.align-items-center { align-items: center !important; }
.align-items-end { align-items: flex-end !important; }

.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }

/* Spacing Utilities */
.m-0 { margin: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 2.5rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 2.5rem !important; }
.mt-auto { margin-top: auto !important; }

.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-3 { margin-left: 1rem !important; }
.ms-auto { margin-left: auto !important; }

.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.me-auto { margin-right: auto !important; }

.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.my-1 { margin-top: 0.25rem !important; margin-bottom: 0.25rem !important; }
.my-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
.my-3 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
.my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
.my-5 { margin-top: 2.5rem !important; margin-bottom: 2.5rem !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 2.5rem !important; }

.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-5 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }

.pe-5 { padding-right: 2.5rem !important; }

.rounded { border-radius: var(--radius-md) !important; }
.rounded-circle { border-radius: var(--radius-full) !important; }
.border { border: 1px solid var(--border-color) !important; }
.border-0 { border: none !important; }
.border-secondary { border-color: var(--border-color) !important; }
.border-opacity-25 { border-color: var(--border-light) !important; }

.bg-black { background-color: #000000 !important; }
.bg-opacity-25 { background-color: rgba(0, 0, 0, 0.25) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--secondary) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-warning { background-color: var(--warning) !important; }
.bg-danger { background-color: var(--danger) !important; }
.bg-info { background-color: var(--info) !important; }

/* Sticky Navbar */
.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    background: rgba(11, 15, 25, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    padding: 0.75rem 0;
    width: 100%;
}

.navbar > .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.35rem;
    background: linear-gradient(135deg, #818cf8, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none !important;
}

.navbar-toggler {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    color: #ffffff;
    font-size: 1.25rem;
    line-height: 1;
    transition: background 0.2s ease;
}

.navbar-toggler:hover, .navbar-toggler:focus {
    background: rgba(255, 255, 255, 0.15);
    outline: none;
}

.navbar-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
}

.navbar-collapse {
    display: flex;
    flex-basis: auto;
    flex-grow: 1;
    align-items: center;
    justify-content: space-between;
}

.navbar-nav {
    display: flex;
    flex-direction: row;
    list-style: none;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.nav-link:hover, .nav-link:focus {
    background: rgba(99, 102, 241, 0.15);
    color: #ffffff;
}

.user-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0.35rem 0.85rem !important;
    color: #ffffff !important;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

.dropdown-toggle::after {
    content: " ▾";
    font-size: 0.8em;
    vertical-align: middle;
    margin-left: 0.25rem;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 10rem;
    padding: 0.5rem;
    margin-top: 0.35rem;
    font-size: 0.95rem;
    color: var(--text-primary);
    text-align: left;
    list-style: none;
    background-color: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
}

.dropdown-menu.dropdown-menu-end {
    right: 0;
    left: auto;
}

.dropdown-menu.show {
    display: block;
    animation: fadeInDropdown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    clear: both;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: inherit;
    text-decoration: none !important;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    cursor: pointer;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: rgba(99, 102, 241, 0.2);
    color: #ffffff;
}

.dropdown-item.active {
    background-color: var(--primary);
    color: #ffffff;
}

/* Mobile Navbar Collapsible Responsive Rules */
@media (max-width: 991.98px) {
    .navbar-toggler {
        display: block;
    }
    
    .navbar-collapse {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding-top: 1rem;
        margin-top: 0.5rem;
        border-top: 1px solid var(--border-color);
    }
    
    .navbar-collapse.show {
        display: flex;
        animation: fadeInDropdown 0.25s ease;
    }
    
    .navbar-nav {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.5rem;
    }
    
    .navbar-nav.me-auto {
        margin-bottom: 0.75rem !important;
    }
    
    .nav-link {
        padding: 0.65rem 1rem !important;
        width: 100%;
    }
    
    .dropdown-menu {
        position: static;
        width: 100%;
        margin-top: 0.25rem;
        box-shadow: none;
        background: rgba(15, 23, 42, 0.7);
    }
}

/* Cards */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: var(--card-bg);
    background-clip: border-box;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.card:hover {
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
}

.card-header {
    padding: 1rem 1.25rem;
    margin-bottom: 0;
    background-color: var(--card-header-bg);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: #ffffff;
}

.card-body {
    flex: 1 1 auto;
    padding: 1.5rem;
}

.card-title {
    margin-bottom: 0.75rem;
    color: #ffffff;
    font-weight: 700;
}

.card-text {
    color: var(--text-secondary);
}

/* Event & Question Cards */
.event-card {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.event-card .card-body {
    display: flex;
    flex-direction: column;
}

.event-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

.event-status.active {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.event-status.inactive {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.question-card {
    border-left: 4px solid var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none !important;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 42px;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
    color: #ffffff !important;
}

.btn-secondary {
    background: linear-gradient(135deg, #475569, #334155);
    border: 1px solid var(--border-color);
    color: #f8fafc !important;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #64748b, #475569);
    color: #ffffff !important;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff !important;
}

.btn-success:hover {
    background: linear-gradient(135deg, #34d399, #10b981);
    color: #ffffff !important;
}

.btn-info {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: #ffffff !important;
}

.btn-info:hover {
    background: linear-gradient(135deg, #22d3ee, #06b6d4);
    color: #ffffff !important;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #1e1b4b !important;
    font-weight: 700;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1e1b4b !important;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff !important;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: #ffffff !important;
}

.btn-outline-danger {
    color: #f87171 !important;
    border-color: rgba(239, 68, 68, 0.4);
    background: transparent;
}

.btn-outline-danger:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff !important;
}

.btn-sm {
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    min-height: 34px;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: 1.1rem;
    min-height: 48px;
    border-radius: var(--radius-md);
}

.btn-disabled, .btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35em 0.7em;
    font-size: 0.78em;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--radius-full);
}

.badge.bg-primary { background-color: var(--primary); color: #ffffff; }
.badge.bg-secondary { background-color: var(--secondary); color: #ffffff; }
.badge.bg-success { background-color: var(--success); color: #ffffff; }
.badge.bg-danger { background-color: var(--danger); color: #ffffff; }
.badge.bg-warning { background-color: var(--warning); color: #1e1b4b; }
.badge.bg-info { background-color: var(--info); color: #ffffff; }

.team-badge {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--primary-light);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.825rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.points-badge {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.question-number {
    font-weight: 700;
    color: #ffffff;
    font-size: 1rem;
}

/* Forms & Inputs */
.form-label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-control, .form-select, select, textarea, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="datetime-local"] {
    display: block;
    width: 100%;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    color: #ffffff;
    background-color: var(--input-bg);
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    font-family: inherit;
}

.form-control:focus, .form-select:focus, select:focus, textarea:focus, input:focus {
    color: #ffffff;
    background-color: rgba(15, 23, 42, 1);
    border-color: var(--primary);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.form-control::placeholder, textarea::placeholder, input::placeholder {
    color: var(--text-muted);
    opacity: 0.85;
}

select.form-control, select.form-select, select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23cbd5e1' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.25rem;
    cursor: pointer;
}

select option {
    background-color: #1e293b;
    color: #ffffff;
}

.form-check {
    display: flex;
    align-items: center;
    min-height: 1.5rem;
    padding-left: 0;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.form-check-input {
    width: 1.15em;
    height: 1.15em;
    margin-top: 0;
    vertical-align: top;
    background-color: var(--input-bg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-input[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.form-check-input[type="radio"]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}

.form-check-label {
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

.form-text {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Quiz Option Select Boxes (Mobile & Touch friendly) */
.quiz-option {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1.25rem;
    margin-bottom: 0.75rem;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    min-height: 52px;
}

.quiz-option:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: var(--primary-light);
    transform: translateX(4px);
}

.quiz-option.selected {
    background: rgba(99, 102, 241, 0.25);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 1px var(--primary-light);
}

.quiz-option input[type="radio"],
.quiz-option input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.quiz-option span {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
}

/* Progress bar */
.progress {
    display: flex;
    height: 10px;
    overflow: hidden;
    font-size: 0.75rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: #ffffff;
    text-align: center;
    white-space: nowrap;
    background-color: var(--primary);
    transition: width 0.4s ease;
}

/* Alerts */
.alert {
    position: relative;
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    animation: fadeInDropdown 0.25s ease;
}

.alert-info {
    background-color: rgba(6, 182, 212, 0.2);
    border-color: rgba(6, 182, 212, 0.4);
    color: #e0f2fe;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #d1fae5;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fee2e2;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fef3c7;
}

.btn-close {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: 0.25em;
    color: #ffffff;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0;
    border-radius: 4px;
    opacity: 0.75;
    cursor: pointer;
    transition: opacity 0.15s ease;
    flex-shrink: 0;
}

.btn-close:hover, .btn-close:focus {
    opacity: 1;
    outline: 0;
}

/* Tables & Responsive Wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 0;
}

.table {
    width: 100%;
    margin-bottom: 0;
    color: var(--text-primary);
    vertical-align: middle;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.table th {
    font-weight: 700;
    color: #ffffff;
    background-color: var(--card-header-bg);
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.08);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.02);
}

/* List Groups */
.list-group {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    border-radius: var(--radius-md);
}

.list-group-item {
    position: relative;
    display: block;
    padding: 0.85rem 1.15rem;
    color: var(--text-primary);
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.list-group-flush > .list-group-item {
    border-width: 0 0 1px;
}

.list-group-flush > .list-group-item:last-child {
    border-bottom-width: 0;
}

/* Reordering item styling */
.question-item {
    transition: transform 0.2s ease, opacity 0.2s ease;
    user-select: none;
}

.question-item:hover {
    background-color: rgba(99, 102, 241, 0.12);
}

.drag-handle {
    font-size: 1.25rem;
    user-select: none;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.drag-handle:hover {
    opacity: 1;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 2.5rem 1rem 3rem;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 1.5rem 0.5rem 2rem;
    }
    
    .hero-title {
        font-size: 1.85rem;
    }
}

/* Score display */
.score-display {
    font-weight: 800;
    color: #fbbf24;
}

/* Landing Page Styles */
.landing-hero {
    position: relative;
}

.landing-badge {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
}

.landing-title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-subtitle {
    font-size: 1.15rem;
    max-width: 650px;
    line-height: 1.6;
}

.stat-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.4);
}

.stat-number {
    font-size: 1.85rem;
    font-weight: 800;
    color: #ffffff;
}

.feature-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(99, 102, 241, 0.4);
}

.feature-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cta-banner {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

@media (max-width: 768px) {
    .landing-title {
        font-size: 2rem;
    }
    .landing-subtitle {
        font-size: 1rem;
    }
    .stat-number {
        font-size: 1.4rem;
    }
}

/* Mobile Responsiveness Tweaks */
@media (max-width: 576px) {
    body {
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 0.55rem 1rem;
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 1.15rem;
    }
    
    .card-header {
        padding: 0.85rem 1rem;
    }
    
    .table th, .table td {
        padding: 0.75rem 0.6rem;
        font-size: 0.875rem;
    }
}
