/* ===== Teacher Mode ===== */
.teacher-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-red));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.teacher-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4);
}

.teacher-btn svg {
    width: 18px;
    height: 18px;
}

/* Teacher Login Modal */
.teacher-login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.login-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.login-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.login-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.login-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.login-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s ease;
}

.login-input:focus {
    outline: none;
    border-color: var(--accent-orange);
}

.login-input::placeholder {
    color: var(--text-muted);
}

.login-error {
    display: none;
    color: var(--accent-red);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-sm);
}

.login-actions {
    display: flex;
    gap: 0.75rem;
}

.login-actions button {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-submit {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-red));
    border: none;
    color: white;
}

.login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4);
}

.login-cancel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.login-cancel:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* Teacher Panel */
.teacher-panel {
    display: none;
    animation: fadeIn 0.4s ease;
}

.teacher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(239, 68, 68, 0.15));
    border-radius: var(--radius-xl);
    border: 1px solid rgba(249, 115, 22, 0.3);
    margin-bottom: 2rem;
}

.teacher-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.teacher-header-left .header-icon {
    width: 40px;
    height: 40px;
    color: var(--accent-orange);
}

.teacher-header-left .header-icon svg {
    width: 100%;
    height: 100%;
}

.teacher-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-orange);
}

.teacher-header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.teacher-actions {
    display: flex;
    gap: 0.75rem;
}

.teacher-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.teacher-action-btn svg {
    width: 18px;
    height: 18px;
}

.teacher-action-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
}

.teacher-action-btn.exit {
    background: transparent;
    color: var(--text-muted);
}

.teacher-action-btn.exit:hover {
    color: var(--accent-red);
    border-color: var(--accent-red);
}

/* Answer Key Sections */
.answer-keys-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.answer-key-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.answer-key-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    cursor: pointer;
    transition: background 0.2s ease;
}

.answer-key-header:hover {
    background: var(--bg-card-hover);
}

.answer-key-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.answer-key-title h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.answer-key-count {
    font-size: 0.75rem;
    color: var(--accent-orange);
    padding: 0.25rem 0.75rem;
    background: rgba(249, 115, 22, 0.15);
    border-radius: var(--radius-sm);
}

.answer-key-toggle {
    font-size: 1rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.answer-key-body {
    padding: 1rem 1.5rem;
    display: block;
}

.answer-key-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

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

.answer-key-item:hover {
    background: rgba(249, 115, 22, 0.05);
}

.answer-key-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-card);
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.answer-key-content {
    flex: 1;
}

.answer-key-question {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.answer-key-answer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-sm);
}

.answer-key-answer .answer-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--accent-green);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--bg-primary);
}

.answer-key-answer .answer-text {
    color: var(--accent-green);
    font-weight: 500;
}
