/* 
ADCA Final Examination System: Premium Styles
Author: Antigravity AI
*/

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #6b7280;
    --secondary-hover: #4b5563;
    --success-color: #10b981;
    --success-hover: #059669;
    --error-color: #ef4444;
    --error-hover: #dc2626;
    --background-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --card-background: rgba(255, 255, 255, 0.08);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background-color: #0f172a;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fixed-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-gradient);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    position: relative;
}

/* Glass Card Style */
.glass-card {
    background: var(--card-background);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card.active {
    display: block;
    animation: slideIn 0.5s ease-out forwards;
}

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

/* Header Sections */
.header {
    text-align: center;
    margin-bottom: 3rem;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

#logo {
    width: 100px;
    height: auto;
    margin-bottom: 1.5rem;
    border-radius: 20px;
    border: 2px solid var(--border-color);
}

#logo-main {
    width: 150px;
    height: auto;
    margin-bottom: 2rem;
}

/* Form Styling */
.input-group {
    margin-bottom: 1.5rem;
}

.input-row {
    display: flex;
    gap: 1.5rem;
}

.input-row .input-group {
    flex: 1;
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-success {
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 12px;
    border: none;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:disabled {
    opacity: 0.3;
    pointer-events: none;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

/* Instruction Section */
.instruction-list {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.instruction-list ul {
    list-style: none;
    margin-top: 1rem;
}

.instruction-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.instruction-list li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: 900;
}

/* Exam Interface */
.exam-header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.timer-badge {
    align-self: flex-end;
    background: rgba(0,0,0,0.3);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-family: monospace;
    font-size: 1.2rem;
    border: 1px solid var(--border-color);
}

.progress-container {
    width: 100%;
    height: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 5px;
    position: relative;
    margin-bottom: 2rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #06b6d4);
    border-radius: 5px;
    transition: width 0.4s ease;
}

#progress-text {
    position: absolute;
    top: -25px;
    right: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.topic-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(79, 70, 229, 0.2);
    color: #a5b4fc;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

#question-text {
    font-size: 1.5rem;
    line-height: 1.4;
    margin-bottom: 2rem;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.option-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.option-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
}

.option-card.selected {
    background: rgba(79, 70, 229, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.3);
}

.option-marker {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
}

.option-card.selected .option-marker {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: white;
}

.exam-footer {
    display: flex;
    gap: 1rem;
    margin-top: 3rem;
}

.hidden {
    display: none;
}

/* Result Section */
.result-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

#score-summary {
    margin-top: 1rem;
}

#final-score {
    font-size: 3rem;
    font-weight: 800;
    color: var(--success-color);
}

.candidate-report {
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.report-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.topic-wise-analysis {
    margin-bottom: 3rem;
}

.topic-stat {
    margin-bottom: 1rem;
}

.stat-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.stat-bar {
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
}

.stat-fill {
    height: 100%;
    border-radius: 4px;
    background-color: var(--primary-color);
}

/* Animations */
/* Course Selection Styling */
.course-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.course-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.course-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(79, 70, 229, 0.3);
}

.course-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 70px; height: 70px; border-radius: 20px;
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: white; font-size: 2.2rem; font-weight: 800;
    font-family: var(--font-family); letter-spacing: -1px;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
    margin-bottom: 0.5rem;
}

.course-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.course-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.course-duration {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(79, 70, 229, 0.2);
    color: #a5b4fc;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .course-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@media (max-width: 640px) {
    .input-row {
        flex-direction: column;
        gap: 0;
    }
    .report-grid {
        grid-template-columns: 1fr;
    }
}

/* Custom Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: var(--card-background);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    transform: translateY(30px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-box {
    transform: translateY(0);
}

.modal-box h2 {
    color: #e2e8f0;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.modal-box p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-actions button {
    margin-top: 0;
    flex: 1;
}

/* Typing Test Styles */
.typing-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 1rem;
}

.typing-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.stat-box {
    font-size: 1.2rem;
    font-weight: 600;
    color: #a5b4fc;
}

.stat-box span {
    color: white;
    font-weight: 700;
}

.target-text {
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    padding: 1.5rem;
    border-radius: 12px;
    font-size: 1.6rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    border: 2px solid var(--primary-color);
    user-select: none;
}

#typing-input {
    width: 100%;
    height: 150px;
    padding: 1.5rem;
    font-size: 1.6rem;
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    resize: none;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

#typing-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
}

.typing-footer {
    display: flex;
    gap: 1rem;
}
