/* ==========================================
   BGNU Exam Portal - Modern Dark Theme
   ========================================== */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Container */
.exam-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-icon {
    font-size: 1.5rem;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.timer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

/* Screens */
.screen {
    animation: fadeIn 0.3s ease;
}

.screen.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Welcome Card */
.welcome-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 48px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 24px;
}

.welcome-card h1 {
    font-size: 2rem;
    margin-bottom: 12px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-card p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.exam-info {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: left;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

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

.info-value {
    font-weight: 600;
}

/* Input Groups */
.input-group {
    text-align: left;
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    margin-top: 16px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.helper-text {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Progress Container */
.progress-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-glass);
    border-radius: 12px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: var(--gradient);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Question Card */
.question-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.question-number {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 12px;
}

.question-prompt {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 28px;
    line-height: 1.5;
}

/* Options */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.option-item:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
}

.option-item.selected {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.15);
}

.option-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.option-item.selected .option-checkbox {
    background: var(--accent);
    border-color: var(--accent);
}

.option-checkbox::after {
    content: '✓';
    color: white;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s;
}

.option-item.selected .option-checkbox::after {
    opacity: 1;
}

.option-letter {
    width: 28px;
    height: 28px;
    background: var(--bg-card);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.option-text {
    flex: 1;
}

/* Navigation */
.nav-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.btn-nav {
    padding: 12px 24px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-nav:hover:not(:disabled) {
    background: var(--bg-secondary);
    border-color: var(--accent);
}

.btn-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.question-dots {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.dot.answered {
    background: var(--success);
    border-color: var(--success);
}

.dot.current {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

/* Submit Button */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Result Card */
.result-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 64px 48px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.result-icon {
    font-size: 5rem;
    margin-bottom: 24px;
}

.result-card h1 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.result-card p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.stat-item {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Responsive */
@media (max-width: 600px) {
    .exam-container {
        padding: 12px;
    }

    .welcome-card,
    .question-card,
    .result-card {
        padding: 24px;
    }

    .exam-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .result-stats {
        grid-template-columns: 1fr;
    }

    .nav-buttons {
        flex-wrap: wrap;
    }

    .question-dots {
        order: 3;
        width: 100%;
        margin-top: 12px;
    }
}