/* Oral Exam Module Styles */
/* Based on quiz.html design with gradient background */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: white;
}

:root {
    /* Oral Exam colors - using same gradient as quiz */
    --oral-primary: #667eea;
    --oral-secondary: #764ba2;
    --oral-success: #4CAF50;
    --oral-danger: #F44336;
    --oral-warning: #FF9800;
    --oral-info: #00BCD4;
    
    /* Glass effect backgrounds */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    
    /* Button and form colors */
    --btn-primary-bg: #ff5722;
    --btn-primary-hover: #e64a19;
    --btn-secondary-bg: rgba(255, 255, 255, 0.1);
    --btn-secondary-hover: rgba(255, 255, 255, 0.2);
    
    /* Progress colors */
    --progress-bg: rgba(255, 255, 255, 0.2);
    --progress-fill: var(--oral-primary);
}

/* === MAIN LAYOUT === */
.main-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* === BREADCRUMBS - STYLED AS STATUS BAR === */
.breadcrumbs {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 8px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: white;
}

.status-left {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 8px;
    flex-wrap: wrap;
}

.status-right {
    display: flex;
    align-items: center;
}

.server-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.server-status.online {
    background-color: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.5);
}

.server-status.offline {
    background-color: rgba(244, 67, 54, 0.2);
    border-color: rgba(244, 67, 54, 0.5);
}

.server-status.checking {
    background-color: rgba(255, 193, 7, 0.2);
    border-color: rgba(255, 193, 7, 0.5);
}

.status-indicator {
    font-size: 12px;
    animation: pulse 2s infinite;
}

.status-text {
    font-weight: bold;
    font-size: 12px;
    color: white;
}

.status-mode {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

.separator {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 8px;
}

.current {
    color: white;
    font-weight: 600;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.breadcrumbs a {
    color: #ffd700;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
}

.breadcrumbs a:hover {
    color: #ffed4a;
    text-shadow: 0 0 5px rgba(255, 237, 74, 0.5);
}

/* Navigation links container */
#navigation-links-container a {
    color: #ffd700;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
}

#navigation-links-container a:hover {
    color: #ffed4a;
    text-shadow: 0 0 5px rgba(255, 237, 74, 0.5);
}

/* === EXAM SETUP === */
.exam-setup {
    margin-bottom: 2rem;
}

.setup-card {
    background: rgba(40, 53, 147, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.setup-card h2 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.setup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* === VOICE SETTINGS === */
.voice-settings {
    background: rgba(255, 87, 34, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid rgba(255, 87, 34, 0.3);
}

.voice-settings h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.voice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.voice-test {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* === RANGE INPUT STYLING === */
input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    margin: 0.5rem 0;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ff5722;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.4);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ff5722;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* === EXAM INTERFACE === */
.exam-interface {
    background: rgba(40, 53, 147, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.exam-progress {
    flex: 1;
}

.progress-info {
    display: flex;
    gap: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.progress-info span {
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.exam-controls {
    display: flex;
    gap: 0.5rem;
}

/* === QUESTION DISPLAY === */
.question-display {
    background: rgba(40, 53, 147, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.question-header h3 {
    color: white;
    font-size: 1.4rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.question-actions {
    display: flex;
    gap: 0.5rem;
}

.question-text-container {
    position: relative;
}

.question-text {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 1rem;
    min-height: 3rem;
}

/* === SPEECH STATUS === */
.speech-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--oral-primary)10, var(--oral-secondary)10);
    border-radius: 10px;
    border: 1px solid var(--oral-primary)30;
}

.speech-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.speech-waves {
    display: flex;
    gap: 2px;
}

.speech-waves span {
    width: 3px;
    height: 20px;
    background: var(--oral-primary);
    border-radius: 2px;
    animation: wave 1.5s ease-in-out infinite;
}

.speech-waves span:nth-child(2) {
    animation-delay: 0.1s;
}

.speech-waves span:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes wave {
    0%, 40%, 100% {
        transform: scaleY(0.4);
    }
    20% {
        transform: scaleY(1);
    }
}

.speech-status.speaking .speech-waves span {
    animation-play-state: running;
}

.speech-status:not(.speaking) .speech-waves span {
    animation-play-state: paused;
    transform: scaleY(0.4);
}

/* === VOICE RESPONSE === */
.voice-response {
    background: var(--bg-primary);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.response-header h3 {
    color: var(--oral-primary);
    font-size: 1.4rem;
}

.response-mode {
    display: flex;
    gap: 1rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.radio-label:hover {
    color: var(--text-primary);
}

.radio-label input[type="radio"] {
    accent-color: var(--oral-primary);
}

/* === VOICE INPUT === */
.voice-input {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.mic-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.mic-button {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--oral-primary), var(--oral-secondary));
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    overflow: hidden;
}

.mic-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

.mic-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.mic-button.recording {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    animation: pulse-recording 1.5s ease-in-out infinite;
}

@keyframes pulse-recording {
    0% {
        box-shadow: 0 8px 25px rgba(0,0,0,0.15), 0 0 0 0 rgba(231, 76, 60, 0.7);
    }
    70% {
        box-shadow: 0 8px 25px rgba(0,0,0,0.15), 0 0 0 20px rgba(231, 76, 60, 0);
    }
    100% {
        box-shadow: 0 8px 25px rgba(0,0,0,0.15), 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

.mic-icon {
    position: relative;
    z-index: 2;
}

.mic-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

.pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    animation: pulse 2s ease-out infinite;
    opacity: 0;
}

.pulse.delay-1 {
    animation-delay: 0.5s;
}

.pulse.delay-2 {
    animation-delay: 1s;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.7;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

.mic-status {
    text-align: center;
    color: var(--text-secondary);
    font-weight: 500;
}

.mic-status.recording {
    color: #e74c3c;
    font-weight: 600;
}

.mic-status.processing {
    color: var(--oral-primary);
    font-weight: 600;
}

/* === VOICE VISUALIZER === */
.voice-visualizer {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

#voiceCanvas {
    display: block;
    margin: 0 auto;
    background: transparent;
}

/* === RECOGNIZED TEXT === */
.recognized-text {
    width: 100%;
    max-width: 600px;
}

.recognized-text label {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.text-display {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    min-height: 4rem;
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

.text-display.empty {
    color: var(--text-secondary);
    font-style: italic;
}

.recognition-confidence {
    display: flex;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.recognition-confidence span:last-child {
    font-weight: 600;
    color: var(--oral-primary);
}

/* === TEXT INPUT === */
.text-input {
    width: 100%;
}

.text-input label {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.answer-textarea {
    width: 100%;
    min-height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: white;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 1rem;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.answer-textarea:focus {
    outline: none;
    border-color: #ff5722;
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.answer-textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.text-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* === RESPONSE ACTIONS === */
.response-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* === FEEDBACK PANEL === */
.feedback-panel {
    background: linear-gradient(135deg, var(--success-color)10, var(--oral-primary)10);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 2rem;
    border: 1px solid var(--success-color)30;
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.feedback-header h4 {
    color: var(--success-color);
    font-size: 1.3rem;
}

.feedback-score {
    font-size: 2rem;
    font-weight: bold;
    color: var(--success-color);
}

.answer-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.user-answer, .correct-answer {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.user-answer h5 {
    color: #ffeb3b;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.correct-answer h5 {
    color: #4caf50;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.feedback-analysis {
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.feedback-analysis h5 {
    color: var(--oral-primary);
    margin-bottom: 0.5rem;
}

.feedback-analysis ul {
    margin-left: 1rem;
}

.feedback-analysis li {
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}

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

/* === EXAM RESULTS === */
.exam-results {
    max-width: 1000px;
    margin: 0 auto;
}

.results-card {
    background: rgba(40, 53, 147, 0.3);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.results-header h2 {
    color: var(--oral-primary);
    margin-bottom: 1rem;
}

.overall-grade {
    display: inline-block;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success-color), var(--oral-primary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.results-summary {
    margin-bottom: 2rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--oral-primary);
    display: block;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* === PERFORMANCE METRICS === */
.performance-metrics h3 {
    color: var(--oral-primary);
    margin-bottom: 1rem;
}

.metrics-grid {
    display: grid;
    gap: 1rem;
}

.metric {
    display: grid;
    grid-template-columns: 150px 1fr 60px;
    align-items: center;
    gap: 1rem;
}

.metric-label {
    color: var(--text-primary);
    font-weight: 500;
}

.metric-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.metric-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--oral-primary), var(--oral-secondary));
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* === DETAILED RESULTS === */
.detailed-results {
    margin-bottom: 2rem;
}

.detailed-results h3 {
    color: var(--oral-primary);
    margin-bottom: 1rem;
}

.question-reviews {
    display: grid;
    gap: 1rem;
}

.question-review {
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.question-review.correct {
    border-left: 4px solid var(--success-color);
}

.question-review.incorrect {
    border-left: 4px solid var(--error-color);
}

.question-review.partial {
    border-left: 4px solid var(--warning-color);
}

/* === RESULTS ACTIONS === */
.results-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* === ADVANCED SETTINGS MODAL === */
.modal-content.large {
    max-width: 800px;
    width: 90vw;
}

.settings-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-button {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-button:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.tab-button.active {
    color: var(--oral-primary);
    border-bottom-color: var(--oral-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.settings-grid .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-grid .form-group label {
    font-weight: 500;
    color: var(--text-primary);
}

.settings-grid .form-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* === HELP MODAL === */
.help-section {
    margin-bottom: 1.5rem;
}

.help-section h4 {
    color: var(--oral-primary);
    margin-bottom: 0.5rem;
}

.help-section ul {
    margin-left: 1rem;
}

.help-section li {
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}

kbd {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 0.9em;
    color: var(--text-primary);
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    
    .setup-grid {
        grid-template-columns: 1fr;
    }
    
    .voice-grid {
        grid-template-columns: 1fr;
    }
    
    .exam-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .progress-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .question-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .question-actions {
        justify-content: center;
    }
    
    .response-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .response-mode {
        justify-content: center;
    }
    
    .answer-comparison {
        grid-template-columns: 1fr;
    }
    
    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .metric {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.5rem;
    }
    
    .results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .settings-tabs {
        flex-wrap: wrap;
    }
    
    .tab-button {
        flex: 1;
        min-width: 120px;
    }
    
    .modal-content.large {
        width: 95vw;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .mic-button {
        width: 100px;
        height: 100px;
        font-size: 2rem;
    }
    
    .voice-test {
        flex-direction: column;
        align-items: center;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.exam-interface,
.feedback-panel,
.exam-results {
    animation: fadeIn 0.5s ease;
}

/* === THEME VARIABLES === */
:root {
    --oral-primary: #9b59b6;
    --oral-secondary: #8e44ad;
    --oral-accent: #e74c3c;
    --oral-bg: linear-gradient(135deg, var(--oral-primary)10, var(--oral-secondary)10);
}

/* === ADVANCED SETTINGS PANEL === */
.advanced-settings {
    margin-bottom: 2rem;
}

.settings-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tab-button {
    background: rgba(255, 87, 34, 0.8);
    border: 1px solid rgba(255, 87, 34, 0.5);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.tab-button:hover {
    background: rgba(255, 87, 34, 1);
    transform: translateY(-2px);
}

.tab-button.active {
    background: #ff5722;
    border-color: #e64a19;
    box-shadow: 0 0 10px rgba(255, 87, 34, 0.5);
}

.tab-content {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.tab-content.active {
    display: block;
}

.tab-content h4 {
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* === HELP SECTION PANEL === */
.help-section-panel {
    margin-bottom: 2rem;
}

.help-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.help-item {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    background: rgba(255, 87, 34, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.help-header:hover {
    background: rgba(255, 87, 34, 0.2);
}

.help-header span:first-child {
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.help-arrow {
    transition: transform 0.3s ease;
    color: #ff5722;
    font-weight: bold;
}

.help-item.expanded .help-arrow {
    transform: rotate(180deg);
}

.help-content {
    display: none;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
}

.help-content.expanded {
    display: block;
}

.help-content ul {
    margin: 0;
    padding-left: 1rem;
}

.help-content li {
    margin-bottom: 0.5rem;
    color: white;
    line-height: 1.5;
}

.help-content kbd {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #ff5722;
    font-weight: bold;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.help-content {
    animation: fadeIn 0.3s ease when expanding;
}

/* === RESPONSIVE DESIGN FOR NEW COMPONENTS === */
@media (max-width: 768px) {
    .settings-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        text-align: center;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .help-header {
        padding: 0.75rem 1rem;
    }
    
    .help-content {
        padding: 1rem;
    }
}

/* === AI FEEDBACK STYLES === */
.feedback-summary {
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.4);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    font-weight: 500;
}

.feedback-header {
    font-weight: bold;
    font-size: 1.1em;
    margin: 16px 0 8px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.feedback-header.positive {
    color: #4CAF50;
    border-bottom-color: rgba(76, 175, 80, 0.5);
}

.feedback-header.negative {
    color: #F44336;
    border-bottom-color: rgba(244, 67, 54, 0.5);
}

.feedback-header.recommendation {
    color: #FF9800;
    border-bottom-color: rgba(255, 152, 0, 0.5);
}

.feedback-positive {
    color: #81C784;
    margin-left: 20px;
    padding: 4px 0;
}

.feedback-negative {
    color: #E57373;
    margin-left: 20px;
    padding: 4px 0;
}

.feedback-recommendation {
    color: #FFB74D;
    margin-left: 20px;
    padding: 4px 0;
}

.feedback-method {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 16px;
    font-size: 0.9em;
    font-style: italic;
    color: #E0E0E0;
}

/* Prominent method header - shows AI vs Local evaluation */
.feedback-method-header {
    border: 2px solid #2E7D32;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 0 0 16px 0;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    animation: methodHeaderPulse 0.6s ease-out;
}

/* Styling for different evaluation methods */
.feedback-method-header.local-evaluation {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    border-color: #E65100;
}

.feedback-method-header.ai-evaluation {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border-color: #1565C0;
}

@keyframes methodHeaderPulse {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Enhanced feedback panel animations */
.feedback-panel {
    animation: slideInFromBottom 0.5s ease-out;
}

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

/* AI evaluation indicator */
.ai-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    margin-left: 8px;
}

.ai-indicator::before {
    content: "🤖";
    font-size: 1.1em;
}

/* Loading state for AI evaluation */
.feedback-panel.evaluating {
    position: relative;
    overflow: hidden;
}

.feedback-panel.evaluating::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    animation: loading-bar 2s linear infinite;
}

@keyframes loading-bar {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Score display enhancements for AI feedback */
.ai-score-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-score-item {
    text-align: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
}

.ai-score-value {
    font-size: 1.4em;
    font-weight: bold;
    color: #667eea;
}

.ai-score-label {
    font-size: 0.85em;
    color: #B0BEC5;
    margin-top: 4px;
}
