/* GameTre - Modern CSS Styling */

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

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

/* Container Styles */
.main-container, .auth-container, .admin-container, .play-container, .welcome-container, .start-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Welcome Page Styles */
.welcome-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.welcome-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    max-width: 600px;
    width: 100%;
}

.logo-section {
    margin-bottom: 40px;
}

.welcome-logo {
    width: 150px;
    height: auto;
    margin-bottom: 20px;
    border-radius: 15px;
}

.app-title {
    font-size: 3rem;
    font-weight: bold;
    color: #667eea;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.app-subtitle {
    font-size: 1.2rem;
    color: #64748b;
    margin: 0 0 30px 0;
}

.welcome-form-section h2 {
    color: #667eea;
    margin-bottom: 15px;
}

.welcome-message {
    color: #64748b;
    margin-bottom: 30px;
    line-height: 1.6;
}

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

.welcome-form .form-group {
    margin-bottom: 25px;
}

.welcome-form input[type="text"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.1rem;
    text-align: center;
    transition: all 0.3s ease;
}

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

.btn-large {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-options {
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
    margin-top: 20px;
}

.auth-options p {
    margin: 8px 0;
    color: #64748b;
}

.auth-link {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.auth-link:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #5a67d8;
}

.registration-disabled {
    color: #f56565 !important;
    font-style: italic;
}

.guest-option {
    font-size: 0.9rem;
    color: #9ca3af !important;
    margin-top: 15px !important;
}

.welcome-footer {
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Start Page Styles */
.start-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.start-header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.header-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.header-logo {
    width: 80px;
    height: auto;
    border-radius: 10px;
}

.brand-text h1 {
    font-size: 2rem;
    color: #667eea;
    margin: 0;
    font-weight: bold;
}

.brand-text {
    text-align: center;
}

.brand-text p {
    color: #64748b;
    margin: 0;
    font-size: 0.9rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

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

.welcome-text {
    color: #667eea;
    font-size: 1.1rem;
}

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

.start-main {
    flex: 1;
}

.intro-section {
    text-align: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 40px 20px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.intro-section h2 {
    color: #ffffff;
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    font-weight: bold;
}

.intro-text {
    color: #f1f5f9;
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

.quiz-selection {
    margin-bottom: 50px;
}

.quiz-selection h3 {
    color: #667eea;
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
}

.quiz-selection h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.quiz-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quiz-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.quiz-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.quiz-card h4 {
    color: #667eea;
    font-size: 1.4rem;
    margin: 15px 0 10px 0;
    font-weight: bold;
}

.quiz-card p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
}

.quiz-actions {
    text-align: center;
    margin-top: 20px;
}

.quiz-actions .btn {
    padding: 12px 30px;
    font-weight: bold;
    border-radius: 10px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.no-quizzes {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.no-quizzes h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.start-footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.start-footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.start-footer a:hover {
    color: white;
}

/* Results Enhancement Styles */
.result-branding {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.result-logo {
    width: 80px;
    height: auto;
    margin-bottom: 10px;
    border-radius: 8px;
}

.result-branding h2 {
    color: #667eea;
    margin: 0;
    font-size: 1.8rem;
}

.user-name-display {
    background: rgba(102, 126, 234, 0.1);
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.user-name-label {
    color: #64748b;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 5px;
}

.user-name {
    color: #667eea;
    font-size: 1.3rem;
    font-weight: bold;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
}

.btn-success:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Mobile responsiveness for new elements */
@media (max-width: 768px) {
    .welcome-content {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .app-title {
        font-size: 2.5rem;
    }
    
    .start-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-brand {
        justify-content: center;
    }
    
    .quiz-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .user-name {
        font-size: 1.1rem;
    }
}

/* Quiz Section Styles */
.quiz-section {
    margin-bottom: 40px;
}

.quiz-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

/* Edit Comparison Styles */
.comparison-edit-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

.comparison-edit-item .comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
}

.comparison-edit-item .comparison-header h4 {
    color: #667eea;
    margin: 0;
}

.comparison-edit-item .video-info {
    color: #64748b;
    font-style: italic;
}

.result-definitions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.result-group {
    background: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.result-group h4 {
    color: #667eea;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

@media (max-width: 768px) {
    .result-definitions {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .button-group {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .comparison-edit-item .comparison-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Header Styles */
.main-header, .admin-header, .play-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header h1, .admin-header h1, .play-header h1 {
    color: #4a5568;
    font-size: 2.5rem;
    font-weight: 700;
}

.main-nav, .admin-nav, .play-nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: white;
    border-color: #cbd5e0;
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
}

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

/* Main Content */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* Guest Notice */
.guest-notice {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    text-align: center;
}

.guest-notice a {
    color: #2d3436;
    font-weight: 600;
    text-decoration: underline;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.video-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.video-card h3 {
    color: #2d3436;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.video-card p {
    color: #636e72;
    margin-bottom: 15px;
}

.progress-info {
    margin: 15px 0;
}

.completed {
    background: #00b894;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
}

.quiz-type-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.quiz-type-badge.interactive {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
}

.quiz-type-badge.comparison {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
    color: white;
}

.quiz-preview {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    border-left: 4px solid #667eea;
}

/* Authentication Forms */
.auth-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    max-width: 450px;
    margin: 50px auto;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2d3436;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2d3436;
    font-weight: 600;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.comparison-item {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 2px solid #e9ecef;
    position: relative;
}

.comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
}

.comparison-header h3 {
    margin: 0;
    color: #495057;
    font-size: 1.3rem;
}

.form-actions {
    text-align: center;
    margin: 30px 0;
}

.remove-comparison {
    font-size: 14px;
    padding: 8px 15px;
}

.result-definitions {
    background: #e8f4fd;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 2px solid #74b9ff;
}

.result-definitions h3 {
    margin: 0 0 10px 0;
    color: #2d3436;
    font-size: 1.4rem;
}

.help-text {
    color: #636e72;
    font-size: 14px;
    margin-bottom: 20px;
    font-style: italic;
}

/* Settings Page Styles */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
}

.settings-container h2 {
    color: #2d3436;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.settings-form {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.setting-info h3 {
    margin: 0 0 8px 0;
    color: #2d3436;
    font-size: 1.2rem;
}

.setting-description {
    margin: 0;
    color: #636e72;
    font-size: 14px;
    line-height: 1.5;
    max-width: 400px;
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #667eea;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-weight: 600;
    color: #495057;
    min-width: 70px;
}

/* Settings Info */
.settings-info {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    border-left: 4px solid #667eea;
}

.settings-info h3 {
    margin: 0 0 15px 0;
    color: #2d3436;
    font-size: 1.2rem;
}

.status-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-label {
    font-weight: 600;
    color: #495057;
}

.status-value {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
}

.status-value.enabled {
    background: #d4edda;
    color: #155724;
}

.status-value.disabled {
    background: #f8d7da;
    color: #721c24;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .setting-control {
        align-self: flex-end;
    }
}

.auth-links {
    text-align: center;
    margin-top: 25px;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
}

.alert-error {
    background: linear-gradient(135deg, #ff7675 0%, #fd79a8 100%);
    color: white;
}

.alert-success {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    color: white;
}

/* Admin Styles */
.admin-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.videos-section h2, .quiz-config h2, .existing-buttons h2 {
    color: #2d3436;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.upload-form, .quiz-form {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.video-meta {
    display: flex;
    gap: 15px;
    margin: 10px 0;
}

.video-meta small {
    color: #636e72;
}

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

/* Quiz Button Configuration */
.buttons-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.button-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.button-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.button-info h4 {
    color: #2d3436;
    margin: 0;
}

.button-type {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.button-type.audio {
    background: #74b9ff;
    color: white;
}

.button-type.visual {
    background: #fd79a8;
    color: white;
}

.button-timing {
    color: #636e72;
    font-size: 14px;
}

/* Video Player Styles */
.play-main {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.video-section {
    position: relative;
    margin-bottom: 20px;
}

#gameVideo {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: block;
    margin: 0 auto;
}

/* Quiz Buttons next to time display */
.quiz-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.quiz-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid #667eea;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    color: #2d3436;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(15px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.quiz-btn:hover {
    background: #667eea;
    color: white;
    transform: scale(1.05);
}

.quiz-btn-audio {
    border-color: #74b9ff;
}

.quiz-btn-audio:hover {
    background: #74b9ff;
}

.quiz-btn-visual {
    border-color: #fd79a8;
}

.quiz-btn-visual:hover {
    background: #fd79a8;
}

.quiz-icon {
    font-size: 20px;
}

/* Quiz Controls */
.quiz-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 25px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    gap: 20px;
}

.quiz-info {
    color: #2d3436;
    font-weight: 600;
    font-size: 18px;
    white-space: nowrap;
    min-width: 120px;
}

/* Comparison Quiz Styles */
.comparison-layout {
    background: linear-gradient(135deg, #FF5722 0%, #FF7043 50%, #FF8A65 100%);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.comparison-layout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.2) 50%, transparent 60%),
        linear-gradient(-45deg, transparent 40%, rgba(255, 255, 255, 0.15) 50%, transparent 60%),
        linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.1) 50%, transparent 60%);
    background-size: 30px 30px, 40px 40px, 25px 25px;
    background-position: 0 0, 15px 15px, 8px 8px;
    z-index: 1;
}

.comparison-header-logo {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.comparison-header-logo img {
    width: 120px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.comparison-header-logo h2 {
    color: white;
    font-size: 1.8rem;
    margin: 15px 0 5px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.comparison-header-logo p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.comparison-layout > * {
    position: relative;
    z-index: 2;
}

.video-pair {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    margin-bottom: 30px;
    align-items: center;
}

.video-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    background: #000;
    min-height: 250px;
}

.comparison-center-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FF8A65 0%, #FF7043 100%);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 4px solid rgba(255, 255, 255, 0.9);
}

.comparison-center-logo img {
    width: 50px;
    height: auto;
    border-radius: 8px;
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
}

.video-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.play-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

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

.video-time {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    background: rgba(248, 249, 250, 0.8);
    padding: 8px 15px;
    border-radius: 20px;
    min-width: 100px;
    text-align: center;
}

.question-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.answer-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.comparison-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid #667eea;
    padding: 20px 30px;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #2d3436;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comparison-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border-color: #5a67d8;
}

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

.option-a {
    border-color: #74b9ff;
}

.option-a:hover {
    border-color: #0984e3;
}

.option-b {
    border-color: #fd79a8;
}

.option-b:hover {
    border-color: #e84393;
}

.selected-response {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 18px;
    margin: 20px 0;
}

/* Sequence Progress */
.sequence-progress {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
}

/* Personality Result Display */
.personality-result {
    text-align: center;
    margin-bottom: 30px;
}

.result-header {
    margin-bottom: 25px;
}

.result-header h3 {
    font-size: 2rem;
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-subtitle {
    font-size: 1.2rem;
    color: #495057;
    font-weight: 600;
}

.percentage-bars {
    margin-bottom: 25px;
}

.percentage-item {
    margin-bottom: 20px;
}

.percentage-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
}

.percentage-value {
    font-size: 1.1rem;
    color: #495057;
}

.percentage-bar {
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.percentage-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 1s ease-in-out;
    width: 0%;
}

.left-fill {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
}

.right-fill {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
}

.result-description {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    text-align: left;
}

.result-description p {
    margin: 0;
    color: #495057;
    line-height: 1.6;
}

/* Response Details */
.response-details {
    border-top: 2px solid #e9ecef;
    padding-top: 25px;
}

.response-details h4 {
    margin: 0 0 15px 0;
    color: #495057;
    text-align: center;
}

.final-results {
    margin: 20px 0;
}

.response-summary {
    text-align: left;
}

.response-item {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.response-item.left-choice {
    border-left-color: #74b9ff;
    background: #f0f8ff;
}

.response-item.right-choice {
    border-left-color: #fd79a8;
    background: #fff0f5;
}

.response-item small {
    color: #6c757d;
    margin-left: 10px;
}

.result-type {
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.left-choice .result-type {
    background: rgba(116, 185, 255, 0.2);
    color: #0984e3;
}

.right-choice .result-type {
    background: rgba(253, 121, 168, 0.2);
    color: #e84393;
}

.response-time {
    font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .video-pair {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .comparison-center-logo {
        order: -1;
        margin-bottom: 20px;
        width: 60px;
        height: 60px;
        justify-self: center;
    }
    
    .comparison-center-logo img {
        width: 35px;
    }
    
    .answer-buttons {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .comparison-btn {
        padding: 15px 20px;
        font-size: 16px;
        min-height: 60px;
    }
    
    .question-text {
        font-size: 1.3rem;
    }
    
    .sequence-progress {
        padding: 15px;
    }
    
    .video-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .play-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .video-time {
        font-size: 14px;
        min-width: 80px;
    }
    
    .result-header h3 {
        font-size: 1.5rem;
    }
    
    .result-subtitle {
        font-size: 1rem;
    }
    
    .response-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .response-item small {
        margin-left: 0;
    }
}

/* Results Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.modal-content h2 {
    color: #2d3436;
    margin-bottom: 30px;
    font-size: 2rem;
}

.results-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.result-category {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    padding: 25px;
    border-radius: 15px;
    color: white;
}

.result-category:nth-child(2) {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
}

.result-category h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.score {
    font-size: 3rem;
    font-weight: 700;
    display: block;
}

.modal-actions {
    margin-top: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-header, .admin-header, .play-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .main-header h1, .admin-header h1, .play-header h1 {
        font-size: 2rem;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .quiz-controls {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .quiz-buttons {
        gap: 10px;
    }
    
    .quiz-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .results-content {
        grid-template-columns: 1fr;
    }
    
    .admin-actions {
        flex-direction: column;
    }
    
    .button-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .main-container, .auth-container, .admin-container, .play-container {
        padding: 10px;
    }
    
    .auth-form {
        padding: 25px;
        margin: 20px auto;
    }
    
    .quiz-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}
