:root {
    --primary: #2b4a53; /* 3rd card color from the image! */
    --primary-hover: #1e353c;
    --accent: #476a75;
    --bg-dark: #f8fafc; /* Clean light slate background */
    --bg-card: #ffffff; /* White card */
    --bg-card-hover: #f1f5f9;
    --text-main: #1e293b; /* Dark slate text */
    --text-muted: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --border: rgba(43, 74, 83, 0.15); /* Light slate border */
    --border-hover: rgba(43, 74, 83, 0.4);
    --glass-shadow: 0 10px 25px -5px rgba(43, 74, 83, 0.08), 0 8px 10px -6px rgba(43, 74, 83, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(43, 74, 83, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(71, 106, 117, 0.04) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    background: var(--primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: #ffffff;
}

.navbar h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user span {
    font-weight: 600;
    color: #ffffff;
}

.navbar .btn-outline {
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}
.navbar .btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 12px 28px -5px rgba(43, 74, 83, 0.12), 0 8px 12px -6px rgba(43, 74, 83, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary);
    box-shadow: 0 4px 14px 0 rgba(43, 74, 83, 0.2);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(43, 74, 83, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    filter: brightness(1.1);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
    filter: brightness(1.1);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

.btn:disabled, .btn-primary:disabled, .btn-success:disabled {
    background: #cbd5e1 !important;
    color: #64748b !important;
    border: 1px solid #cbd5e1 !important;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    opacity: 0.6;
}

/* Form inputs */
input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-main);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(43, 74, 83, 0.15);
    background: #ffffff;
}

/* Grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

@media (max-width: 900px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* Lists and Items */
.test-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(43, 74, 83, 0.02);
}

.test-item:hover {
    border-color: var(--border-hover);
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(43, 74, 83, 0.05);
}

/* Add Test Card */
.add-test-card {
    border: 2px dashed var(--border);
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.add-test-card:hover {
    border-color: var(--primary);
    background: rgba(43, 74, 83, 0.04);
    transform: scale(1.01);
}

.add-test-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

/* Option selections */
.option-label {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-label:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.option-label.selected {
    background: rgba(43, 74, 83, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.option-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border);
    margin-right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.2s ease;
    background: #ffffff;
    color: var(--text-muted);
}

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

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-content {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    text-align: center;
    transform: scale(1);
    transition: transform 0.3s ease;
}

/* Radial Progress Ring (Rating) */
.rating-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0;
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.35s;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

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

.stats-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.stats-table tr:hover td {
    background: rgba(43, 74, 83, 0.02);
}

/* File Preview Frame */
.preview-container {
    background: rgba(255, 255, 255, 0.5);
    border: 1px dashed var(--border-hover);
    border-radius: 12px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.file-embed {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 12px;
}

.hidden {
    display: none !important;
}

/* Answer Sheet Grid */
.answer-sheet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.answer-sheet-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(43, 74, 83, 0.01);
}

.answer-sheet-item h4 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.answer-sheet-options {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}

.sheet-opt-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.sheet-opt-btn:hover {
    border-color: var(--primary);
    background: rgba(43, 74, 83, 0.05);
}

.sheet-opt-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 10px rgba(43, 74, 83, 0.3);
}

/* Helper styles */
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-center { text-align: center; }

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}
