/* ========================================
   CLASSROOM ACTIVITY STYLES
   ======================================== */

/* Classroom Hero */
.classroom-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.classroom-hero.student {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.classroom-hero.dashboard {
    background: linear-gradient(135deg, #4A90E2 0%, #667eea 100%);
}

.classroom-hero h1 {
    color: white;
    margin-bottom: 0.5rem;
}

.classroom-hero p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.classroom-hero .back-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.classroom-hero .back-link:hover {
    color: white;
}

/* Choice Cards (Hub Page) */
.classroom-choice-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 700px;
    margin: 3rem auto;
}

.classroom-choice-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.classroom-choice-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.classroom-choice-card.teacher:hover {
    border-color: #667eea;
}

.classroom-choice-card.student:hover {
    border-color: #11998e;
}

.classroom-choice-card .choice-icon {
    margin-bottom: 1.5rem;
    color: #667eea;
}

.classroom-choice-card.student .choice-icon {
    color: #11998e;
}

.classroom-choice-card h2 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.classroom-choice-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.classroom-choice-card .choice-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-weight: 600;
}

.classroom-choice-card.student .choice-button {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

/* Classroom Card (Forms) */
.classroom-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 500px;
    margin: 2rem auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.classroom-card.join-card {
    max-width: 400px;
}

.classroom-card .form-group {
    margin-bottom: 1.5rem;
}

.classroom-card label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.classroom-card input,
.classroom-card select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.classroom-card input:focus,
.classroom-card select:focus {
    outline: none;
    border-color: #667eea;
}

.classroom-card input#session-code {
    text-transform: uppercase;
    font-size: 1.5rem;
    letter-spacing: 0.2em;
    text-align: center;
    font-weight: 600;
}

.form-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f0f4ff;
    border-radius: 8px;
    color: #4A5568;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.form-info svg {
    flex-shrink: 0;
    color: #667eea;
}

.form-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 0.75rem;
    line-height: 1.4;
}

.form-hint svg {
    flex-shrink: 0;
    color: #94a3b8;
    margin-top: 0.1rem;
}

/* Checkbox group for question types */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: normal;
}

.checkbox-label:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.checkbox-label input[type="checkbox"],
.checkbox-label input[type="radio"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: #667eea;
}

.checkbox-label input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.checkbox-label.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}

.checkbox-label.coming-soon:hover {
    border-color: #e2e8f0;
    background: #f8fafc;
}

.checkbox-text {
    flex: 1;
    font-size: 0.95rem;
    color: #333;
}

.checkbox-note {
    font-size: 0.8rem;
    color: #718096;
    font-weight: normal;
}

.form-error {
    padding: 0.75rem 1rem;
    background: #fff5f5;
    border: 1px solid #fc8181;
    border-radius: 8px;
    color: #c53030;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    text-align: center;
}

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

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

.btn-primary.btn-large {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: #f0f4ff;
    color: #667eea;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #e0e7ff;
}

.btn-secondary svg {
    flex-shrink: 0;
}

.btn-danger {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #fc8181;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-danger:hover {
    background: #fed7d7;
}

/* Login Prompt */
.login-prompt {
    text-align: center;
    padding: 2rem 0;
}

.login-prompt svg {
    color: #667eea;
    margin-bottom: 1rem;
}

.login-prompt h2 {
    margin-bottom: 0.5rem;
}

.login-prompt p {
    color: #666;
    margin-bottom: 1.5rem;
}

/* Session Created Success */
.session-success {
    text-align: center;
}

.session-success .success-icon {
    color: #28a745;
    margin-bottom: 1rem;
}

.session-success h2 {
    margin-bottom: 0.5rem;
}

.session-success p {
    color: #666;
    margin-bottom: 1.5rem;
}

.session-code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.session-code-display span {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #667eea;
    font-family: monospace;
}

/* Share Link Section */
.share-link-section {
    margin-bottom: 2rem;
    text-align: center;
}

.share-link-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.share-link-box {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem 0.75rem 0.5rem 1rem;
}

.share-link-text {
    font-size: 0.95rem;
    color: #4A5568;
    font-family: monospace;
    word-break: break-all;
}

.copy-btn {
    padding: 0.5rem;
    background: #f0f4ff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #667eea;
    transition: background 0.2s ease;
}

.copy-btn:hover {
    background: #e0e7ff;
}

.copy-btn-light {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    transition: background 0.2s ease;
}

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

.session-link-container {
    margin-bottom: 2rem;
}

.session-link-container label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.link-copy-group {
    display: flex;
    gap: 0.5rem;
}

.link-copy-group input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #f7fafc;
}

/* Selected Activity Display */
.selected-activity-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.selected-activity-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.selected-activity-name {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Student Instructions Box */
.student-instructions-box {
    background: #f0f4ff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.instructions-label {
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.instructions-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.instruction-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    color: #333;
}

.step-number {
    width: 28px;
    height: 28px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.instruction-step strong {
    color: #667eea;
}

/* Fullscreen Display */
.fullscreen-display {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
}

.fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.fullscreen-content {
    text-align: center;
    color: white;
    padding: 2rem;
}

.fullscreen-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

.fullscreen-step {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.fullscreen-step-num {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.fullscreen-step-text {
    font-size: 1.8rem;
    opacity: 0.9;
}

.fullscreen-url {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 3rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    display: inline-block;
}

.fullscreen-code {
    font-size: 6rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    font-family: monospace;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

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

/* Dashboard */
.dashboard-code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.dashboard-code-display span {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    font-family: monospace;
}

.dashboard-loading,
.dashboard-error {
    text-align: center;
    padding: 3rem;
}

.dashboard-error {
    color: #c53030;
}

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

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

.live-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f0fff4;
    border-radius: 8px;
    color: #276749;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: #48bb78;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

/* Students Table */
.students-table-container {
    background: white;
    border-radius: 12px;
    overflow-x: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.students-table {
    width: 100%;
    border-collapse: collapse;
}

.students-table th,
.students-table td {
    padding: 1rem;
    text-align: left;
}

.students-table th {
    background: #f7fafc;
    font-weight: 600;
    color: #4A5568;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.students-table tr:not(:last-child) td {
    border-bottom: 1px solid #e2e8f0;
}

.students-table .empty-row td {
    text-align: center;
    color: #999;
    padding: 2rem;
}

.students-table .student-name {
    font-weight: 600;
}

.students-table .score {
    font-weight: 600;
    color: #667eea;
}

.students-table .time {
    color: #999;
    font-size: 0.9rem;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.status-progress {
    background: #fff3cd;
    color: #856404;
}

.status-badge.status-completed {
    background: #d4edda;
    color: #155724;
}

.dashboard-actions {
    margin-top: 2rem;
    text-align: center;
}

/* Detailed Dashboard Table */
.students-table.detailed th.question-col {
    text-align: center;
    padding: 0.75rem 0.5rem;
    min-width: 45px;
}

.students-table.detailed td.q-cell {
    text-align: center;
    padding: 0.5rem;
    position: relative;
}

.students-table.detailed td.q-cell.clickable {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.students-table.detailed td.q-cell.clickable:hover {
    background-color: #f0f4ff;
}

.q-icon {
    font-size: 1.1rem;
    font-weight: 700;
}

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

.q-icon.wrong {
    color: #dc3545;
}

.q-icon.pending {
    color: #ffc107;
    font-size: 0.8rem;
}

.q-retries {
    position: absolute;
    top: 1px;
    right: 2px;
    font-size: 0.55rem;
    font-weight: 600;
    color: #e08080;
    letter-spacing: -1px;
    line-height: 1;
    opacity: 0.7;
}

/* Question Detail Modal */
.question-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.question-modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.question-modal-content h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.modal-student-name {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.modal-graph-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.modal-answers {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-answer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.answer-label {
    color: #666;
    font-size: 0.9rem;
}

.answer-value {
    font-weight: 600;
    font-family: 'Monaco', 'Consolas', monospace;
}

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

.answer-value.wrong {
    color: #dc3545;
}

/* Review Modal (expanded) */
.review-modal {
    max-width: 600px;
}

.review-modal-header {
    margin-bottom: 1rem;
}

.review-result-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.review-result-badge.correct {
    background: #d4edda;
    color: #155724;
}

.review-result-badge.wrong {
    background: #f8d7da;
    color: #721c24;
}

/* Attempt Tabs */
.review-attempt-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.review-tab {
    padding: 0.4rem 0.8rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.review-tab.correct {
    border-color: #c3e6cb;
}

.review-tab.wrong {
    border-color: #f5c6cb;
}

.review-tab.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.review-tab:hover:not(.active) {
    background: #f0f0f0;
}

/* Review Content */
.review-content {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 120px;
}

/* Shared review styles */
.review-answer-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.review-answer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.review-answer-row:last-child {
    border-bottom: none;
}

.review-label {
    color: #666;
    font-size: 0.9rem;
}

.review-value {
    font-weight: 600;
    font-family: 'Monaco', 'Consolas', monospace;
}

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

.review-value.wrong {
    color: #dc3545;
}

/* Flashcard review */
.review-flashcard .review-graph-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.review-flashcard .review-graph-container svg {
    max-width: 100%;
    height: auto;
}

/* Question text */
.review-question-text {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 1rem;
    color: #333;
}

.review-dimensions {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

/* Best Buy review */
.review-deals {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.review-deal-card {
    flex: 1;
    min-width: 120px;
    padding: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    text-align: center;
    background: white;
}

.review-deal-card.selected {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.review-deal-card.best {
    border-color: #28a745;
}

.review-deal-card.selected.best {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.review-deal-label {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.review-deal-desc {
    font-size: 0.85rem;
    color: #666;
}

.review-deal-price {
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.review-deal-badge {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
    background: #e8eaf6;
    display: inline-block;
}

/* Money Shop review */
.review-item-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.review-product-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

.review-item-details {
    flex: 1;
}

.review-item-name {
    font-weight: 600;
    font-size: 1.05rem;
}

.review-item-price {
    color: #666;
    font-size: 0.9rem;
}

.review-deal-chosen {
    font-size: 0.75rem;
    color: #667eea;
    font-weight: 600;
    margin-top: 0.25rem;
}

.review-deal-total {
    font-weight: 600;
    font-size: 1rem;
    margin-top: 0.25rem;
}

.review-money-placed {
    margin-bottom: 1rem;
}

.review-coins {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
    padding: 0.75rem;
    background: #f0ebe3;
    border-radius: 12px;
    min-height: 60px;
}

.review-money-piece {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.review-money-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.review-money-piece.note .review-money-img {
    height: 40px;
}

.review-money-total {
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.review-money-total.correct {
    color: #28a745;
}

.review-money-total.wrong {
    color: #dc3545;
}

/* Painter review */
.review-wall-scene {
    position: relative;
    margin-bottom: 1rem;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
}

.review-wall-image {
    width: 100%;
    height: auto;
    display: block;
}

.review-wall-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.review-wall-overlay .painter-measure-line {
    stroke: #1a1a1a;
    stroke-linecap: round;
    fill: none;
    animation: none;
}

.review-wall-overlay .painter-measure-arrow {
    fill: #1a1a1a;
    stroke: none;
}

.review-wall-overlay .painter-measure-label-bg {
    fill: rgba(20, 20, 30, 0.88);
    stroke: #1a1a1a;
    stroke-width: 2;
    opacity: 1;
    animation: none;
}

.review-wall-overlay .painter-measure-label-text {
    fill: white;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.review-wall-areas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.review-wall-area-chip {
    padding: 0.3rem 0.75rem;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2e7d32;
}

/* Activity Header */
.classroom-activity-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 0;
    color: white;
}

.student-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.student-info #student-name-display {
    font-weight: 600;
}

.session-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-family: monospace;
    letter-spacing: 0.1em;
}

/* Results Overlay */
.results-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.results-content {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    max-width: 400px;
    margin: 1rem;
}

.results-content .success-icon {
    color: #28a745;
    margin-bottom: 1rem;
}

.results-content h2 {
    margin-bottom: 0.5rem;
}

.results-content p {
    color: #666;
    margin-bottom: 1.5rem;
}

.final-score {
    margin-bottom: 2rem;
}

.final-score #final-score {
    font-size: 4rem;
    font-weight: 700;
    color: #667eea;
}

.final-score .score-label {
    display: block;
    color: #666;
}

.redirect-notice {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1rem;
}

/* Loading/Error states */
.loading-state,
.error-state {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* My Activities Page */
.activities-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.activities-header .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.activities-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border-left: 4px solid #667eea;
}

.activity-card.expired {
    border-left-color: #adb5bd;
    opacity: 0.8;
}

.activity-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.activity-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    color: #333;
}

.activity-date {
    font-size: 0.85rem;
    color: #666;
}

.activity-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.activity-status.active {
    background: #d4edda;
    color: #155724;
}

.activity-status.expired {
    background: #e9ecef;
    color: #6c757d;
}

.activity-card-body {
    padding: 1.25rem 1.5rem;
}

.activity-stats {
    display: flex;
    gap: 2rem;
}

.activity-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.activity-stat .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #667eea;
    font-family: monospace;
    letter-spacing: 0.05em;
}

.activity-stat .stat-label {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

.activity-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: #fafafa;
    border-top: 1px solid #eee;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #555;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.action-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f8f9ff;
}

.action-btn.dashboard-btn {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.action-btn.dashboard-btn:hover {
    background: #5a6fd6;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.empty-state svg {
    color: #ccc;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 600px) {
    .classroom-choice-cards {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    .classroom-card {
        padding: 1.5rem;
        margin: 1rem;
    }

    .session-code-display span {
        font-size: 2rem;
    }

    .dashboard-code-display span {
        font-size: 1.8rem;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .students-table th,
    .students-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }

    /* Detailed table responsive */
    .students-table.detailed th.question-col {
        padding: 0.5rem 0.25rem;
        min-width: 35px;
        font-size: 0.75rem;
    }

    .students-table.detailed td.q-cell {
        padding: 0.4rem 0.25rem;
    }

    .q-icon {
        font-size: 0.95rem;
    }

    .q-retries {
        font-size: 0.45rem;
    }

    .question-modal-content {
        padding: 1.5rem;
    }

    .modal-graph-container svg {
        max-width: 100%;
        height: auto;
    }

    /* Fullscreen responsive */
    .fullscreen-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .fullscreen-step-num {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .fullscreen-step-text {
        font-size: 1.3rem;
    }

    .fullscreen-url {
        font-size: 1.5rem;
        padding: 0.75rem 1.5rem;
        margin-bottom: 2rem;
    }

    .fullscreen-code {
        font-size: 3rem;
        letter-spacing: 0.2em;
    }

    .fullscreen-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}


/* ========================================
   SHARED LOBBY UI (join code, players, start controls)
   ======================================== */
.join-code-section {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.join-code-section h2 {
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.session-code-display {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--primary-color);
    font-family: monospace;
}

.join-url {
    margin-top: 1rem;
    color: #64748b;
    font-size: 0.9rem;
}

.share-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.share-link-container {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    max-width: 400px;
}

.share-link-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #64748b;
    background: #f8fafc;
    min-width: 0;
}

.share-link-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-icon.copied {
    border-color: #10b981;
    color: #10b981;
    background: #ecfdf5;
}

.share-actions .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.join-code-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.25rem;
}

.players-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

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

.players-header h3 {
    font-size: 1rem;
    color: var(--dark-color);
}

.player-count-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.player-list {
    max-height: 300px;
    overflow-y: auto;
}

.no-players {
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
}

.player-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

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

.player-number {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.player-name {
    flex: 1;
    font-weight: 500;
}

.player-status {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.player-status.ready {
    background: #d1fae5;
    color: #065f46;
}

.start-controls {
    text-align: center;
}

.game-settings {
    margin-bottom: 1.5rem;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.setting-item span {
    color: #64748b;
}

.setting-item select {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

.start-hint {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #94a3b8;
}

@media (max-width: 768px) {
    .session-code-display {
        font-size: 2.5rem;
    }
}
