/* Kahoot CSS - Adapted for elderly users */

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

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

/* Container Styles */
.admin-dashboard,
.join-container,
.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.admin-header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.admin-header h1 {
    font-size: 36px;
    color: #46178f;
}

/* Stats Container */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 24px;
    color: #666;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 48px;
    font-weight: bold;
    color: #46178f;
    margin-bottom: 20px;
}

/* Quick Actions */
.quick-actions {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.quick-actions h2 {
    font-size: 28px;
    color: #46178f;
    margin-bottom: 20px;
}

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

/* Content Sections */
.content-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.content-section h2 {
    font-size: 28px;
    color: #46178f;
    margin-bottom: 20px;
}

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

/* Forms */
.form-large {
    max-width: 800px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.input-large {
    width: 100%;
    padding: 15px 20px;
    font-size: 18px;
    border: 3px solid #ddd;
    border-radius: 10px;
    transition: border-color 0.3s ease;
}

.input-large:focus {
    outline: none;
    border-color: #46178f;
}

textarea.input-large {
    min-height: 120px;
    resize: vertical;
}

select.input-large {
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

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

.btn-primary {
    background: linear-gradient(135deg, #46178f, #1368ce);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #26890c, #1e6b0a);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #e21b3c, #b01530);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #d89e00, #a87a00);
    color: white;
}

.btn-large {
    padding: 20px 40px;
    font-size: 22px;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-small {
    padding: 10px 20px;
    font-size: 16px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 18px;
}

.data-table thead {
    background: linear-gradient(135deg, #46178f, #1368ce);
    color: white;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid #ddd;
}

.data-table th {
    font-weight: bold;
    font-size: 20px;
}

.data-table tbody tr:hover {
    background: #f5f5f5;
}

.room-code {
    font-family: 'Courier New', monospace;
    font-size: 22px;
    font-weight: bold;
    color: #46178f;
}

.score {
    font-weight: bold;
    color: #26890c;
}

/* Status Badges */
.status {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 16px;
}

.status-waiting {
    background: #ffc107;
    color: #333;
}

.status-active {
    background: #26890c;
    color: white;
}

.status-finished {
    background: #6c757d;
    color: white;
}

/* Alerts */
.alert {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: bold;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 3px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 3px solid #f5c6cb;
}

/* Login Container */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.login-box h1 {
    font-size: 36px;
    color: #46178f;
    margin-bottom: 30px;
}

.hint {
    margin-top: 20px;
    color: #666;
    font-size: 16px;
}

/* Join Container */
.join-box {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 48px;
    color: #46178f;
    margin-bottom: 10px;
}

.logo p {
    font-size: 22px;
    color: #666;
}

.info-box {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-top: 30px;
    border-left: 5px solid #46178f;
}

.info-box h3 {
    font-size: 24px;
    color: #46178f;
    margin-bottom: 15px;
}

.info-box ol {
    margin-left: 30px;
    font-size: 18px;
    line-height: 2;
}

.admin-link {
    text-align: center;
    margin-top: 30px;
}

.admin-link a {
    color: #46178f;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
}

.admin-link a:hover {
    text-decoration: underline;
}

/* Answer Input */
.answer-input {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.answer-input input[type="radio"] {
    width: 25px;
    height: 25px;
    cursor: pointer;
}

/* Game Container */
.game-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    min-height: 100vh;
}

/* Game Screens */
.screen {
    padding: 20px;
    text-align: center;
}

.loading-screen h2 {
    font-size: 32px;
    color: #46178f;
    margin-bottom: 15px;
}

.loading-screen p {
    font-size: 24px;
    color: #666;
}

/* Loader Animation */
.loader {
    width: 80px;
    height: 80px;
    border: 8px solid #f3f3f3;
    border-top: 8px solid #46178f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

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

/* Game Header */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #46178f, #1368ce);
    color: white;
    border-radius: 15px;
    margin-bottom: 30px;
}

.question-counter {
    font-size: 24px;
    font-weight: bold;
}

.timer {
    font-size: 48px;
    font-weight: bold;
    padding: 10px 30px;
    background: white;
    color: #46178f;
    border-radius: 10px;
    min-width: 100px;
}

.timer-warning {
    color: #e21b3c;
    animation: pulse 0.5s ease-in-out infinite;
}

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

/* Question Content */
.question-content {
    margin-bottom: 30px;
}

.question-text {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
}

/* Answers Grid */
.answers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.answer-button {
    padding: 40px 30px;
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
}

.answer-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.answer-button:active {
    transform: translateY(0);
}

.answer-button.selected {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.answer-button.correct {
    animation: correct-pulse 0.5s ease-in-out infinite;
}

@keyframes correct-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

.answer-letter {
    font-size: 36px;
    font-weight: bold;
    min-width: 50px;
}

.answer-text {
    flex: 1;
    text-align: left;
}

/* Result Screen */
.result-icon {
    font-size: 120px;
    font-weight: bold;
    margin-bottom: 20px;
}

.result-screen h2 {
    font-size: 48px;
    margin-bottom: 15px;
}

.result-screen p {
    font-size: 28px;
    color: #666;
    margin-bottom: 20px;
}

.points-earned {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 30px;
}

/* Leaderboard Screen */
.leaderboard-screen h2 {
    font-size: 36px;
    color: #46178f;
    margin-bottom: 30px;
}

.leaderboard-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 30px;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 22px;
}

.leaderboard-item .position {
    font-size: 28px;
    font-weight: bold;
    color: #46178f;
    min-width: 60px;
}

.leaderboard-item .nickname {
    flex: 1;
    text-align: left;
    padding: 0 20px;
}

.leaderboard-item .score {
    font-weight: bold;
    color: #26890c;
}

/* Final Screen */
.final-screen h2 {
    font-size: 48px;
    color: #46178f;
    margin-bottom: 40px;
}

.final-score,
.final-position {
    margin-bottom: 30px;
}

.final-score p,
.final-position p {
    font-size: 24px;
    color: #666;
    margin-bottom: 10px;
}

.final-score h1,
.final-position h1 {
    font-size: 72px;
    font-weight: bold;
    color: #46178f;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    
    .admin-header h1 {
        font-size: 28px;
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .answers-grid {
        grid-template-columns: 1fr;
    }
    
    .answer-button {
        padding: 30px 20px;
        font-size: 20px;
    }
    
    .question-text {
        font-size: 24px;
    }
    
    .timer {
        font-size: 36px;
        padding: 8px 20px;
    }
    
    .logo h1 {
        font-size: 36px;
    }
    
    .logo p {
        font-size: 18px;
    }
}

/* Accessibility Improvements */
:focus {
    outline: 3px solid #46178f;
    outline-offset: 2px;
}

button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid #46178f;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #46178f;
        border: 3px solid #000;
    }
    
    .btn-success {
        background: #26890c;
        border: 3px solid #000;
    }
    
    .btn-danger {
        background: #e21b3c;
        border: 3px solid #000;
    }
}

/* Print Styles */
@media print {
    .btn,
    .admin-header,
    .form-actions {
        display: none;
    }
}
