* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --secondary-light: #a78bfa;
    --success-color: #10b981;
    --success-light: #34d399;
    --danger-color: #ef4444;
    --danger-light: #f87171;
    --warning-color: #f59e0b;
    --warning-light: #fbbf24;
    --bg-color: #f8fafc;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: #ffffff;
    --card-bg-light: rgba(255, 255, 255, 0.95);
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--bg-color);
    background-image: 
        url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='grid' width='100' height='100' patternUnits='userSpaceOnUse'%3E%3Cpath d='M 100 0 L 0 0 0 100' fill='none' stroke='%23e2e8f0' stroke-width='0.5'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100' height='100' fill='url(%23grid)'/%3E%3C/svg%3E"),
        linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    color: var(--text-color);
    font-size: var(--font-size);
    min-height: 100vh;
    padding: 0;
    direction: rtl;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236366f1' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

body > * {
    position: relative;
    z-index: 1;
}

body.loaded {
    animation: fadeInBody 0.5s ease-out;
}

@keyframes fadeInBody {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Prevent text selection on buttons */
.btn, .role-card, .user-item, .challenge-item, .report-item {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* App-like touch feedback */
@media (hover: none) and (pointer: coarse) {
    .btn:active, .user-item:active, .challenge-item:active, .report-item:active {
        opacity: 0.7;
    }
}

body.high-contrast {
    --bg-color: #000000;
    --card-bg: #ffffff;
    --text-color: #000000;
    --border-color: #000000;
}

body.large-text {
    --font-size: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Screen Management */
.screen {
    display: none;
    animation: slideIn 0.3s ease-out;
    min-height: calc(100vh - 40px);
}

.screen.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Welcome Screen */
.logo {
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.icon-large {
    font-size: 80px;
    display: block;
    margin-bottom: 20px;
}

.logo h1 {
    font-size: 48px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 20px;
    opacity: 0.9;
}

.disclosure-box {
    background: var(--card-bg-light);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    border-right: 4px solid var(--warning-color);
    position: relative;
    overflow: hidden;
}

.disclosure-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.disclosure-box h3 {
    color: var(--warning-color);
    margin-bottom: 10px;
}

.welcome-form {
    background: var(--card-bg-light);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.welcome-form::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: var(--font-size);
    font-family: inherit;
    transition: all 0.3s;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.role-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.role-option input[type="radio"] {
    display: none;
}

.role-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.role-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.role-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.role-card:hover::before {
    opacity: 1;
}

.role-option input[type="radio"]:checked + .role-card {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.role-option input[type="radio"]:checked + .role-card::before {
    opacity: 1;
}

.role-card .icon {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
}

.role-card small {
    display: block;
    color: #666;
    margin-top: 5px;
    font-size: 0.9em;
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: var(--font-size);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--secondary-light) 0%, var(--secondary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--danger-light) 0%, var(--danger-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--success-light) 0%, var(--success-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.4);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9em;
}

/* Room Screen */
.header {
    background: var(--card-bg-light);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.coins-display {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    padding: 12px 24px;
    border-radius: 30px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    position: relative;
    overflow: hidden;
}

.coins-display::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.room-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.join-form {
    background: var(--card-bg-light);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.join-form.hidden {
    display: none;
}

.join-form input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: var(--font-size);
    background: white;
    transition: all 0.3s;
}

.join-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Game Screen */
.room-header {
    background: var(--card-bg-light);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.room-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.room-content .reports-panel {
    grid-column: 1 / -1;
}

.room-content .chat-panel {
    grid-column: 1 / -1;
}

.panel {
    background: var(--card-bg-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: panelSlideIn 0.4s ease-out;
}

@keyframes panelSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.panel:active {
    transform: translateY(-2px) scale(0.99);
}

.panel h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

/* Users List */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-item {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    padding: 16px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-light);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.user-item:hover {
    transform: translateX(-5px);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    box-shadow: var(--shadow);
}

.user-item:active {
    transform: translateX(-3px) scale(0.98);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: bold;
}

.badge-seeker {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: var(--primary-dark);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-checker {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
    color: var(--secondary-color);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.pending-users {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.pending-user {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.1) 100%);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(245, 158, 11, 0.3);
    transition: all 0.3s;
}

.pending-user:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(251, 191, 36, 0.15) 100%);
    box-shadow: var(--shadow);
}

/* Challenges */
.challenges-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

.challenge-item {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    padding: 18px;
    border-radius: 16px;
    border-right: 4px solid var(--primary-color);
    border: 1px solid var(--border-light);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    animation: challengeSlideIn 0.3s ease-out;
}

@keyframes challengeSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.challenge-item:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.challenge-item:active {
    transform: translateY(0) scale(0.98);
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.challenge-price {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    padding: 6px 16px;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.challenge-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Chat */
.chat-messages {
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 15px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.5) 0%, rgba(241, 245, 249, 0.5) 100%);
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.message {
    margin-bottom: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 18px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(-2px);
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #666;
}

.message-content {
    margin-bottom: 5px;
}

.message-image {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 10px;
}

.chat-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

#chatInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: var(--font-size);
    background: white;
    transition: all 0.3s;
}

#chatInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.image-upload-btn {
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s;
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.3);
}

.image-upload-btn:hover {
    background: linear-gradient(135deg, var(--secondary-light) 0%, var(--primary-light) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.4);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: modalFadeIn 0.2s ease-out;
    padding: 20px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--card-bg-light);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 28px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.close-modal:hover {
    color: var(--text-color);
}

/* Accessibility */
.accessibility-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    z-index: 999;
    transition: all 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.accessibility-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.5);
}

.accessibility-panel {
    position: fixed;
    bottom: 90px;
    left: 20px;
    background: var(--card-bg-light);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow-lg);
    z-index: 998;
    min-width: 250px;
    border: 1px solid var(--border-color);
}

.accessibility-panel.hidden {
    display: none;
}

.accessibility-panel h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.accessibility-option {
    margin-bottom: 15px;
}

.accessibility-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.accessibility-option input[type="range"] {
    width: 100%;
}

/* Icons */
.icon {
    font-size: 1.2em;
}

/* Reports Panel */
.reports-panel {
    grid-column: 1 / -1;
}

.period-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center;
}

.period-btn {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9em;
    font-weight: 500;
}

.period-btn:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-2px);
}

.period-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.reports-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.report-item {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    padding: 18px;
    border-radius: 16px;
    margin-bottom: 12px;
    border-right: 4px solid var(--primary-color);
    border: 1px solid var(--border-light);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    animation: reportSlideIn 0.3s ease-out;
}

@keyframes reportSlideIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.report-item:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    box-shadow: var(--shadow);
    transform: translateX(-3px);
}

.report-item:active {
    transform: translateX(-2px) scale(0.99);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.period-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    margin-right: 8px;
}

.period-daily {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: var(--primary-dark);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.period-weekly {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(236, 72, 153, 0.15) 100%);
    color: var(--secondary-color);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.period-monthly {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(251, 191, 36, 0.15) 100%);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.report-status {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: bold;
}

.report-status.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.2) 100%);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.report-status.failed {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.report-challenge {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 8px;
    font-style: italic;
}

.report-notes {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 250, 252, 0.8) 100%);
    backdrop-filter: blur(10px);
    padding: 12px;
    border-radius: 10px;
    margin: 10px 0;
    border-right: 3px solid var(--primary-color);
    border: 1px solid var(--border-light);
}

.report-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.encourage-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    font-size: 0.9em;
    font-weight: 500;
}

.encourage-btn:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.05);
}

.encourage-btn.encouraged {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    border-color: #ef4444;
    color: #ef4444;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

/* Notifications */
.notifications-bell {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    z-index: 998;
    transition: all 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.notifications-bell:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.5);
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    font-weight: bold;
}

.notifications-panel {
    position: fixed;
    top: 80px;
    left: 20px;
    width: 350px;
    max-width: 90vw;
    max-height: 70vh;
    background: var(--card-bg-light);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    z-index: 997;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.notifications-header {
    padding: 15px 20px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: var(--text-color);
}

.notifications-list {
    overflow-y: auto;
    flex: 1;
    padding: 10px;
}

.notification-item {
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    border-right: 3px solid transparent;
}

.notification-item.unread {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-right-color: var(--primary-color);
    font-weight: bold;
}

.notification-item.read {
    background: var(--bg-color);
    opacity: 0.8;
}

.notification-item:hover {
    background: #f5f5f5;
}

.notification-content strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
}

.notification-content p {
    margin: 5px 0;
    color: #666;
    font-size: 0.9em;
}

.notification-content small {
    color: #999;
    font-size: 0.8em;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* App-like transitions */
* {
    -webkit-tap-highlight-color: transparent;
}

input, textarea, select, button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    .container {
        padding: 16px;
    }
    
    .room-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .role-selection {
        grid-template-columns: 1fr;
    }
    
    .room-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .room-header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .notifications-panel {
        left: 10px;
        right: 10px;
        width: auto;
        top: 70px;
        max-height: calc(100vh - 90px);
    }
    
    .notifications-bell {
        top: 10px;
        left: 10px;
        width: 48px;
        height: 48px;
    }
    
    .panel {
        padding: 20px;
        border-radius: 20px;
    }
    
    .modal-content {
        padding: 24px;
        border-radius: 24px;
    }
    
    .btn {
        padding: 12px 24px;
        width: 100%;
        justify-content: center;
    }
    
    .welcome-form {
        padding: 24px;
    }
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .container {
        padding: 12px;
    }
    
    .panel {
        padding: 16px;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .coins-display {
        font-size: 16px;
        padding: 10px 20px;
    }
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 10px;
    border: 2px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
}

