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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000;
    color: white;
    min-height: 100vh;
    padding-top: 80px;
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Splash Screen */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 1s ease-in-out;
}

#splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.splash-logo {
    width: 150px;
    height: 150px;
    animation: electric-glow 2.5s ease-in-out forwards;
}

@keyframes electric-glow {
    0% {
        transform: scale(0.8);
        opacity: 0;
        filter: drop-shadow(0 0 5px #ff8c00) drop-shadow(0 0 10px #ff8c00);
    }
    20% {
        transform: scale(1.1);
        opacity: 1;
        filter: drop-shadow(0 0 10px #ff8c00) drop-shadow(0 0 20px #ff8c00) drop-shadow(0 0 30px #ffaf4d);
    }
    40% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px #ff8c00) drop-shadow(0 0 15px #ff8c00);
    }
    60% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 15px #ff8c00) drop-shadow(0 0 30px #ff8c00) drop-shadow(0 0 45px #ffaf4d);
    }
    80% {
        transform: scale(1);
        opacity: 1;
        filter: drop-shadow(0 0 10px #ff8c00) drop-shadow(0 0 20px #ff8c00);
    }
    100% {
        transform: scale(1);
        opacity: 1;
        filter: drop-shadow(0 0 10px #ff8c00) drop-shadow(0 0 20px #ff8c00);
    }
}

/* Fixed Header */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    border-bottom: 2px solid #ff8c00;
}

.header-left {
    flex: 1;
}

.telegram-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #0088cc, #00a0e9);
    text-decoration: none;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.telegram-btn:hover {
    transform: translateY(-2px);
}

.telegram-logo {
    width: 24px;
    height: 24px;
    animation: pulse 2s infinite;
}

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

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

.logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.main-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    animation: logo-glow 3s infinite ease-in-out;
}

.site-name {
    font-size: 28px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: text-glow 3s infinite ease-in-out;
}

.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

/* Language Selector */
.language-selector-container {
    position: relative;
}

.language-selector-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 140, 0, 0.2);
    border: 2px solid #ff8c00;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    padding: 0;
}

.language-selector-btn:hover {
    background: rgba(255, 140, 0, 0.4);
}

#current-lang-flag {
    font-size: 24px;
    line-height: 1;
}

.language-dropdown {
    display: none;
    position: absolute;
    top: 60px; /* position below the button */
    right: 0;
    background: #1a1a1a;
    border: 1px solid #ff8c00;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    z-index: 1001;
    overflow: hidden;
    width: 160px; /* or auto */
    padding: 5px 0;
}

.language-dropdown.show {
    display: block;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.language-option:hover {
    background-color: rgba(255, 140, 0, 0.2);
}

/* Back Button */
.back-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(255, 140, 0, 0.5);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-btn img {
    width: 24px;
    height: 24px;
}

.back-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 140, 0, 0.7);
}

/* Control Panel Button */
.control-panel-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 5px 20px rgba(255, 140, 0, 0.5);
    transition: all 0.3s ease;
    z-index: 999;
}

.control-panel-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 140, 0, 0.7);
}

@media (max-width: 768px) {
    .back-btn {
        width: 45px;
        height: 45px;
        bottom: 15px;
        left: 15px;
    }

    .back-btn img {
        width: 20px;
        height: 20px;
    }
    
    .control-panel-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
        bottom: 15px;
        right: 15px;
    }
    
    .registration-item {
        gap: 8px;
    }
}

/* Section Styles */
.section {
    display: none;
    min-height: calc(100vh - 80px);
    padding: 40px 20px;
}

.section.active {
    display: block;
}

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

.section-title {
    color: #ff8c00;
    font-size: 48px;
    text-align: center;
    margin-bottom: 40px;
    text-shadow: 2px 2px 8px rgba(255, 140, 0, 0.3);
}

/* Section 1: Intro - NEW VIDEO PLAYER STYLES */
.video-container {
    position: relative;
    max-width: 900px;
    width: 100%;
    margin: 0 auto 30px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 140, 0, 0.3);
    background: #000;
}

#intro-video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 15px; /* Added for consistency on some platforms */
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}

.video-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.initial-play-btn {
    width: 90px;
    height: 90px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    color: white;
    font-size: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
    padding-left: 5px; /* Optical alignment for play icon */
}

.initial-play-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 140, 0, 0.8);
    border-color: #fff;
}

.video-controls {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    background: rgba(20, 20, 20, 0.7);
    backdrop-filter: blur(10px) saturate(180%);
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 1;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
    visibility: visible;
    z-index: 21;
}

.video-container.inactive .video-controls,
.video-container.inactive .video-overlay:not(.initial-play-overlay) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

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

.progress-container {
    flex-grow: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: height 0.2s ease;
}

.progress-container:hover {
    height: 8px;
}

.progress-bar {
    height: 100%;
    background: #ff8c00;
    border-radius: 3px;
    width: 0%;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.progress-container:hover .progress-bar::after {
    opacity: 1;
}

.time-display {
    color: white;
    font-size: 14px;
    font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
    white-space: nowrap;
    user-select: none;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    width: 70px;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease;
}

.volume-slider:hover::-webkit-slider-thumb { transform: scale(1.1); }
.volume-slider:hover::-moz-range-thumb { transform: scale(1.1); }


.video-container:fullscreen { max-width: 100%; border-radius: 0; }
.video-container:fullscreen #intro-video { max-height: 100vh; height: 100vh; border-radius: 0; }
.video-container:-webkit-full-screen { max-width: 100%; border-radius: 0; }
.video-container:-webkit-full-screen #intro-video { max-height: 100vh; height: 100vh; border-radius: 0; }

.intro-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.description {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.warning {
    background: rgba(255, 140, 0, 0.1);
    border: 2px solid #ff8c00;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.warning p {
    font-size: 16px;
    font-weight: bold;
}

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

.registration-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-width: 500px;
    padding: 10px 0;
}

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

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

.promo-code {
    background: rgba(255, 140, 0, 0.1);
    border: 1px solid #ff8c00;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    text-align: center;
    color: #fff;
}

.copyable-code {
    font-weight: bold;
    color: #ffd700;
    cursor: pointer;
    margin-left: 5px;
    transition: color 0.3s ease;
    user-select: none;
}

.copyable-code:hover {
    color: #fff;
}

.register-img {
    width: 160px;
    height: 40px;
    transition: transform 0.3s ease;
    cursor: pointer;
    display: block;
}

.register-img:hover {
    transform: scale(1.05);
}

.next-btn {
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
    border: none;
    color: white;
    padding: 15px 50px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(255, 140, 0, 0.4);
}

.next-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 140, 0, 0.6);
}

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

.game-option {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    border-radius: 10px;
    padding: 5px;
}

.game-option:hover {
    transform: scale(1.05);
}

.game-option.selected {
    border-color: #ff8c00;
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.6);
}

.game-img {
    width: 160px;
    height: 40px;
    display: block;
}

.id-input-container {
    text-align: center;
    margin-bottom: 30px;
}

.id-input {
    width: 100%;
    max-width: 400px;
    padding: 15px;
    font-size: 18px;
    border: 2px solid #ff8c00;
    border-radius: 10px;
    background: rgba(255, 140, 0, 0.1);
    color: white;
    text-align: center;
}

.id-input:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.5);
}

.validation-msg {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    min-height: 20px;
}

.validation-msg.error {
    color: #ff4444;
}

.validation-msg.success {
    color: #44ff44;
}

.start-btn {
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
    border: none;
    color: white;
    padding: 15px 50px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
    box-shadow: 0 5px 20px rgba(255, 140, 0, 0.4);
}

.start-btn:disabled {
    background: #666;
    cursor: not-allowed;
    box-shadow: none;
}

.start-btn:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 140, 0, 0.6);
}

/* Section 3: Apple Game */
.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 140, 0, 0.1);
    border-radius: 10px;
}

.user-info, .game-info-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.label {
    font-weight: bold;
    color: #ff8c00;
}

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

.game-title {
    color: #ff8c00;
    font-size: 48px;
    text-align: center;
    margin-bottom: 15px;
}

.live-timer {
    text-align: center;
    margin-bottom: 20px;
    font-size: 18px;
}

#timer {
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 5px;
}

.game-grid-container {
    margin-bottom: 20px;
    overflow-x: auto;
}

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

.grid-label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #ff8c00;
    font-size: 14px;
    padding: 5px;
}

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

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

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

.game-start-btn {
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
    border: none;
    color: white;
    padding: 15px 50px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
    box-shadow: 0 5px 20px rgba(255, 140, 0, 0.4);
}

.game-start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 140, 0, 0.6);
}

/* Country Selector */
.country-selector-container {
    text-align: center;
    margin-bottom: 30px;
}

.country-label {
    display: block;
    color: #ff8c00;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
}

.country-selector {
    width: 100%;
    max-width: 400px;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #ff8c00;
    border-radius: 10px;
    background: rgba(255, 140, 0, 0.1);
    color: white;
    text-align: center;
    cursor: pointer;
}

.country-selector:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.5);
}

.country-selector option {
    background: #1a1a1a;
    color: white;
    padding: 10px;
}

/* Server Status */
.server-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(255, 140, 0, 0.1);
    border-radius: 10px;
}

.server-label {
    font-weight: bold;
    color: #ff8c00;
}

.status-indicator {
    font-size: 20px;
    animation: pulse-indicator 2s infinite;
}

.status-indicator.offline {
    animation: none;
}

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

#server-country {
    font-weight: bold;
    font-size: 16px;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    border: 2px solid #ff8c00;
    box-shadow: 0 10px 50px rgba(255, 140, 0, 0.5);
}

.modal-content h2 {
    color: #ff8c00;
    margin-bottom: 20px;
    font-size: 28px;
}

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

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

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

.yes-btn {
    background: linear-gradient(135deg, #44ff44, #22cc22);
    color: white;
}

.no-btn {
    background: linear-gradient(135deg, #ff4444, #cc2222);
    color: white;
}

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



/* Notification Banner */
.notification-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translate(-50%, -150%);
    width: 95%;
    max-width: 500px;
    background: rgba(40, 40, 40, 0.7);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.125);
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10000;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.5s ease;
    visibility: hidden;
}

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

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

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



.notification-close-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #ccc;
    padding: 5px;
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

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

/* Footer Styles */
.site-footer {
    padding: 40px 20px;
    text-align: center;
    margin-top: 50px;
}

.footer-content {
    position: relative;
    display: inline-block;
    padding: 15px 30px;
}

/* Glowing border frame */
.footer-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    border: 2px solid transparent;
    background: linear-gradient(45deg, #ff8c00, #ffd700, #ff8c00) border-box;
    -webkit-mask: 
        linear-gradient(#fff 0 0) padding-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    z-index: 1;
    animation: glow-pulse 2.5s infinite ease-in-out;
}

/* Pulsing glow animation */
@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 10px #ff8c00, 0 0 20px #ff8c00, 0 0 30px #ffaf4d;
    }
    50% {
        box-shadow: 0 0 20px #ffaf4d, 0 0 30px #ffaf4d, 0 0 40px #ffd700;
    }
}

/* Shimmering text */
.footer-text {
    font-size: 18px;
    font-weight: bold;
    position: relative;
    z-index: 2;
    background: linear-gradient(90deg, #ffaf4d, #ffd700, #fff, #ffd700, #ffaf4d);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: text-shimmer 4s infinite linear;
}

@keyframes text-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Added glowing effect for header */
@keyframes logo-glow {
    0%, 100% {
        filter: drop-shadow(0 0 5px #ff8c00) drop-shadow(0 0 10px #ff8c00);
    }
    50% {
        filter: drop-shadow(0 0 10px #ffaf4d) drop-shadow(0 0 20px #ffaf4d);
    }
}

@keyframes text-glow {
    0%, 100% {
        text-shadow: 0 0 5px #ff8c00, 0 0 10px #ff8c00, 2px 2px 4px rgba(0,0,0,0.5);
    }
    50% {
        text-shadow: 0 0 10px #ffaf4d, 0 0 20px #ffaf4d, 2px 2px 4px rgba(0,0,0,0.5);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .fixed-header {
        height: 70px;
        padding: 0 10px;
    }
    
    body {
        padding-top: 70px;
    }
    
    .section {
        padding: 20px 15px;
    }

    .site-name {
        font-size: 20px;
    }
    
    .main-logo {
        width: 50px;
        height: 50px;
    }
    
    .telegram-btn {
        width: 40px;
        height: 40px;
    }
    
    .telegram-logo {
        width: 20px;
        height: 20px;
    }
    
    .section-title {
        font-size: 32px;
    }

    .id-input-container {
        margin-bottom: 20px;
    }

    .game-selection {
        margin-bottom: 30px;
    }

    .id-input {
        padding: 12px;
        font-size: 16px;
    }

    .start-btn {
        padding: 12px 40px;
        font-size: 16px;
    }
    
    .game-title {
        font-size: 32px;
        margin-bottom: 10px;
    }
    
    .game-img {
        transform: scale(0.9);
    }
    
    .game-grid {
        gap: 4px;
        font-size: 12px;
    }
    
    .game-info {
        margin-bottom: 15px;
        padding: 10px;
        font-size: 14px;
    }

    .server-status {
        margin-bottom: 10px;
        padding: 8px;
        font-size: 14px;
        flex-wrap: wrap;
    }

    .live-timer {
        margin-bottom: 15px;
        font-size: 16px;
    }

    .game-start-btn {
        padding: 12px 40px;
        font-size: 16px;
    }

    .country-selector {
        font-size: 14px;
    }
    
    .volume-container {
        display: none;
    }
    
    .time-display {
        font-size: 12px;
    }
    
    .initial-play-btn {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .notification-banner {
        top: 10px;
        padding: 10px;
        gap: 10px;
    }
    .notification-icon {
        width: 24px;
        height: 24px;
    }
    .notification-message {
        font-size: 13px;
    }
    .notification-close-btn {
        font-size: 14px;
    }

    .footer-text {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .header-center {
        flex-direction: column;
        gap: 5px;
    }
    
    .site-name {
        font-size: 16px;
    }
    
    .main-logo {
        width: 40px;
        height: 40px;
    }
    
    .section-title {
        font-size: 28px;
    }

    .game-title {
        font-size: 28px;
    }

    .game-grid {
        gap: 3px;
    }

    .grid-label {
        font-size: 10px;
        padding: 2px;
    }

    .registration-item {
        flex-wrap: wrap;
    }
    
    .footer-text {
        font-size: 14px;
    }
}







#country-selector {
  background-color: rgba(13, 5, 28, 0.5); 
  color: #fff;
  border: 2px solid #34aee0;
  border-radius: 10px;
  padding: 8px;
  font-family: Poppins, sans-serif;
}


#country-selector optgroup {
  background-color: rgba(18, 8, 36, 0.6);
  color: #34aee0;
  font-weight: 700;
  font-size: 15px;
  padding: 5px;
  text-transform: uppercase;
}


#country-selector option {
  background-color: rgba(27, 16, 46, 0.7);
  color: #ffffff;
  padding: 5px;
}


#country-selector option:hover {
  background-color: #34aee0;
  color: #0d051c;
}








/* --- TELEGRAM POPUP OVERLAY --- */
.tg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000; /* فوق كل شيء */
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
    padding: 20px;
}

/* when active (show) */
.tg-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- POPUP CARD --- */
.tg-popup-card {
    position: relative;
    width: 100%;
    max-width: 360px;
    background: radial-gradient(circle at 20% 20%, rgba(40,40,40,0.9) 0%, rgba(15,15,15,0.95) 70%);
    border: 2px solid #ff8c00;
    border-radius: 20px;
    padding: 24px 20px 20px;
    box-shadow: 0 20px 60px rgba(255,140,0,0.4), 0 0 40px rgba(255,140,0,0.5);
    text-align: center;
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    transition: all .35s cubic-bezier(0.25,0.46,0.45,0.94);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* visible state for the card (when overlay is active) */
.tg-overlay.active .tg-popup-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Close X button (top right) */
.tg-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,140,0,0.15);
    border: 1px solid #ff8c00;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1;
    padding: 6px 8px;
    cursor: pointer;
    transition: all .25s ease;
}
.tg-close-btn:hover {
    background: rgba(255,140,0,0.35);
    box-shadow: 0 0 12px rgba(255,140,0,0.7), 0 0 30px rgba(255,140,0,0.4);
}

/* Header text */
.tg-header {
    margin-bottom: 20px;
}
.tg-title {
    font-size: 20px;
    font-weight: bold;
    color: #ff8c00;
    text-shadow: 0 0 8px rgba(255,140,0,0.6), 0 0 16px rgba(255,140,0,0.4);
    animation: text-glow 3s infinite ease-in-out;
}
.tg-text {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.4;
    color: #fff;
    opacity: 0.9;
}

/* MAIN CALL TO ACTION BUTTON (Join Now) */
.tg-join-btn {
    width: 100%;
    background: linear-gradient(135deg, #0088cc, #00a0e9);
    border: 0;
    border-radius: 30px;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    padding: 12px 18px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(0,160,233,0.4), 0 0 20px rgba(0,160,233,0.7);
    transition: all .25s ease;
    margin: 0 auto 15px;
}
.tg-join-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 35px rgba(0,160,233,0.6), 0 0 30px rgba(0,160,233,0.9);
}

/* Telegram icon inside button */
.tg-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.6));
}

/* Secondary close button */
.tg-hide-btn {
    width: 100%;
    background: rgba(255,140,0,0.15);
    border: 2px solid #ff8c00;
    border-radius: 30px;
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    padding: 10px 18px;
    cursor: pointer;
    transition: all .25s ease;
    box-shadow: 0 8px 25px rgba(255,140,0,0.25), 0 0 20px rgba(255,140,0,0.4);
    font-family: inherit;
}
.tg-hide-btn:hover {
    background: rgba(255,140,0,0.3);
    box-shadow: 0 12px 35px rgba(255,140,0,0.5), 0 0 30px rgba(255,140,0,0.8);
    transform: translateY(-2px) scale(1.02);
}

/* Small screens */
@media (max-width:480px){
    .tg-popup-card{
        max-width: 320px;
        padding:20px 16px 16px;
        border-radius:16px;
    }
    .tg-title{
        font-size:18px;
    }
    .tg-text{
        font-size:14px;
    }
    .tg-join-btn{
        font-size:15px;
        padding:11px 16px;
    }
    .tg-hide-btn{
        font-size:14px;
        padding:9px 16px;
    }
    .tg-icon{
        width:22px;
        height:22px;
    }
}








/* 🌀 Loading Overlay (orange style + red text) */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1500;
  justify-content: center;
  align-items: center;
}

.loading-overlay.active {
  display: flex;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}


.loading-text {
  color: #ffffff;
  font-size: 1em;
  margin-bottom: 15px;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8); 
  animation: pulseText 1.5s infinite;
}

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


.spinner {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(255, 140, 0, 0.3);
  border-top-color: #ff8c00;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 20px rgba(255, 140, 0, 0.6);
}

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





/* ====== Prestart Overlay (does not conflict with #loading-overlay) ====== */
.prestart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  display: none;               /* hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 99998;              /* below any critical popup if needed */
  opacity: 0;
  transition: opacity .35s ease;
}

.prestart-overlay.is-visible {
  display: flex;               /* enables centering */
  opacity: 1;                  /* fade in */
}

.prestart-content {
  text-align: center;
  padding: 28px 22px;
  border-radius: 16px;
  background: rgba(13, 5, 28, 0.55);
  border: 1px solid rgba(52, 174, 224, 0.35);
  backdrop-filter: blur(6px);
  max-width: 320px;
  width: calc(100% - 48px);
  animation: prestart-pop .28s ease;
}

@keyframes prestart-pop {
  from { transform: scale(.96); opacity: .8; }
  to   { transform: scale(1);   opacity: 1; }
}

.prestart-logo {
  width: 110px;
  height: auto;
  display: block;
  margin: 0 auto 16px;
  filter: drop-shadow(0 6px 18px rgba(52,174,224,.3));
}

.prestart-spinner {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,.18);
  border-top-color: #34aee0;   /* matches your brand accent */
  animation: prestart-spin 1s linear infinite;
}

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

.prestart-text {
  color: #eaf6ff;
  font-size: 15px;
  line-height: 1.4;
  margin: 0;
  opacity: .95;
}

/* lock page scroll while overlay is visible */
body.prestart-lock {
  overflow: hidden;
}



.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; 
}

.footer-logo {
    width: 24px;
    height: auto;
}




