/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    width: 100%;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-bar {
    color: rgba(255,255,255,0.9);
}

.header-content h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header-content p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    font-weight: 300;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.screen {
    display: none;
    width: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    animation: slideIn 0.5s ease-out;
}

.screen.active {
    display: block;
}

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

/* Welcome Screen */
.welcome-content {
    padding: 60px 40px;
    text-align: center;
}

.welcome-icon {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 20px;
}

.welcome-content h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.welcome-content p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
}

.quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
    text-align: left;
}

.option-group {
    display: flex;
    flex-direction: column;
}

.option-group label {
    font-weight: 500;
    margin-bottom: 10px;
    color: #333;
}

.option-group select {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.option-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.option-group input[type="number"] {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    width: 100%;
}

.option-group input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}


/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 140px;
    justify-content: center;
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.btn-secondary:hover:not(:disabled) {
    background: #e9ecef;
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-success.saved {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    cursor: default;
}

.btn-success.saved:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.btn-info:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
    border-radius: 6px;
}

/* Quiz Screen */
.quiz-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.question-counter {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 15px;
    display: block;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.quiz-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.stat i {
    font-size: 1.1rem;
}

.question-container {
    padding: 40px;
}

.question-content h3 {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 30px;
    line-height: 1.5;
    color: #333;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Feedback panel */
#feedback-panel {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #0f172a;
    line-height: 1.5;
}

#feedback-panel strong {
    color: #111827;
}

.option {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.option:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.option.selected {
    border-color: #667eea;
    background: #f8f9ff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.option.correct {
    border-color: #28a745;
    background: #d4edda;
}

.option.incorrect {
    border-color: #dc3545;
    background: #f8d7da;
}

.option.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.option-letter {
    font-weight: 600;
    font-size: 1.1rem;
    color: #667eea;
    min-width: 30px;
    text-align: center;
}

.option-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-text {
    font-size: 1.1rem;
    line-height: 1.4;
}

/* Most Voted Badge */
.most-voted-badge {
    background: #ff9800;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    align-self: flex-start;
    max-width: fit-content;
}

@keyframes pulse {
    0% {
        box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
    }
    50% {
        box-shadow: 0 2px 8px rgba(220, 53, 69, 0.5);
    }
    100% {
        box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
    }
}

.quiz-controls {
    padding: 30px 40px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.quiz-controls-center {
    display: flex;
    gap: 15px;
}

/* Results Screen */
.results-content {
    padding: 60px 40px;
    text-align: center;
}

.results-header {
    margin-bottom: 40px;
}

.results-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 20px;
}

.results-header h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.results-header p {
    font-size: 1.1rem;
    color: #666;
}

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

.stat-card {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 15px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 15px;
}

.stat-icon.correct {
    color: #28a745;
}

.stat-icon.incorrect {
    color: #dc3545;
}

.stat-icon.score {
    color: #667eea;
}

.stat-icon.time {
    color: #6c757d;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-info p {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.results-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Review Screen */
.review-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.review-content {
    padding: 40px;
    max-height: 60vh;
    overflow-y: auto;
}

.review-item {
    margin-bottom: 30px;
    padding: 25px;
    border: 2px solid #e1e5e9;
    border-radius: 15px;
    background: white;
}

.review-item.correct {
    border-color: #28a745;
    background: #f8fff9;
}

.review-item.incorrect {
    border-color: #dc3545;
    background: #fff8f8;
}

.review-question {
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.review-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.review-option {
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-option.user-answer {
    background: #e3f2fd;
    border: 1px solid #2196f3;
}

.review-option.correct-answer {
    background: #e8f5e8;
    border: 1px solid #4caf50;
}

.review-option.incorrect-answer {
    background: #ffebee;
    border: 1px solid #f44336;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (min-width: 1400px) {
    .container {
        padding: 30px;
    }
    
    .screen {
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* Full HD Desktop (1920px+) */
@media (min-width: 1920px) {
    .container {
        padding: 40px;
    }
    
    .screen {
        max-width: 1800px;
        margin: 0 auto;
    }
}

/* 2K/QHD (2560px+) */
@media (min-width: 2560px) {
    .container {
        padding: 50px;
    }
    
    .screen {
        max-width: 2400px;
        margin: 0 auto;
    }
}

/* 4K/UHD (3840px+) */
@media (min-width: 3840px) {
    .container {
        padding: 60px;
    }
    
    .screen {
        max-width: 3600px;
        margin: 0 auto;
    }
}

@media (max-width: 1200px) {
    .container {
        padding: 15px;
    }
    
    .screen {
        max-width: 100%;
    }
}

@media (max-width: 1024px) {
    .quiz-options {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .screen {
        border-radius: 15px;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .quiz-options {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .quiz-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .quiz-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .question-container {
        padding: 30px 20px;
    }
    
    .results-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .review-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .search-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .search-content {
        padding: 30px 20px;
    }
    
    .search-result-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    .welcome-content,
    .results-content {
        padding: 40px 20px;
    }
    
    .question-container {
        padding: 20px 15px;
    }
    
    .quiz-controls {
        padding: 20px 15px;
        flex-direction: column;
    }
    
    .results-stats {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Image Styles */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Search Screen Styles */
.search-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.search-content {
    padding: 40px;
    max-height: 60vh;
    overflow-y: auto;
}

.search-form {
    margin-bottom: 30px;
}

.search-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
}

.search-filters label {
    font-weight: 500;
}

.search-filters select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-result-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.search-result-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.search-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.search-result-id {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.search-result-score {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.search-flag-btn {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.search-flag-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

.search-flag-btn.flagged {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.search-flag-btn.flagged:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.search-flag-btn i {
    font-size: 0.85rem;
}

.search-result-question {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.5;
}

.search-result-options {
    display: grid;
    gap: 8px;
    margin-bottom: 15px;
}

.search-result-option {
    padding: 10px 15px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #555;
}

.search-result-option.correct-answer {
    background: #d4edda;
    border-color: #c3e6cb;
    font-weight: 600;
    border-left: 4px solid #28a745;
}

.search-result-option.most-voted {
    background: #fff3cd;
    border-color: #ffeaa7;
    font-weight: 500;
    border-left: 4px solid #ffc107;
}

.correct-badge {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

.search-result-option .most-voted-badge {
    padding: 2px 8px;
    margin-left: 8px;
}

.search-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.search-no-results i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 20px;
}

.search-no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.search-no-results p {
    font-size: 1rem;
    line-height: 1.5;
}

.search-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.search-loading i {
    font-size: 2rem;
    color: #667eea;
    animation: spin 1s linear infinite;
}

.search-no-results i.fa-spinner {
    animation: spin 1s linear infinite;
}

.search-type-badge {
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-type-badge.id-exact {
    background: #007bff;
    color: white;
}

.search-type-badge.id-partial {
    background: #6c757d;
    color: white;
}

.search-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.search-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#page-info {
    font-weight: 500;
    color: #666;
}

.welcome-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.welcome-actions .btn {
    min-width: 150px;
}

/* Flag Question Styles */
.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

.btn-warning.flagged {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-warning.flagged:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.quiz-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.quiz-controls-right {
    display: flex;
    gap: 15px;
}

/* Flagged Questions Screen */
.flagged-header {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: white;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flagged-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.flagged-content,
.result-details-content {
    padding: 40px;
    max-height: 60vh;
    overflow-y: auto;
}

.flagged-questions-list,
.answers-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.flagged-question-item,
.answer-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.flagged-question-item:hover,
.answer-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.flagged-question-header,
.answer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.flagged-question-id,
.answer-question-number {
    background: #ffc107;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.flagged-question-actions {
    display: flex;
    gap: 10px;
}

.flagged-question-actions .btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.flagged-question-actions .btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.flagged-question-actions .btn i {
    font-size: 0.85rem;
}

.flagged-question-text,
.answer-question {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.5;
}

.flagged-question-options,
.answer-options {
    display: grid;
    gap: 8px;
    margin-bottom: 15px;
}

.flagged-question-option,
.answer-option {
    padding: 10px 15px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #555;
}

.flagged-question-option.correct-answer,
.answer-option.correct {
    background: #d4edda;
    border-color: #c3e6cb;
    font-weight: 600;
    border-left: 4px solid #28a745;
}

.flagged-question-option.most-voted,
.answer-option.most-voted {
    background: #fff3cd;
    border-color: #ffeaa7;
    font-weight: 500;
    border-left: 4px solid #ffc107;
}

.flagged-question-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
    border-top: 1px solid #e9ecef;
    padding-top: 15px;
}

.flagged-question-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.flagged-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.flagged-no-results i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 20px;
}

.flagged-no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.flagged-no-results p {
    font-size: 1rem;
    line-height: 1.5;
}

/* Flag button states */
.flag-button {
    position: relative;
    transition: all 0.3s ease;
}

.flag-button.flagged {
    animation: flagPulse 0.6s ease-out;
}

@keyframes flagPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive adjustments for flagged screen */
@media (max-width: 768px) {
    .flagged-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .flagged-content,
    .result-details-content {
        padding: 30px 20px;
    }
    
    .flagged-question-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .flagged-question-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .quiz-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .quiz-controls-center {
        width: 100%;
        justify-content: center;
    }
    
    .quiz-controls-right {
        width: 100%;
        justify-content: center;
    }
}

/* Message Styles */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.message.show {
    transform: translateX(0);
}

.success-message {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.error-message {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.message i {
    margin-right: 8px;
}

/* Results History Screen */
.results-history-header {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-history-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.results-history-content {
    padding: 40px;
    max-height: 60vh;
    overflow-y: auto;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.result-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.result-id {
    background: #17a2b8;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.result-action-btn {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.result-action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

.result-action-btn i {
    font-size: 0.85rem;
}

.result-type-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.result-type-badge.regular {
    background: #d4edda;
    color: #155724;
}

.result-type-badge.flagged {
    background: #fff3cd;
    color: #856404;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.result-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.result-stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.result-stat-value {
    font-size: 1rem;
    font-weight: 600;
}

.result-stat-value.correct {
    color: #28a745;
}

.result-stat-value.incorrect {
    color: #dc3545;
}

.result-stat-value.score {
    color: #007bff;
}

.result-stat-value.time {
    color: #6c757d;
}

.results-no-data {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.results-no-data i {
    font-size: 4rem;
    color: #ddd;
}

.results-no-data h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.results-no-data p {
    font-size: 1rem;
    margin-bottom: 30px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.loading-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.loading-message i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #667eea;
}

.loading-message p {
    font-size: 1.1rem;
}

/* Result Details Screen */
.result-details-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-details-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

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

.result-summary-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.result-summary-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.result-summary-item.correct {
    border-left: 4px solid #28a745;
}

.result-summary-item.incorrect {
    border-left: 4px solid #dc3545;
}

.result-summary-item.score {
    border-left: 4px solid #007bff;
}

.result-summary-item.time {
    border-left: 4px solid #6c757d;
}

.result-summary-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.result-summary-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 500;
}

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

.result-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.result-meta-label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.result-meta-value {
    color: #666;
    font-size: 0.9rem;
}

.result-details-answers {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    position: relative;
}

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

.answers-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.answers-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #666;
}

.answer-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.answer-status.correct {
    background: #d4edda;
    color: #155724;
}

.answer-status.incorrect {
    background: #f8d7da;
    color: #721c24;
}

.answer-option.selected {
    background: #e3f2fd;
    border-color: #bbdefb;
    font-weight: 600;
    border-left: 4px solid #2196f3;
}

.answer-option.incorrect {
    background: #f8d7da;
    border-color: #f5c6cb;
    font-weight: 600;
    border-left: 4px solid #dc3545;
}

.answer-option.most-voted {
    background: #fff3cd;
    border-color: #ffeaa7;
    font-weight: 600;
    border-left: 4px solid #ffc107;
}

.answer-option-label {
    font-weight: 600;
    margin-right: 8px;
    color: #666;
}

.correct-badge {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

.most-voted .most-voted-badge {
    background: #ffc107;
    color: #212529;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

.answer-explanation {
    margin-top: 15px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.answer-explanation-title {
    font-weight: 600;
    color: #856404;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.answer-explanation-text {
    color: #856404;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Responsive adjustments for results screens */
@media (max-width: 768px) {
    .results-history-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .results-history-content {
        padding: 30px 20px;
    }
    
    .result-details-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .result-stats {
        grid-template-columns: 1fr;
    }
    
    .result-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .result-meta {
        grid-template-columns: 1fr;
    }
    
    .answers-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .answers-stats {
        justify-content: center;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.hidden { display: none; }
.visible { display: block; }
