/* style.css - Complete original design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: #0a0c10;
    color: #edeff5;
    line-height: 1.4;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

::-webkit-scrollbar {
    width: 5px;
}
::-webkit-scrollbar-track {
    background: #1a1e2a;
}
::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 10px;
}

.container {
    max-width: 100%;
    padding: 0 12px;
    margin: 0 auto;
}

[dir="rtl"] {
    direction: rtl;
}

[dir="ltr"] {
    direction: ltr;
}

/* ========== HERO SECTION ========== */
.hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(ellipse at 30% 40%, #0f172a, #02040a);
    position: relative;
    overflow: hidden;
    padding: 40px 0 50px;
}

.hero::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800" opacity="0.05"><path fill="none" stroke="%234f8fff" stroke-width="1.5" d="M0 400 L800 400 M400 0 L400 800 M150 150 L650 650 M200 650 L650 200"/><circle cx="400" cy="400" r="180" stroke="%239473fc" stroke-width="1" fill="none"/></svg>');
    background-repeat: repeat;
    animation: slowDrift 40s linear infinite;
    pointer-events: none;
}

@keyframes slowDrift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100px, -100px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    animation: fadeUp 0.8s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffffff, #60a5fa, #c084fc);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 1rem;
    margin-bottom: 24px;
    color: #b9c3df;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.trust-badge {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.trust-badge span {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    padding: 6px 16px;
    border-radius: 60px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(96,165,250,0.3);
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(95deg, #e11d48, #3b82f6);
    padding: 14px 34px;
    border-radius: 60px;
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    box-shadow: 0 15px 30px -10px #1e40af80;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-cta:active {
    transform: scale(0.97);
}

/* ========== GAMES SECTION ========== */
.games-showcase {
    padding: 40px 0 30px;
    background: #0a0e17;
}

.section-title {
    text-align: center;
    margin-bottom: 28px;
}

.section-title h2 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(to left, #e2e8f0, #818cf8);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.section-title p {
    color: #8d9ac0;
    font-size: 0.85rem;
    margin-top: 6px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.game-card {
    background: #11161f;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.25s ease;
    border: 1px solid #232b38;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: #3b82f6;
    box-shadow: 0 15px 25px -12px #0f172a;
}

.image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 2.5;
    overflow: hidden;
    background: #0a0f18;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.game-card:hover .image-wrapper img {
    transform: scale(1.08);
}

.platform-badge {
    position: absolute;
    bottom: 8px;
    display: flex;
    gap: 6px;
    z-index: 3;
}

[dir="rtl"] .platform-badge {
    right: 8px;
}

[dir="ltr"] .platform-badge {
    left: 8px;
}

.platform-badge span {
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    padding: 3px 9px;
    border-radius: 30px;
    font-size: 0.6rem;
    font-weight: 700;
}

.game-info {
    padding: 10px 8px 12px;
    text-align: center;
}

.game-info h3 {
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
    color: #f0f3fa;
}

.game-icons {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 0.65rem;
    color: #8d9ac0;
    margin-bottom: 6px;
}

.play-btn {
    background: rgba(59,130,246,0.15);
    border: 0.5px solid rgba(59,130,246,0.6);
    border-radius: 40px;
    padding: 5px 0;
    font-size: 0.7rem;
    font-weight: 600;
    width: 90%;
    margin: 6px auto 0;
    text-align: center;
    cursor: pointer;
}

.play-btn:active {
    background: #3b82f6;
    color: white;
}

/* ========== LIVE POPUP ========== */
.live-popup {
    position: fixed;
    bottom: 20px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 320px;
    width: auto;
}

[dir="rtl"] .live-popup {
    right: 20px;
    transform: translateX(50px);
}

[dir="ltr"] .live-popup {
    left: 20px;
    transform: translateX(-50px);
}

.live-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.live-popup.hide {
    opacity: 0;
    visibility: hidden;
}

.popup-content {
    background: linear-gradient(135deg, #1a1f2e, #0f1320);
    border-radius: 20px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 0 1px rgba(59,130,246,0.3);
    backdrop-filter: blur(10px);
}

[dir="rtl"] .popup-content {
    border-right: 4px solid #3b82f6;
}

[dir="ltr"] .popup-content {
    border-left: 4px solid #3b82f6;
}

.popup-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(145deg, #3b82f6, #9333ea);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.popup-text {
    flex: 1;
}

.popup-text .username {
    font-weight: 800;
    font-size: 0.9rem;
    color: #60a5fa;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.popup-text .username .badge-live {
    background: #e11d48;
    font-size: 0.55rem;
    padding: 2px 6px;
    border-radius: 30px;
}

.popup-text .action {
    font-size: 0.75rem;
    color: #cbd5e6;
}

.popup-text .game-name {
    color: #fbbf24;
    font-weight: 700;
}

.popup-close {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 8px;
    border-radius: 30px;
}

/* ========== COMING SOON ========== */
.coming-soon {
    background: linear-gradient(135deg, #0d1220, #070b12);
    padding: 30px 20px 40px;
    text-align: center;
    border-top: 1px solid #1e2a3e;
    border-bottom: 1px solid #1e2a3e;
    margin: 20px 0 0;
}

.coming-soon-content {
    max-width: 600px;
    margin: 0 auto;
}

.coming-soon-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    display: inline-block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.coming-soon h3 {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #c084fc, #60a5fa);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 8px;
}

.coming-soon p {
    color: #9aa4bf;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.coming-soon-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(96,165,250,0.1);
    border: 1px solid rgba(96,165,250,0.3);
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #b9c3df;
}

/* ========== FOOTER ========== */
.footer {
    background: #03070f;
    padding: 35px 20px 30px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 28px;
    margin-bottom: 25px;
}

.footer-links a {
    color: #9aa4bf;
    text-decoration: none;
    font-size: 0.8rem;
    transition: 0.2s;
}

.footer-links a:hover {
    color: #60a5fa;
}

.copyright {
    font-size: 0.7rem;
    color: #5f6c86;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 500px) {
    .game-grid {
        gap: 10px;
    }
    .hero h1 {
        font-size: 1.7rem;
    }
    .btn-cta {
        padding: 11px 26px;
        font-size: 1rem;
    }
    .game-info h3 {
        font-size: 0.7rem;
    }
    .live-popup {
        max-width: 280px;
        bottom: 15px;
    }
    [dir="rtl"] .live-popup {
        right: 15px;
    }
    [dir="ltr"] .live-popup {
        left: 15px;
    }
}