* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0b0f1a; /* fallback behind canvas */
    background: linear-gradient(180deg, #0d051c 0%, #120824 100%);
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}

[dir="rtl"] body { direction: rtl; }

#intro-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: #0b0f1a;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out;
}

#intro-splash.animate::before {
    content: '';
    position: absolute;
    inset: 0;
    background: white;
    opacity: 0;
    animation: lightning-flash 2.5s ease-out forwards;
}

#intro-logo {
    width: 150px;
    height: 150px;
    opacity: 0;
}

#intro-splash.animate #intro-logo {
    animation: logo-intro 2.5s ease-out forwards;
}

@keyframes lightning-flash {
    0% { opacity: 0; }
    40% { opacity: 0; }
    42% { opacity: 0.8; }
    43% { opacity: 0.1; }
    45% { opacity: 0.9; }
    50% { opacity: 0; }
    70% { opacity: 0; }
    71% { opacity: 0.6; }
    73% { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes logo-intro {
    0% { opacity: 0; transform: scale(0.5); }
    30% { opacity: 1; transform: scale(1.1); }
    50% { transform: scale(1); }
    100% { transform: scale(1); opacity: 1; }
}

#bgCanvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: block;
}

/* Notification Banner */
#notification-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translate(-50%, -150%);
    width: calc(100% - 30px);
    max-width: 500px;
    background: rgba(40, 40, 55, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

#notification-banner.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

.notification-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.notification-message {
    flex-grow: 1;
    font-size: 14px;
    color: #f0f0f0;
    line-height: 1.6;
    white-space: pre-line; /* يسمح بتقسيم الأسطر */
    text-align: center;    /* النص في المنتصف */
    direction: ltr;        /* منع انقلاب النص */
}


.notification-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.notification-close-btn:hover {
    color: white;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(13, 5, 28, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.telegram-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    padding: 0;
    background: linear-gradient(135deg, #229ED9, #0088cc);
    border: none;
    border-radius: 50%;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(34, 158, 217, 0.3);
    flex-shrink: 0;
}

.telegram-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(34, 158, 217, 0.5);
}

.telegram-icon {
    width: 26px;
    height: 26px;
    animation: pulse 2s infinite;
}

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

.header-center {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    justify-content: center;
}

.logo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(52, 174, 224, 0.3);
    animation: diamondSparkle 3s infinite;
}

@keyframes diamondSparkle {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 5px rgba(52, 174, 224, 0.5));
    }
    25% {
        filter: brightness(1.3) drop-shadow(0 0 15px rgba(255, 215, 0, 0.8));
    }
    50% {
        filter: brightness(1.5) drop-shadow(0 0 20px rgba(255, 255, 255, 0.9));
    }
    75% {
        filter: brightness(1.3) drop-shadow(0 0 15px rgba(52, 174, 224, 0.8));
    }
}

.brand-name {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: textSparkle 3s infinite;
}

@keyframes textSparkle {
    0%, 100% {
        filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.3));
    }
    25% {
        filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6)) drop-shadow(0 0 12px rgba(255, 255, 255, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 20px rgba(255, 215, 0, 0.9));
    }
    75% {
        filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6)) drop-shadow(0 0 12px rgba(255, 255, 255, 0.4));
    }
}

.language-selector {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

#languageSelect {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

#languageSelect:hover {
    background: rgba(255, 255, 255, 0.15);
}

#languageSelect option {
    background: #120824;
}

/* Sections */
.section {
    display: none;
    padding: 90px 20px 80px;
    min-height: 100vh;
}

.section.active {
    display: block;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

.section-title {
    color: #34aee0;
    font-size: 32px;
    text-align: center;
    margin-bottom: 30px;
}

[dir="rtl"] .section { text-align: right; }

/* Video Player */
.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 30px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background: #000;
}

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

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 20px 15px 15px;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-container:hover .video-controls {
    opacity: 1;
}

.progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 10px;
    position: relative;
}

.progress-filled {
    height: 100%;
    background: linear-gradient(90deg, #34aee0, #2196F3);
    border-radius: 5px;
    width: 0%;
    transition: width 0.1s;
}

.controls-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 20px;
    padding: 5px;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.control-btn:hover {
    transform: scale(1.1);
}

.control-btn img {
    width: 20px;
    height: 20px;
}

.time-display {
    font-size: 14px;
    color: white;
    margin: 0 5px;
}

.volume-btn {
    margin-left: auto;
}

.volume-slider {
    width: 80px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    border-radius: 5px;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    background: #34aee0;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    background: #34aee0;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.fullscreen-btn {
    font-size: 24px;
}

/* Hide default play button */
.play-btn {
    display: none;
}

.play-btn-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(52, 174, 224, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.play-btn-overlay:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(52, 174, 224, 1);
}

.play-btn-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-btn-overlay img {
    width: 40px;
    height: 40px;
}

.description {
    text-align: center;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.notice {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #FFC107;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-size: 16px;
}

.register-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
}

.register-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    width: 100%;
    max-width: 550px;
    flex-wrap: wrap;
}

[dir="rtl"] .register-item {
    flex-direction: row-reverse;
}
[dir="rtl"] .pointing-hand {
    transform: scaleX(-1);
}

.promo-code {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.2);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    flex-shrink: 0;
}

.promo-code .code {
    font-weight: bold;
    color: #FFD700;
    font-family: 'Courier New', Courier, monospace;
}

.copy-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
    position: relative;
}

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

.copy-btn svg {
    width: 16px;
    height: 16px;
}

.copy-feedback {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.copy-feedback.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

.register-link {
    display: block;
}

.register-img {
    width: 160px;
    height: 40px;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border-radius: 8px;
}

.register-img:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(52, 174, 224, 0.4);
}

.next-btn, .start-btn, .game-start-btn {
    display: block;
    margin: 0 auto;
    padding: 15px 60px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #34aee0, #2196F3);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(52, 174, 224, 0.4);
}

.next-btn:hover, .start-btn:hover, .game-start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 174, 224, 0.6);
}

.start-btn.disabled, .game-start-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Game Selection */
.game-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.game-btn {
    width: 160px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    overflow: hidden;
}

.game-btn:hover {
    border-color: #34aee0;
    transform: scale(1.05);
}

.game-btn.selected {
    border-color: #34aee0;
    box-shadow: 0 0 20px rgba(52, 174, 224, 0.6);
}

.game-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
    color: #34aee0;
}

.input-field {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    transition: all 0.3s;
}

.input-field:focus {
    outline: none;
    border-color: #34aee0;
    box-shadow: 0 0 15px rgba(52, 174, 224, 0.3);
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.validation-message {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.validation-message.error {
    color: #f44336;
}

.validation-message.success {
    color: #4CAF50;
}

/* Game Area */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

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

[dir="rtl"] .status-left { text-align: right; }

.status-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
}

.connection-icon {
    font-size: 20px;
    color: #4CAF50;
    animation: connectionPulse 1.5s infinite;
}

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

.status-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 1;
}

[dir="rtl"] .status-right { justify-content: flex-start; }

.game-icon-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.game-title {
    text-align: center;
    font-size: 28px;
    color: #34aee0;
    margin-bottom: 15px;
}

.clock {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    margin-bottom: 5px;
}

.date {
    text-align: center;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
}

.grid-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    position: relative;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    max-width: 400px;
    width: 100%;
}

.grid-cell {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.grid-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-cell.revealed {
    transform: scale(1.05);
}

.grid-container.loading::before {
    content: '';
    position: absolute;
    inset: -8px; /* Cover the gap */
    background-color: rgba(11, 15, 26, 0.7);
    backdrop-filter: blur(2px);
    border-radius: 10px;
    z-index: 1;
}

.grid-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 4px solid rgba(52, 174, 224, 0.2);
    border-top-color: #34aee0;
    border-radius: 50%;
    animation: loadingSpin 1s linear infinite;
    z-index: 2;
}

.loading-text {
    position: absolute;
    top: calc(50% + 45px); /* Position below spinner */
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
    text-align: center;
    width: 100%;
}

.grid-container.loading .loading-text {
    opacity: 1;
}

@keyframes loadingSpin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

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

.bomb-selection p {
    font-size: 18px;
    margin-bottom: 15px;
}

.bomb-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.bomb-btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.bomb-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.bomb-btn.active {
    background: linear-gradient(135deg, #34aee0, #2196F3);
    border-color: #34aee0;
    box-shadow: 0 5px 20px rgba(52, 174, 224, 0.4);
}

.bomb-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #1a0f2e, #2d1b4e);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    position: relative;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

[dir="rtl"] .modal-close-btn {
    right: auto;
    left: 20px;
}

.modal-close-btn:hover {
    color: white;
}

.telegram-modal-content {
    padding-top: 60px;
}

.telegram-modal-icon {
    width: 80px;
    height: 62px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.modal-content p {
    font-size: 20px;
    margin-bottom: 30px;
}

.modal-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.modal-btn {
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-btn.yes {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.modal-btn.no {
    background: linear-gradient(135deg, #f44336, #da190b);
    color: white;
}

.modal-btn.join-telegram {
    background: linear-gradient(135deg, #229ED9, #0088cc);
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal-btn.join-telegram img {
    width: 24px;
    height: 24px;
}

.modal-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 400px;
    animation: rgbBorderPulse 3s linear infinite;
}

.footer p {
    color: #34aee0;
    font-weight: 600;
    font-size: 16px;
    text-shadow: 
        0 0 10px rgba(52, 174, 224, 0.8),
        0 0 20px rgba(52, 174, 224, 0.6),
        0 0 30px rgba(52, 174, 224, 0.4);
    animation: textGlow 2s ease-in-out infinite;
}

@keyframes rgbBorderPulse {
    0%, 100% {
        border-color: rgba(255, 255, 0, 0.8);
        box-shadow: 
            0 0 10px rgba(255, 255, 0, 0.6),
            0 0 20px rgba(255, 255, 0, 0.4),
            inset 0 0 10px rgba(255, 255, 0, 0.2);
    }
    25% {
        border-color: rgba(255, 200, 0, 1);
        box-shadow: 
            0 0 15px rgba(255, 200, 0, 0.8),
            0 0 30px rgba(255, 200, 0, 0.6),
            inset 0 0 15px rgba(255, 200, 0, 0.3);
    }
    50% {
        border-color: rgba(255, 215, 0, 1);
        box-shadow: 
            0 0 20px rgba(255, 215, 0, 1),
            0 0 40px rgba(255, 215, 0, 0.8),
            inset 0 0 20px rgba(255, 215, 0, 0.4);
    }
    75% {
        border-color: rgba(255, 200, 0, 1);
        box-shadow: 
            0 0 15px rgba(255, 200, 0, 0.8),
            0 0 30px rgba(255, 200, 0, 0.6),
            inset 0 0 15px rgba(255, 200, 0, 0.3);
    }
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(52, 174, 224, 0.8),
            0 0 20px rgba(52, 174, 224, 0.6),
            0 0 30px rgba(52, 174, 224, 0.4);
    }
    50% {
        text-shadow: 
            0 0 15px rgba(52, 174, 224, 1),
            0 0 30px rgba(52, 174, 224, 0.8),
            0 0 45px rgba(52, 174, 224, 0.6);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 12px 15px;
    }
    
    .telegram-btn {
        width: 40px;
        height: 40px;
    }
    
    .telegram-icon {
        width: 22px;
        height: 22px;
    }
    
    .logo {
        width: 40px;
        height: 40px;
    }
    
    .brand-name {
        font-size: 18px;
    }
    
    #languageSelect {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .section {
        padding: 100px 15px 60px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .game-title {
        font-size: 22px;
    }
    
    .status-bar {
        padding: 10px;
        font-size: 12px;
    }
    
    .status-left,
    .status-center,
    .status-right {
        flex: 1;
    }
    
    .game-grid {
        max-width: 300px;
        gap: 5px;
    }
    
    .bomb-buttons {
        flex-wrap: wrap;
    }
    
    .modal-content {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .modal-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .volume-slider {
        width: 60px;
    }
    
    .time-display {
        font-size: 12px;
    }
    
    .control-btn {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
    
    .register-item {
        gap: 10px;
        padding: 10px;
    }

    .promo-code {
        width: 100%;
        justify-content: center;
        order: 2; /* Move promo code below */
    }

    .register-link {
        order: 1;
    }

    .pointing-hand {
        order: 1;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 10px;
    }
    
    .telegram-btn {
        width: 38px;
        height: 38px;
    }
    
    .logo {
        width: 38px;
        height: 38px;
    }
    
    .brand-name {
        font-size: 16px;
    }
    
    .header-center {
        gap: 10px;
    }
    
    #languageSelect {
        font-size: 12px;
        padding: 5px 8px;
    }
}

.back-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #34aee0, #2196F3);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(52, 174, 224, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.back-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(52, 174, 224, 0.6);
}

.inline-warning {
    display: none;
    background: rgba(244, 67, 54, 0.15);
    border-left: 4px solid #f44336;
    padding: 12px 14px;
    border-radius: 10px;
    color: #fff;
    margin: 0 auto 12px;
    max-width: 400px;
    text-align: center;
}
.inline-warning.show { display: block; }

[dir="rtl"] .controls-row { direction: ltr; } /* keep player controls intuitive */

.pointing-hand {
    width: 40px;
    height: 40px;
    animation: point-animation 1.5s ease-in-out infinite;
}

@keyframes point-animation {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(8px); }
}

[dir="rtl"] @keyframes point-animation {
    0%, 100% { transform: translateX(0) scaleX(-1); }
    50% { transform: translateX(-8px) scaleX(-1); }
}







/* ====== Select Country Style ====== */
.input-group select.input-field {
  background: linear-gradient(135deg, #0d051c 0%, #120824 100%);
  color: #fff;
  border: 1px solid rgba(52, 174, 224, 0.5);
  border-radius: 8px;
  padding: 10px;
  width: 100%;
  font-size: 15px;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='12' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23ffffff' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  cursor: pointer;
  transition: 0.3s ease;
}

.input-group select.input-field:hover {
  border-color: #34aee0;
  background: linear-gradient(135deg, #1a1030 0%, #1e0f3a 100%);
}


/* ===== Force dark background for select on desktop ===== */
.input-group select.input-field {
  background-color: #0d051c !important;       /* خلفية داكنة ثابتة */
  background-image: none !important;          /* إزالة خلفية النظام */
  color: #fff !important;                     /* نص أبيض */
  border: 1px solid rgba(52, 174, 224, 0.6);
  border-radius: 8px;
  padding: 10px;
  width: 100%;
  font-size: 15px;
  appearance: none;                           /* تعطيل النمط الافتراضي */
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

/* السهم المخصص بدل سهم النظام */
.input-group select.input-field::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #fff;
}

/* عند التحويم */
.input-group select.input-field:hover {
  background-color: #1a1030 !important;
  border-color: #34aee0;
}
