/* --- Student Portal UI --- */
.glass-wrapper {
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh; padding: 20px; box-sizing: border-box;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 40px; width: 100%; max-width: 550px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
}

/* Stepper UI */
.stepper { display: flex; justify-content: space-between; margin-bottom: 30px; }
.step { font-size: 0.7rem; font-weight: 700; color: var(--text-dim); text-transform: uppercase; }
.step.active { color: white; border-bottom: 2px solid var(--accent); padding-bottom: 4px; }

/* Form Grid Fix (2 Columns) */
.form-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 20px; text-align: left; margin-top: 30px;
}

.input-glass-group label {
    display: block; font-size: 0.8rem; margin-bottom: 8px; color: var(--text-dim);
}

.input-glass-group input, .input-glass-group select {
    width: 100%; background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border); padding: 14px;
    border-radius: 12px; color: white; font-family: inherit;
    box-sizing: border-box;
}

/* Fix for invisible Grade text */
.input-glass-group select option { background: #0f172a; color: white; }

.glass-btn {
    background: var(--accent); color: white; border: none; padding: 16px;
    border-radius: 14px; font-weight: 700; cursor: pointer;
    transition: 0.3s; width: 100%; margin-top: 20px;
}
.glass-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px var(--accent-glow); }

@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
/* Styling for the Select box and its dropdown menu */
.input-glass-group select {
    appearance: none; /* Removes default browser arrow */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
}

/* Fix for the invisible text in the grade list */
.input-glass-group select option {
    background-color: #0f172a; /* Dark background to match the theme */
    color: white;
    padding: 12px;
}

/* Dim the placeholder text */
.input-glass-group select:invalid {
    color: var(--text-dim);
}
/* Add to your existing student.css */
.option-grid {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.option-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 18px;
    border-radius: 14px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
    text-align: center;
}

.option-btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--accent-glow);
}

.option-btn.like { border-left: 4px solid var(--success); }
.option-btn.not-sure { border-left: 4px solid #f1c40f; }
.option-btn.dislike { border-left: 4px solid var(--error); }

.loader {
    width: 25px; height: 25px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
.section-label {
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 2px;
    font-weight: 800;
    margin-bottom: 10px;
    text-transform: uppercase;
    background: rgba(99, 102, 241, 0.1);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
}

.dbda-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.timer-box {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid var(--error);
    padding: 8px 15px;
    border-radius: 12px;
    font-weight: 800;
    color: var(--error);
}

.instruction-text {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 20px;
    font-style: italic;
}

.aptitude-options {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns for speed */
    gap: 12px;
}

@media (max-width: 500px) {
    .aptitude-options { grid-template-columns: 1fr; }
}
.math-display {
    font-size: 2rem;
    font-family: 'Courier New', Courier, monospace; /* Clean look for numbers */
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.option-btn {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.2rem;
    padding: 15px !important;
}

.instruction-box {
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 16px;
    margin: 20px 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

.sa-image-wrapper {
    background: white; /* Important: SA drawings are usually B&W on white */
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.sa-image-wrapper img {
    width: 100%;
    height: auto;
    filter: contrast(1.2);
}

.sa-options-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.sa-opt {
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--glass-border);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 800;
    transition: 0.3s;
}

.sa-opt.selected {
    background: var(--accent);
    border-color: #fff;
    box-shadow: 0 0 15px var(--accent-glow);
}

.mechanical-diagram {
    background: #fff; /* High contrast for B&W diagrams */
    padding: 15px;
    border-radius: 16px;
    margin: 15px 0;
    display: flex;
    justify-content: center;
    border: 3px solid var(--glass-border);
}

.mechanical-diagram img {
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
}

.ma-question {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 20px;
    color: #fff;
}

.fragment-display {
    background: white;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 2px solid var(--accent);
}

.fragment-display img {
    height: 60px; /* Keeping it consistent and clear */
    width: auto;
    filter: contrast(1.5) brightness(0.9);
}

.aptitude-options .option-btn {
    letter-spacing: 2px; /* Makes jumbled words easier to analyze */
    text-transform: lowercase;
}
.cl-comparison-box {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px 10px;
    border-radius: 20px;
    margin: 20px 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.cl-divider { color: var(--accent); opacity: 0.5; }
.cl-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
.same-btn { border-bottom: 4px solid var(--success) !important; }
.diff-btn { border-bottom: 4px solid var(--error) !important; }

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 20px auto;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.summary-item span {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.sync-status {
    margin-top: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--success);
    font-weight: 700;
}

.loader-small {
    width: 16px; height: 16px;
    border: 2px solid rgba(16, 185, 129, 0.2);
    border-top: 2px solid var(--success);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}