/* CSS Variables - Quiz Platform - Dark Theme */
:root {
    /* Dark Theme Color Palette */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #8b5cf6;
    
    --secondary-color: #0f766e;
    --secondary-dark: #0d9488;
    
    --danger-color: #ef4444;
    --danger-dark: #dc2626;
    
    --warning-color: #f59e0b;
    --warning-dark: #d97706;
    
    --success-color: #22c55e;
    --success-dark: #16a34a;
    
    --info-color: #3b82f6;
    --info-dark: #2563eb;
    
    /* Dark Theme Gradients */
    --gradient-primary: linear-gradient(135deg, #4c1d95 0%, #5b21b6 50%, #6d28d9 100%);
    --gradient-success: linear-gradient(135deg, #047857, #059669);
    --gradient-danger: linear-gradient(135deg, #b91c1c, #dc2626);
    --gradient-info: linear-gradient(135deg, #0369a1, #0284c7);
    --gradient-warning: linear-gradient(135deg, #b45309, #d97706);
    
    /* Dark backgrounds */
    --bg-primary: #1e293b;
    --bg-secondary: #334155;
    --bg-muted: #475569;
    --bg-dark: #0f172a;
    
    /* Text colors for dark theme */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.7);
    --text-disabled: rgba(255, 255, 255, 0.5);
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-base: 1rem;
    --font-size-sm: 0.875rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Shadows for dark theme */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-bounce: cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-index */
    --z-modal: 1000;
    --z-dropdown: 100;
    --z-header: 50;
    --z-overlay: 999;
}
/* Base styles - fundamental styling */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background: var(--gradient-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Container */
.container {
    padding: 20px;
    max-width: 400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (min-width: 640px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 var(--spacing-xl);
    }
}

/* App Container */
#app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Screen Management */
.screen {
    display: none;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Mobile-First Quiz App - Core Styles Only */
/* Buttons, Modals, Quiz Controller, and Participant styles are in separate modules */

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Step Management (extends base.css screen management) */
.step {
    display: none;
}

.step.active {
    display: block;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    color: white;
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

h2 {
    font-size: 1.8rem;
    color: white;
    text-align: center;
    margin-bottom: 1.5rem;
}

p {
    color: rgba(255,255,255,0.9);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Specialized choice buttons for quiz selection */
.choice-btn {
    width: 100%;
    padding: 20px;
    margin: 10px 0;
    border: none;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.join-btn {
    background: #4CAF50;
    color: white;
}

.create-btn {
    background: #FF6B6B;
    color: white;
}

.choice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.choice-btn:active {
    transform: translateY(0);
}

/* Inputs */
.input {
    width: 100%;
    padding: 15px;
    margin: 8px 0;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
}

.input::placeholder {
    color: #666;
}

.input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 2px #2196F3;
}

/* Messages */
.message {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    z-index: 1000;
    transform: translateY(-100px);
    transition: all 0.3s ease;
}

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

.message.success {
    background: #4CAF50;
    color: white;
}

.message.error {
    background: #f44336;
    color: white;
}

/* Quiz List */
#quiz-list {
    margin: 20px 0;
}

.quiz-item {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    margin: 10px 0;
    border-radius: 10px;
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}

.quiz-item h3 {
    margin-bottom: 5px;
}

.quiz-item p {
    opacity: 0.8;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

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

.quiz-code {
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.quiz-stats {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    font-size: 0.8rem;
    opacity: 0.7;
}

.quiz-stats span {
    background: rgba(255,255,255,0.1);
    padding: 4px 8px;
    border-radius: 8px;
}

.quiz-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Waiting Room */
.waiting-animation {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.dot {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Collaboration Panel - App-specific collaborative editing styles */
.collaboration-panel {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.2);
}

.collaboration-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-weight: bold;
}

.collaboration-header .btn {
    margin-left: 15px;
}

.share-code-display {
    background: rgba(255,255,255,0.1);
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.share-code-display span {
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 15px;
    font-family: monospace;
    font-weight: bold;
}

.btn-copy {
    background: rgba(255,255,255,0.2);
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-copy:hover {
    background: rgba(255,255,255,0.3);
}

.collaborators-list {
    margin-top: 10px;
}

.collaborator-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.collaborator-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4CAF50;
}

.field-locked {
    border: 2px solid #ff6b6b !important;
    background: rgba(255, 107, 107, 0.1) !important;
}

.field-locked::placeholder {
    color: #ff6b6b !important;
}

.lock-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff6b6b;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    z-index: 10;
}

/* Responsive Design - App-specific overrides */
@media (min-width: 768px) {
    .container {
        max-width: 500px;
        padding: 40px;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    .choice-btn {
        padding: 25px;
        font-size: 1.3rem;
    }
}
/* Button styles */
.btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn.primary {
    background: var(--gradient-primary);
    color: white;
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: 1px solid var(--bg-muted);
}

.btn.success {
    background: var(--gradient-success);
    color: white;
}

.btn.warning {
    background: var(--gradient-danger);
    color: white;
}

.btn.tertiary {
    background: var(--gradient-info);
    color: white;
}

.btn.large {
    padding: 18px 30px;
    font-size: 18px;
}

.btn.run-quiz {
    margin: 15px 0;
    padding: 20px 35px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.btn.run-quiz:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn.small {
    padding: 8px 16px;
    font-size: 14px;
}

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

.btn:disabled:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-overlay.show {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

.modal {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

.modal-content {
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: var(--gradient-primary);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
    text-align: center;
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-text {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

.modal-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 0 24px 24px 24px;
}

.modal-actions .btn {
    flex: 1;
    max-width: 120px;
}

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

@keyframes modalSlideIn {
    from { transform: scale(0.9) translateY(-20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Custom modal classes */
.participant-management-modal .modal-content {
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
}

.participant-management-modal .modal {
    background: var(--gradient-primary);
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.participant-management-modal .modal-body {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    margin: 0;
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #e5e7eb;
}

.participant-management-modal .modal-body::-webkit-scrollbar {
    width: 8px;
}

.participant-management-modal .modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.participant-management-modal .modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 4px;
}

.participant-management-modal .modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        max-width: none;
    }
    
    .participant-management-modal .modal-content {
        width: 98%;
        margin: 10px;
    }
}
/* Quiz Editor - Question editing and form styles */

/* Validation Warnings */
.validation-warning {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.3;
    display: none;
}

.validation-warning.error {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid rgba(239, 68, 68, 0.5);
    color: rgb(153, 27, 27);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.validation-warning.success {
    background: rgba(34, 197, 94, 0.15);
    border: 2px solid rgba(34, 197, 94, 0.5);
    color: rgb(21, 128, 61);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.validation-warning.info {
    background: rgba(59, 130, 246, 0.15);
    border: 2px solid rgba(59, 130, 246, 0.5);
    color: rgb(29, 78, 216);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.text-preview {
    margin-top: 8px;
    padding: 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    display: none;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.text-preview-content {
    font-size: 0.9rem;
    color: rgb(55, 65, 81);
    font-weight: 500;
}

/* Input validation states */
.input-valid {
    border-color: rgb(34, 197, 94) !important;
    background: rgba(34, 197, 94, 0.05) !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1) !important;
}

.input-error {
    border-color: rgb(239, 68, 68) !important;
    background: rgba(239, 68, 68, 0.05) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.input-info {
    border-color: rgb(59, 130, 246) !important;
    background: rgba(59, 130, 246, 0.05) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Collapsible Questions */
.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.question-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.question-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.collapse-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.collapse-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.collapse-icon {
    font-size: 12px;
    display: inline-block;
    width: 12px;
    text-align: center;
}

.question-content.hidden {
    display: none;
}

.question-item.collapsed {
    opacity: 0.7;
}

/* Drag and Drop */
.drag-handle {
    cursor: grab;
    color: rgba(255, 255, 255, 0.5);
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    user-select: none;
}

.drag-handle:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
}

.drag-handle:active {
    cursor: grabbing;
}

.question-item[draggable="true"] {
    cursor: grab;
}

.question-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.drop-indicator {
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
    margin: 5px 0;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Question Action Buttons */
.question-duplicate,
.question-delete {
    background: none;
    border: none;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.question-duplicate {
    color: rgba(59, 130, 246, 0.8);
}

.question-duplicate:hover {
    background: rgba(59, 130, 246, 0.1);
    color: rgb(59, 130, 246);
}

.question-delete {
    color: rgba(239, 68, 68, 0.8);
}

.question-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: rgb(239, 68, 68);
}

/* Preview Mode */
#preview-btn.active {
    background: rgba(59, 130, 246, 0.2);
    color: rgb(59, 130, 246);
    border-color: rgb(59, 130, 246);
}

.preview-header {
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.preview-header h3 {
    margin: 0 0 15px 0;
    color: rgb(99, 102, 241);
}

.preview-question {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.preview-question-header {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.preview-question-number {
    font-weight: bold;
    color: rgb(99, 102, 241);
    min-width: 30px;
}

.preview-question-text {
    font-weight: 500;
    color: white;
}

.preview-options {
    margin-left: 40px;
}

.preview-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    cursor: default;
    color: rgba(255, 255, 255, 0.8);
}

.preview-option input {
    pointer-events: none;
}

.preview-input-container {
    margin-left: 40px;
}

.preview-input {
    width: 100%;
    max-width: 300px;
    padding: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    margin-bottom: 8px;
}

.preview-note {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-style: italic;
    margin: 0;
}

.preview-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
}

/* Auto-save Indicator */
.editor-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.save-indicator {
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.save-indicator.saved {
    color: rgb(34, 197, 94);
    background: rgba(34, 197, 94, 0.1);
}

.save-indicator.unsaved {
    color: rgb(251, 191, 36);
    background: rgba(251, 191, 36, 0.1);
    animation: pulse 2s infinite;
}

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

/* Form input with clear button */
.input-with-clear {
    position: relative;
    margin-bottom: 15px;
}

.input-with-clear .input {
    margin-bottom: 0;
    padding-right: 40px;
}

.clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s ease;
}

.clear-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.form-actions .btn.small {
    padding: 8px 12px;
    font-size: 0.85rem;
}

/* Add Question Button Container */
.add-question-container {
    margin-top: 20px;
    padding: 20px;
    text-align: center;
    border: 2px dashed rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.02);
    transition: all 0.3s ease;
}

.add-question-container:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.05);
}

.add-question-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.add-question-btn {
    font-size: 1rem;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    min-width: 160px;
}

.empty-questions {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.empty-questions p {
    font-size: 1.1rem;
    margin: 0;
}

/* Quiz Editor Specific Styles */
.quiz-info {
    margin-bottom: 30px;
}

.quiz-code-display {
    background: rgba(255,255,255,0.1);
    padding: 10px 15px;
    border-radius: 10px;
    color: white;
    margin-top: 10px;
    text-align: center;
    font-weight: bold;
}

.quiz-code-display span {
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 15px;
    margin-left: 10px;
}

.questions-section {
    margin-bottom: 30px;
}

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

.section-header h3 {
    color: white;
    margin: 0;
    font-size: 1.2rem;
}

.question-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.question-type-dropdown {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    min-width: 130px;
}

.question-type-badge {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.question-type-badge.single { background: #3498db; }
.question-type-badge.multiple { background: #9b59b6; }
.question-type-badge.number { background: #e67e22; }
.question-type-badge.text { background: #27ae60; }

.question-item {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    border: 1px solid rgba(255,255,255,0.2);
}

.question-number {
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
}

.question-input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.9);
}

.question-input::placeholder {
    color: #666;
}

.answer-options {
    margin-top: 15px;
}

.answer-option {
    display: flex;
    align-items: center;
    margin: 8px 0;
    gap: 10px;
}

.answer-option input[type="radio"] {
    margin: 0;
    transform: scale(1.2);
}

.answer-option input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.8);
}

.answer-label {
    color: white;
    font-weight: bold;
    min-width: 20px;
}

.number-answer {
    display: flex;
    gap: 10px;
    align-items: center;
}

.number-answer input[type="number"] {
    flex: 2;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.9);
}

.number-answer input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.8);
}

.text-answer input {
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.9);
}

.multiple-choice-option {
    display: flex;
    align-items: center;
    margin: 8px 0;
    gap: 10px;
}

.multiple-choice-option input[type="checkbox"] {
    margin: 0;
    transform: scale(1.2);
}

.answer-hint {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    margin-top: 5px;
    font-style: italic;
}

/* Responsive adjustments for editor */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .question-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .answer-option {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }
    
    .answer-label {
        min-width: auto;
    }
    
    .add-question-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .add-question-controls .question-type-dropdown {
        width: 100%;
        max-width: 200px;
    }
}
/* Quiz Controller specific styles */
.controller-header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.quiz-info-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.quiz-info-bar span {
    background: rgba(71, 85, 105, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}

.status-badge {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.waiting {
    background: #fbbf24;
    color: #92400e;
}

.status-badge.active {
    background: #10b981;
    color: #064e3b;
}

.status-badge.running {
    background: #3b82f6;
    color: #1e3a8a;
}

/* Control Panel */
.control-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.start-quiz-section {
    text-align: center;
    margin-bottom: 30px;
}

.helper-text {
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Question Controls */
.question-controls-section {
    border-top: 2px solid rgba(99, 102, 241, 0.1);
    padding-top: 20px;
}

.question-overview {
    margin-bottom: 20px;
}

.question-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.question-item {
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 600;
}

.question-item:hover {
    background: rgba(99, 102, 241, 0.2);
}

.question-item.active {
    background: var(--primary-color);
    color: white;
    border-color: #4f46e5;
}

.current-question-info {
    background: rgba(59, 130, 246, 0.1);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.question-timing {
    margin-top: 10px;
}

.question-timing label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #374151;
}

.input {
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input.small {
    width: 120px;
}

/* Question Actions */
.question-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 15px;
}

.question-actions .btn {
    min-width: 140px;
}

/* Question Status */
.question-status {
    margin-top: 20px;
}

.countdown, .timer {
    text-align: center;
    padding: 16px;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 12px;
    margin-bottom: 10px;
}

.countdown.hidden, .timer.hidden {
    display: none;
}

.countdown-label, .timer-label {
    display: block;
    font-size: 0.9rem;
    color: #92400e;
    margin-bottom: 5px;
}

.countdown-timer, .timer-display {
    font-size: 2rem;
    font-weight: 700;
    color: #92400e;
}

.timer-bar {
    width: 100%;
    height: 8px;
    background: rgba(251, 191, 36, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.timer-progress {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    transition: width 1s linear;
    border-radius: 4px;
}

/* Question Preview */
.question-preview {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.question-display {
    min-height: 150px;
    padding: 20px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    border: 2px dashed #d1d5db;
}

.no-question {
    text-align: center;
    color: #6b7280;
    font-style: italic;
}

/* Controller Actions */
.controller-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 30px;
}

/* Live Participant Management in Controller */
.participant-management {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.participant-management::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light), #ec4899, #f59e0b);
    border-radius: 16px 16px 0 0;
}

.participant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(99, 102, 241, 0.1);
    padding-bottom: 15px;
}

.participant-header h3 {
    color: #374151;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #374151, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.participant-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(99, 102, 241, 0.1);
    padding: 8px 16px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.participant-stats span {
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 1px 2px rgba(99, 102, 241, 0.1);
}

#refresh-participants-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light)) !important;
    color: white !important;
    border: none !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2) !important;
}

#refresh-participants-btn:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3) !important;
}

#refresh-participants-btn.loading {
    animation: pulse 1s ease-in-out infinite;
}

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

.participant-controls {
    margin-bottom: 20px;
}

.view-toggle {
    display: flex;
    gap: 2px;
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 4px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(248, 250, 252, 0.8));
    backdrop-filter: blur(5px);
    width: fit-content;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.view-toggle .btn {
    border: none;
    background: transparent;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #6b7280;
    position: relative;
    overflow: hidden;
}

.view-toggle .btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transform: scale(1.02);
}

.participants-container {
    max-height: 450px;
    overflow-y: auto;
    border: 2px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8), rgba(255, 255, 255, 0.8));
    backdrop-filter: blur(5px);
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #e5e7eb;
}

.participants-container::-webkit-scrollbar {
    width: 8px;
}

.participants-container::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.8);
    border-radius: 4px;
}

.participants-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 4px;
}

.participants-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.no-participants {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border-radius: 8px;
    margin: 16px;
}

.no-participants p {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.no-participants .helper-text {
    font-size: 0.9rem;
    margin-top: 8px;
    opacity: 0.8;
}

/* Responsive Design for Controller */
@media (max-width: 768px) {
    .controller-header {
        padding: 16px;
    }
    
    .quiz-info-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .control-panel {
        padding: 20px 16px;
    }
    
    .question-actions {
        flex-direction: column;
    }
    
    .question-actions .btn {
        width: 100%;
        margin: 5px 0;
    }
    
    .question-list {
        max-height: 150px;
    }
    
    .participant-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .participant-stats {
        align-self: stretch;
        justify-content: space-between;
        background: rgba(99, 102, 241, 0.08);
        padding: 12px 16px;
        border-radius: 10px;
        margin-top: 10px;
    }
    
    .view-toggle {
        width: 100%;
        justify-content: center;
    }
    
    .view-toggle .btn {
        flex: 1;
        text-align: center;
    }
    
    .participants-container {
        max-height: 350px;
    }
    
    .participant-management {
        margin: 15px 0;
        padding: 20px 16px;
    }
    
    .controller-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .participant-management {
        padding: 16px 12px;
        border-radius: 12px;
    }
    
    .participant-header h3 {
        font-size: 1.1rem;
    }
}
/* Participant Management Styles */

/* Stats Section */
.participant-stats-section {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-left: 4px solid #22c55e;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.1);
    backdrop-filter: blur(5px);
}

.participant-stats-title {
    font-weight: 600;
    color: #15803d;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.participant-stats-info {
    color: #666;
    font-size: 0.9rem;
}

/* Management Header */
.participant-management-header {
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.participant-management-subtitle {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
}

/* Participant Cards */
.participant-card {
    padding: 16px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-left: 4px solid var(--primary-color);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.participant-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.participant-card:hover::before {
    opacity: 1;
}

.participant-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
    border-left-color: #4f46e5;
}

/* Participant Header */
.participant-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.participant-info {
    flex: 1;
}

.participant-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #374151, #4b5563);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.participant-id {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

.participant-score {
    font-weight: 800;
    color: #059669;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #059669, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 4px 8px;
    border-radius: 6px;
    background-color: rgba(5, 150, 105, 0.1);
}

.participant-details {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: rgba(107, 114, 128, 0.05);
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.participant-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-online {
    color: #059669;
    text-shadow: 0 0 8px rgba(5, 150, 105, 0.3);
}

.status-offline {
    color: #dc2626;
    text-shadow: 0 0 8px rgba(220, 38, 38, 0.3);
}

/* Action Buttons */
.participant-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.action-btn {
    font-size: 0.8rem;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    transform: scale(1.05) translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.action-btn:active {
    transform: scale(0.95);
    transition: all 0.1s;
}

.action-btn.add-point {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
}

.action-btn.subtract-point {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
}

.action-btn.set-score {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
}

.action-btn.remove-participant {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: white;
}

/* Tips Section */
.participant-tips {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.1);
    backdrop-filter: blur(5px);
}

.participant-tips-content {
    font-size: 0.85rem;
    color: #92400e;
    line-height: 1.5;
}

.participant-tips-title {
    font-weight: 600;
    margin-bottom: 8px;
}

/* Score Update Animation */
@keyframes scoreUpdate {
    0% { transform: scale(1); }
    25% { transform: scale(1.2) rotate(5deg); }
    50% { transform: scale(1.3) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(2deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.score-updated {
    animation: scoreUpdate 0.5s ease-in-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .participant-card {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .participant-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .participant-score {
        align-self: flex-end;
        font-size: 1.4rem;
    }
    
    .participant-actions {
        justify-content: space-between;
        gap: 6px;
    }
    
    .action-btn {
        flex: 1;
        min-width: 0;
        padding: 8px 4px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .participant-card {
        padding: 10px;
        margin-bottom: 6px;
    }
    
    .action-btn {
        padding: 6px 2px;
        font-size: 0.7rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .participant-card {
        background: linear-gradient(135deg, rgba(51, 65, 85, 0.9), rgba(71, 85, 105, 0.8));
        border-left-color: #a78bfa;
    }
    
    .participant-name {
        color: #e2e8f0;
        background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .participant-details {
        color: #94a3b8;
        background: rgba(71, 85, 105, 0.3);
    }
}

/* Accessibility improvements */
.action-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .participant-card {
        border: 2px solid var(--primary-color);
        background: white !important;
    }
    
    .action-btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .participant-card,
    .action-btn {
        transition: none;
    }
    
    .participant-card:hover,
    .action-btn:hover {
        transform: none;
    }
}
/* ===============================================
   PARTICIPANT MANAGEMENT STYLES
   =============================================== */

/* Modal Base Styling */
.modal-overlay.participant-management {
    backdrop-filter: blur(8px);
}

.modal-overlay.participant-management .modal {
    background: transparent;
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
}

.modal-overlay.participant-management .modal-content {
    background: var(--gradient-primary);
    border: none;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.modal-overlay.participant-management #modal-title {
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.modal-overlay.participant-management #modal-text {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 0 0 20px 20px;
    padding: 24px;
    margin: 0;
    max-height: 70vh;
    overflow-y: auto;
    border: none;
}

/* Scrollbar Styling */
.modal-overlay.participant-management #modal-text::-webkit-scrollbar {
    width: 8px;
}

.modal-overlay.participant-management #modal-text::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.modal-overlay.participant-management #modal-text::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 4px;
}

/* Quiz Statistics Section */
.participant-stats-header {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-left: 4px solid #22c55e;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.1);
}

.participant-stats-header .stats-title {
    font-weight: 600;
    color: #15803d;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.participant-stats-header .stats-content {
    color: #666;
    font-size: 0.9rem;
}

/* Management Header */
.participant-mgmt-header {
    margin-bottom: 20px;
}

.participant-mgmt-header .title {
    font-weight: 600;
    color: #374151;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.participant-mgmt-header .description {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
}

/* Participant Cards */
.participant-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-left: 4px solid var(--primary-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
}

.participant-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
    border-left-color: #4f46e5;
}

/* Participant Info Layout */
.participant-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.participant-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 5px;
}

.participant-id {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.participant-score {
    font-weight: 800;
    color: #059669;
    font-size: 1.2rem;
    background: rgba(5, 150, 105, 0.1);
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid rgba(5, 150, 105, 0.2);
}

/* Participant Details */
.participant-details {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(107, 114, 128, 0.05);
    border-radius: 6px;
}

.status-online {
    color: #059669;
    font-weight: 600;
}

.status-offline {
    color: #dc2626;
    font-weight: 600;
}

/* Action Buttons */
.participant-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.participant-action-btn {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.participant-action-btn:hover {
    transform: scale(1.05) translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.participant-action-btn:active {
    transform: scale(0.95);
    transition: all 0.1s;
}

/* Button Colors */
.btn-add-point {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
}

.btn-subtract-point {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
}

.btn-set-score {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
}

.btn-remove {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: white;
}

/* Tips Section */
.management-tips {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.1);
}

.management-tips .tips-title {
    font-size: 0.85rem;
    color: #92400e;
    font-weight: 600;
    margin-bottom: 8px;
}

.management-tips .tips-content {
    font-size: 0.8rem;
    color: #92400e;
    line-height: 1.4;
}

/* Score Update Animation */
@keyframes scoreUpdate {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(2deg); }
    50% { transform: scale(1.2) rotate(-2deg); }
    75% { transform: scale(1.1) rotate(1deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.score-updated {
    animation: scoreUpdate 0.5s ease-in-out;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .modal-overlay.participant-management .modal {
        width: 95%;
        margin: 20px auto;
    }
    
    .participant-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .participant-score {
        align-self: flex-end;
    }
    
    .participant-actions {
        justify-content: space-between;
    }
    
    .participant-action-btn {
        flex: 1;
        min-width: 0;
        font-size: 0.75rem;
        padding: 6px 8px;
    }
}

@media (max-width: 480px) {
    .modal-overlay.participant-management #modal-text {
        padding: 16px;
    }
    
    .participant-card {
        padding: 12px;
    }
    
    .participant-action-btn {
        padding: 6px 4px;
        font-size: 0.7rem;
    }
}
