/* ============================================================
   RESET AND BASE
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Poppins', sans-serif;
}

body {
    background-color: #0A0A0A;
    color: #FFFFFF;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    padding: 10px;
}

.app-container {
    width: 100%;
    max-width: 1400px;
    padding: 10px;
    position: relative;
}

.screen {
    display: none;
    animation: fadeIn 0.4s ease;
}

.screen.active {
    display: block;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pop {
    0% { transform: scale(0.6); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 225, 53, 0.2); }
    50% { box-shadow: 0 0 40px rgba(255, 225, 53, 0.6); }
}

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

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

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes countdownPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 225, 53, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 225, 53, 0.5);
}

/* ============================================================
   JOIN SCREEN
   ============================================================ */
.join-container {
    max-width: 480px;
    margin: 0 auto;
    background: #141414;
    border: 2px solid rgba(255, 225, 53, 0.3);
    border-radius: 28px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
}

.join-container .logo {
    font-size: 42px;
    font-weight: 900;
    color: #FFE135;
    letter-spacing: 0.05em;
    text-shadow: 0 0 40px rgba(255, 225, 53, 0.2);
}

.join-container .subtitle {
    color: rgba(255, 255, 255, 0.5);
    margin-top: 5px;
    font-size: 14px;
}

.join-container .input-group {
    margin-top: 20px;
    text-align: left;
}

.join-container .input-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.join-container .input-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    outline: none;
    transition: border 0.2s;
}

.join-container .input-group input:focus {
    border-color: #FFE135;
}

.join-container .btn-primary {
    width: 100%;
    padding: 16px;
    margin-top: 16px;
    background: #FFE135;
    color: #0A0A0A;
    font-weight: 900;
    font-size: 16px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 0 30px rgba(255, 225, 53, 0.3);
}

.join-container .btn-primary:hover {
    background: #FFEB66;
    transform: scale(1.02);
}

.join-container .btn-primary.btn-join {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    box-shadow: none;
}

.join-container .btn-primary.btn-join:hover {
    background: rgba(255, 255, 255, 0.15);
}

.join-container .divider {
    margin: 20px 0 10px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.join-container .divider::before,
.join-container .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.error-msg {
    color: #FF6B6B;
    margin-top: 15px;
    font-size: 14px;
    min-height: 20px;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.lang-switcher .lang-label {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    font-weight: 600;
}

.lang-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.lang-toggle.active {
    background: #FFE135;
    border-color: #FFE135;
}

.lang-toggle .toggle-ball {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.lang-toggle.active .toggle-ball {
    left: 32px;
    background: #0A0A0A;
}

.lang-toggle-text {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    min-width: 30px;
    text-align: center;
}

.lang-toggle-text.active {
    color: #FFE135;
}

/* ============================================================
   LOBBY SCREEN
   ============================================================ */
.lobby-container {
    max-width: 1100px;
    margin: 0 auto;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 25px 24px;
}

.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lobby-header .title-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lobby-header .title-section h2 {
    font-size: 22px;
    font-weight: 800;
    color: #FFE135;
}

.room-code-display {
    background: rgba(255, 225, 53, 0.12);
    padding: 6px 18px;
    border-radius: 100px;
    font-size: 20px;
    font-weight: 900;
    color: #FFE135;
    border: 1px solid rgba(255, 225, 53, 0.3);
    letter-spacing: 2px;
}

.player-count {
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    font-weight: 600;
}

.lobby-actions-header {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-secondary {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-secondary.btn-danger:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: #FF6B6B;
}

/* Player Cards */
.lobby-players {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.lobby-player-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 16px 12px;
    text-align: center;
    transition: 0.3s;
    position: relative;
}

.lobby-player-card.you {
    border-color: #FFE135;
    background: rgba(255, 225, 53, 0.05);
}

.lobby-player-card .avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    color: #0A0A0A;
    margin: 0 auto 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.lobby-player-card .name {
    font-weight: 700;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}

.lobby-player-card .name .host-badge {
    color: #FFE135;
    font-size: 14px;
}

.lobby-player-card .status {
    font-size: 12px;
    margin-top: 2px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
}

.lobby-player-card .status.ready {
    color: #6BCB77;
    background: rgba(107, 203, 119, 0.1);
}

.lobby-player-card .status.waiting {
    color: rgba(255, 255, 255, 0.4);
}

.name-input {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px 12px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    width: 100%;
    max-width: 140px;
    text-align: center;
    outline: none;
    transition: border 0.2s;
}

.name-input:focus {
    border-color: #FFE135;
    box-shadow: 0 0 20px rgba(255, 225, 53, 0.1);
}

.btn-ready {
    margin-top: 8px;
    padding: 6px 18px;
    background: #6BCB77;
    border: none;
    border-radius: 10px;
    color: #0A0A0A;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
}

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

.btn-ready:hover {
    transform: scale(1.05);
}

/* ============================================================
   SETTINGS SECTION - معطل للاعبين غير المضيفين
   ============================================================ */
.settings-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 20px 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
    transition: 0.3s;
}

.settings-section.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.02);
}

.settings-section.disabled .settings-title {
    color: rgba(255, 255, 255, 0.3);
}

.settings-section.disabled .option-btn {
    cursor: not-allowed !important;
    transform: none !important;
    pointer-events: none;
}

.settings-section.disabled .option-btn:hover {
    transform: none !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

.settings-section.disabled .option-btn.active {
    opacity: 0.6;
}

.settings-section .settings-title {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.settings-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.settings-group {
    flex: 1;
    min-width: 200px;
}

.settings-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.settings-group .options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.settings-group .option-btn {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.settings-group .option-btn.active {
    background: rgba(255, 225, 53, 0.12);
    border-color: #FFE135;
    color: #FFE135;
}

.settings-group .option-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
}

.settings-group .option-btn.category-btn {
    font-size: 12px;
    padding: 4px 12px;
}

.settings-group .option-btn.category-btn.active {
    background: rgba(107, 203, 119, 0.12);
    border-color: #6BCB77;
    color: #6BCB77;
}

/* ============================================================
   START BUTTON WITH REASON MESSAGE
   ============================================================ */
.lobby-actions {
    text-align: center;
}

.btn-start {
    padding: 16px 48px;
    background: #FFE135;
    border: none;
    border-radius: 16px;
    color: #0A0A0A;
    font-weight: 900;
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 0 30px rgba(255, 225, 53, 0.3);
}

.btn-start:hover:not(:disabled) {
    background: #FFEB66;
    transform: scale(1.02);
}

.btn-start.disabled,
.btn-start:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.start-disabled-reason {
    color: #FF6B6B;
    font-size: 14px;
    margin-top: 10px;
    font-weight: 600;
    min-height: 24px;
    padding: 8px 16px;
    background: rgba(255, 107, 107, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 107, 107, 0.1);
}

.hint-text {
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    margin-top: 10px;
}

/* ============================================================
   GAME SCREEN
   ============================================================ */
.game-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 24px;
}

.game-header {
    text-align: center;
    margin-bottom: 24px;
}

.game-header .question-display {
    font-size: 28px;
    font-weight: 800;
    color: #FFFFFF;
    animation: glow 2s infinite;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    border: 1px solid rgba(255, 225, 53, 0.1);
}

.game-header .question-display .highlight {
    color: #FFE135;
}

.game-header .game-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.game-header .game-stats .stat {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.game-header .game-stats .stat span {
    color: #FFE135;
    font-weight: 700;
}

.timer-display {
    font-size: 48px;
    font-weight: 900;
    color: #FFE135;
    text-align: center;
    margin: 8px 0;
}

.timer-display.warning {
    color: #FF6B6B;
    animation: pulse 0.5s infinite;
}

/* Player Cards in Game */
.game-players {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.game-player-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 16px 12px;
    text-align: center;
    transition: 0.3s;
    position: relative;
}

.game-player-card .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    color: #0A0A0A;
    margin: 0 auto 8px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.game-player-card .player-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}

.game-player-card .player-score {
    font-size: 12px;
    color: #FFE135;
    font-weight: 700;
}

.game-player-card .answer-input {
    width: 100%;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    margin-top: 8px;
    transition: border 0.2s;
}

.game-player-card .answer-input:focus {
    border-color: #FFE135;
}

.game-player-card .answer-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.game-player-card .btn-confirm {
    width: 100%;
    padding: 8px;
    margin-top: 8px;
    background: #6BCB77;
    border: none;
    border-radius: 10px;
    color: #0A0A0A;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}

.game-player-card .btn-confirm:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.game-player-card .btn-confirm:hover:not(:disabled) {
    background: #7BD685;
}

.game-player-card .player-status {
    font-size: 11px;
    margin-top: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
}

.game-player-card .player-status.confirmed {
    color: #6BCB77;
    background: rgba(107, 203, 119, 0.1);
}

.game-player-card .player-status.waiting {
    color: rgba(255, 255, 255, 0.3);
}

.game-player-card .player-status.disqualified {
    color: #FF6B6B;
    background: rgba(255, 107, 107, 0.1);
}

.game-player-card .player-status.duplicate {
    color: #FFD93D;
    background: rgba(255, 217, 61, 0.1);
}

.game-player-card .vote-buttons {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.game-player-card .vote-buttons button {
    flex: 1;
    padding: 6px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
    transition: 0.2s;
}

.game-player-card .vote-buttons .btn-wrong {
    background: rgba(255, 107, 107, 0.2);
    color: #FF6B6B;
}

.game-player-card .vote-buttons .btn-wrong:hover {
    background: rgba(255, 107, 107, 0.4);
}

.game-player-card .vote-buttons .btn-duplicate {
    background: rgba(255, 217, 61, 0.2);
    color: #FFD93D;
}

.game-player-card .vote-buttons .btn-duplicate:hover {
    background: rgba(255, 217, 61, 0.4);
}

/* ============================================================
   ANSWER REVEAL - حالات الخطأ والمكرر
   ============================================================ */
.answer-reveal {
    margin-top: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    border: 1px solid rgba(255, 225, 53, 0.1);
    transition: all 0.3s ease;
}

/* ✅ خطأ: جواب أحمر + خط أحمر */
.answer-reveal.error {
    color: #FF6B6B !important;
    text-decoration: line-through;
    text-decoration-color: #FF6B6B;
    border-color: rgba(255, 107, 107, 0.3);
    background: rgba(255, 107, 107, 0.05);
}

/* ✅ مكرر: خط أحمر فقط (الجواب أبيض) */
.answer-reveal.duplicate {
    color: white !important;
    text-decoration: line-through;
    text-decoration-color: #FF6B6B;
    border-color: rgba(255, 217, 61, 0.3);
    background: rgba(255, 217, 61, 0.05);
}

/* ✅ صحيح: جواب أخضر */
.answer-reveal.correct {
    color: #6BCB77 !important;
    border-color: rgba(107, 203, 119, 0.3);
    background: rgba(107, 203, 119, 0.05);
}

/* ✅ لا شيء */
.answer-reveal.nothing {
    color: rgba(255, 255, 255, 0.3) !important;
    font-style: italic;
    border-color: rgba(255, 255, 255, 0.05);
}

/* Discussion Controls */
.discussion-controls {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-next-round {
    padding: 14px 40px;
    background: #FFE135;
    border: none;
    border-radius: 14px;
    color: #0A0A0A;
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 0 30px rgba(255, 225, 53, 0.2);
}

.btn-next-round:hover {
    background: #FFEB66;
    transform: scale(1.02);
}

/* ============================================================
   RESULT SCREEN
   ============================================================ */
.result-container {
    max-width: 600px;
    margin: 0 auto;
    background: #141414;
    border: 2px solid #FFE135;
    border-radius: 28px;
    padding: 40px 30px;
    text-align: center;
    animation: pop 0.6s ease;
}

.result-container .trophy {
    font-size: 72px;
    animation: bounce 1s ease infinite;
}

.result-container .winner-name {
    font-size: 32px;
    font-weight: 900;
    color: #FFE135;
    margin: 10px 0;
    text-shadow: 0 0 40px rgba(255, 225, 53, 0.3);
}

.result-container .winner-score {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 24px;
}

.result-container .ranking {
    text-align: left;
    margin: 20px 0;
}

.result-container .ranking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    margin-bottom: 6px;
    border-left: 3px solid rgba(255, 255, 255, 0.1);
}

.result-container .ranking-item:first-child {
    border-left-color: #FFE135;
    background: rgba(255, 225, 53, 0.05);
}

.result-container .ranking-item .rank {
    font-weight: 900;
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    min-width: 30px;
}

.result-container .ranking-item .rank-name {
    font-weight: 600;
    flex: 1;
    margin-left: 10px;
}

.result-container .ranking-item .rank-score {
    font-weight: 700;
    color: #FFE135;
}

.result-container .countdown {
    margin-top: 24px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 14px;
}

.result-container .countdown p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.result-container .countdown .countdown-number {
    font-size: 48px;
    font-weight: 900;
    color: #FFE135;
    animation: countdownPulse 1s infinite;
}

/* ============================================================
   RTL SUPPORT
   ============================================================ */
[dir="rtl"] body {
    font-family: 'Tajawal', 'Poppins', sans-serif;
}

[dir="rtl"] .lobby-container {
    direction: rtl;
}

[dir="rtl"] .lobby-actions-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .settings-row {
    flex-direction: row-reverse;
}

[dir="rtl"] .game-player-card .answer-prefix {
    right: 12px;
    left: auto;
}

[dir="rtl"] .result-container .ranking-item {
    border-left: none;
    border-right: 3px solid rgba(255, 255, 255, 0.1);
}

[dir="rtl"] .result-container .ranking-item:first-child {
    border-right-color: #FFE135;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 820px) {
    .lobby-container {
        padding: 18px 14px;
    }
    
    .lobby-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .lobby-actions-header {
        justify-content: center;
    }
    
    .lobby-players {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .game-players {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .game-header .question-display {
        font-size: 20px;
        padding: 12px;
    }
    
    .settings-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .settings-group {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .join-container {
        padding: 24px 16px;
    }
    
    .join-container .logo {
        font-size: 28px;
    }
    
    .lobby-players {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .lobby-player-card {
        padding: 12px 8px;
    }
    
    .lobby-player-card .avatar {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .game-players {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
    
    .game-player-card {
        padding: 12px 8px;
    }
    
    .game-player-card .avatar {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .game-header .question-display {
        font-size: 16px;
        padding: 10px;
    }
    
    .timer-display {
        font-size: 32px;
    }
    
    .result-container {
        padding: 24px 16px;
    }
    
    .result-container .winner-name {
        font-size: 24px;
    }
    
    .settings-section {
        padding: 14px 16px;
    }
    
    .settings-group .option-btn {
        font-size: 11px;
        padding: 4px 10px;
    }
}
/* ============================================================
   🔥 SKOPO STYLES - شعار وأزرار About و Terms
   ============================================================ */

/* --- شعار SKOPO --- */
.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.domino-logo {
    width: 75px;
    height: 110px;
    background: linear-gradient(145deg, #1f2636, #11151f);
    border: 3px solid #FFE135;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: rotate(-12deg);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), 0 0 20px rgba(255, 225, 53, 0.3);
    animation: float 4s ease-in-out infinite;
}

.domino-logo .question-mark {
    font-size: 2.8rem;
    font-weight: 900;
    color: #FFE135;
}

@keyframes float {
    0%, 100% { transform: rotate(-12deg) translateY(0px); }
    50% { transform: rotate(-12deg) translateY(-12px); }
}

.brand-name {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: #FFE135;
    margin-top: 10px;
    text-shadow: 0 0 40px rgba(255, 225, 53, 0.2);
}

.brand-tagline {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    margin-top: -5px;
}

/* --- Header (زر اللغة) --- */
.header {
    width: 100%;
    max-width: 480px;
    margin: 0 auto 10px auto;
    display: flex;
    justify-content: flex-end;
    z-index: 10;
}

.lang-btn {
    background: #161B26;
    border: 1px solid #2A3245;
    color: #F3F4F6;
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}

.lang-btn:hover {
    border-color: #FFE135;
    box-shadow: 0 0 12px rgba(255, 225, 53, 0.2);
}

/* --- Footer Section --- */
.footer-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    width: 100%;
}

/* --- About Section (مطوي) --- */
.about-section {
    width: 100%;
    margin-bottom: 10px;
}

.about-toggle-btn {
    background: transparent;
    border: 1px solid #2A3245;
    color: #F3F4F6;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.about-toggle-btn:hover {
    border-color: #FFE135;
    box-shadow: 0 0 20px rgba(255, 225, 53, 0.15);
}

.about-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.about-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.about-content.open {
    max-height: 500px;
    opacity: 1;
    margin-top: 12px;
}

.about-card {
    background: #161B26;
    border: 1px solid #FFE135;
    border-radius: 16px;
    padding: 20px 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.about-card h2 {
    font-size: 1.8rem;
    font-weight: 900;
    color: #FFE135;
    margin-bottom: 8px;
}

.about-card p {
    font-size: 0.95rem;
    color: #F3F4F6;
    margin: 4px 0;
    line-height: 1.6;
}

.about-card .about-version {
    margin-top: 12px;
    font-size: 0.8rem;
    color: #9CA3AF;
    border-top: 1px solid #2A3245;
    padding-top: 10px;
}

.about-card .about-praise {
    margin-top: 4px;
    font-size: 1rem;
    font-weight: 700;
    color: #FFE135;
}

/* --- Terms & Privacy --- */
.terms-privacy-container {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.terms-privacy-item {
    flex: 1;
    min-width: 180px;
}

.terms-toggle-btn {
    background: transparent;
    border: 1px solid #2A3245;
    color: #F3F4F6;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.terms-toggle-btn:hover {
    border-color: #FFE135;
    box-shadow: 0 0 15px rgba(255, 225, 53, 0.1);
}

.terms-arrow {
    font-size: 0.6rem;
    transition: transform 0.3s ease;
}

.terms-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 0 15px;
}

.terms-content.open {
    max-height: 200px;
    opacity: 1;
    margin-top: 8px;
    padding: 12px 15px;
    border: 1px solid #2A3245;
}

.terms-content p {
    font-size: 0.85rem;
    color: #9CA3AF;
    line-height: 1.6;
    margin: 0;
}

/* --- Contact Support --- */
.contact-support {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.contact-support p {
    font-size: 0.9rem;
    color: #F3F4F6;
}

.contact-support span[data-i18n="contactSupport"] {
    color: #FFE135;
    cursor: pointer;
    font-weight: 700;
}

.contact-support span[data-i18n="contactSupport"]:hover {
    text-decoration: underline;
}

/* --- Copyright --- */
.copyright {
    margin-top: 12px;
    text-align: center;
    font-size: 0.7rem;
    color: #6B7280;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 12px;
}

/* ============================================================
   RESPONSIVE للهواتف
   ============================================================ */
@media (max-width: 480px) {
    .brand-name {
        font-size: 2.5rem;
    }
    
    .domino-logo {
        width: 55px;
        height: 80px;
    }
    
    .domino-logo .question-mark {
        font-size: 2rem;
    }
    
    .terms-privacy-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .terms-privacy-item {
        min-width: unset;
    }
    
    .about-toggle-btn {
        font-size: 0.8rem;
        padding: 8px 16px;
    }
    
    .about-card h2 {
        font-size: 1.4rem;
    }
    
    .about-card p {
        font-size: 0.85rem;
    }
}
/* ============================================================
   PING INDICATOR - في أسفل المحتوى (مثل Footer)
   ============================================================ */
#ping-container {
    width: 100%;
    max-width: 480px;
    margin: 15px auto 5px auto;
    background: #141414;
    border: 2px solid #FFE135;
    border-radius: 30px;
    padding: 6px 18px;
    display: none; /* يظهر عبر JavaScript */
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 0 30px rgba(255, 225, 53, 0.1);
    user-select: none;
}

#ping-container .ping-icon {
    font-size: 14px;
}

#ping-value {
    font-weight: 900;
    font-size: 16px;
    min-width: 40px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

#ping-container .ping-unit {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}