@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;600;700;800;900&display=swap");

:root{
    --bg:#070914;
    --bg-soft:#0d1022;
    --card:#12162b;
    --card-soft:#171c35;
    --primary:#7c3aed;
    --primary-light:#a855f7;
    --accent:#fbbf24;
    --text:#ffffff;
    --muted:#a8b0c5;
    --border:rgba(255,255,255,.09);
    --shadow:0 24px 70px rgba(0,0,0,.35);
}

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

html{
    scroll-behavior:smooth;
}

body{
    min-height:100vh;
    font-family:"Tajawal",Tahoma,Arial,sans-serif;
    background:
        radial-gradient(circle at 10% 10%,rgba(124,58,237,.15),transparent 28%),
        radial-gradient(circle at 90% 30%,rgba(168,85,247,.10),transparent 25%),
        var(--bg);
    color:var(--text);
    line-height:1.7;
}

a{
    color:inherit;
}

button,
a{
    -webkit-tap-highlight-color:transparent;
}

/* رأس الصفحة */

header{
    min-height:82px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:25px;
    padding:16px 6%;
    position:sticky;
    top:0;
    z-index:1000;
    background:rgba(7,9,20,.88);
    backdrop-filter:blur(18px);
    border-bottom:1px solid var(--border);
}

.logo{
    font-size:30px;
    font-weight:900;
    white-space:nowrap;
    background:linear-gradient(135deg,#ffffff,#d8b4fe);
    -webkit-background-clip:text;
    background-clip:text;
    color:transparent;
}

nav{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    flex-wrap:wrap;
}

nav a{
    color:#d7dbea;
    text-decoration:none;
    font-size:15px;
    font-weight:600;
    padding:10px 13px;
    border-radius:10px;
    transition:.25s ease;
}

nav a:hover{
    color:white;
    background:rgba(255,255,255,.07);
}

nav a:first-child{
    color:var(--accent);
    background:rgba(251,191,36,.09);
}

.actions{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

.actions a{
    text-decoration:none;
    padding:11px 17px;
    border-radius:11px;
    font-size:14px;
    font-weight:700;
    transition:.25s ease;
}

.login{
    color:white;
    border:1px solid var(--border);
    background:rgba(255,255,255,.04);
}

.login:hover{
    background:rgba(255,255,255,.09);
    transform:translateY(-2px);
}

.register{
    color:white;
    background:linear-gradient(135deg,var(--primary),var(--primary-light));
    box-shadow:0 10px 30px rgba(124,58,237,.28);
}

.register:hover{
    transform:translateY(-2px);
    box-shadow:0 14px 38px rgba(124,58,237,.38);
}

/* الواجهة الرئيسية */

.hero{
    width:min(1400px,100%);
    min-height:610px;
    margin:auto;
    padding:90px 7%;
    display:grid;
    grid-template-columns:1.15fr .85fr;
    align-items:center;
    gap:70px;
}

.hero-text{
    max-width:680px;
}

.hero h1{
    display:inline-block;
    font-size:clamp(68px,8vw,112px);
    line-height:1;
    font-weight:900;
    letter-spacing:-3px;
    margin-bottom:22px;
    background:linear-gradient(135deg,#fbbf24,#fde68a);
    -webkit-background-clip:text;
    background-clip:text;
    color:transparent;
    filter:drop-shadow(0 12px 35px rgba(251,191,36,.17));
}

.hero h2{
    max-width:650px;
    font-size:clamp(32px,4vw,55px);
    line-height:1.35;
    font-weight:800;
    margin-bottom:22px;
}

.hero p{
    max-width:650px;
    color:var(--muted);
    font-size:19px;
    line-height:2;
}

.hero-buttons{
    margin-top:36px;
    display:flex;
    align-items:center;
    gap:14px;
    flex-wrap:wrap;
}

.hero-buttons a{
    min-width:175px;
    text-align:center;
    text-decoration:none;
    padding:15px 26px;
    border-radius:13px;
    font-weight:800;
    transition:.25s ease;
}

.main-btn{
    background:linear-gradient(135deg,#fbbf24,#f59e0b);
    color:#17120a;
    box-shadow:0 14px 35px rgba(251,191,36,.22);
}

.main-btn:hover{
    transform:translateY(-3px);
    box-shadow:0 18px 45px rgba(251,191,36,.30);
}

.second-btn{
    color:white;
    border:1px solid rgba(168,85,247,.6);
    background:rgba(124,58,237,.10);
}

.second-btn:hover{
    transform:translateY(-3px);
    background:rgba(124,58,237,.20);
}

.hero-visual{
    width:100%;
    max-width:480px;
    height:430px;
    justify-self:end;
    position:relative;
    overflow:hidden;
    border-radius:36px;
    border:1px solid rgba(255,255,255,.12);
    background:
        radial-gradient(circle at 50% 35%,rgba(168,85,247,.35),transparent 35%),
        linear-gradient(145deg,rgba(255,255,255,.10),rgba(255,255,255,.025));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.12),
        0 40px 100px rgba(0,0,0,.35),
        0 0 90px rgba(124,58,237,.20);
}

.hero-visual::before{
    content:"";
    position:absolute;
    width:260px;
    height:260px;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    border-radius:50%;
    border:1px solid rgba(255,255,255,.10);
    box-shadow:
        0 0 0 45px rgba(255,255,255,.025),
        0 0 0 90px rgba(255,255,255,.018);
}

.hero-visual div{
    position:absolute;
    z-index:2;
    display:flex;
    align-items:center;
    justify-content:center;
    width:105px;
    height:105px;
    font-size:58px;
    border-radius:28px;
    background:rgba(12,15,32,.70);
    border:1px solid rgba(255,255,255,.12);
    box-shadow:0 20px 45px rgba(0,0,0,.30);
    backdrop-filter:blur(12px);
    animation:float 4s ease-in-out infinite;
}

.trophy{
    top:55px;
    right:calc(50% - 60px);
    width:125px!important;
    height:125px!important;
    font-size:76px!important;
}

.game{
    bottom:55px;
    right:48px;
    animation-delay:.7s!important;
}

.shop{
    bottom:62px;
    left:48px;
    animation-delay:1.3s!important;
}

.question{
    top:85px;
    left:40px;
    animation-delay:1.8s!important;
}

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

/* الإحصائيات */

.stats{
    width:min(1180px,88%);
    margin:0 auto 80px;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    border:1px solid var(--border);
    border-radius:24px;
    overflow:hidden;
    background:rgba(255,255,255,.035);
    box-shadow:var(--shadow);
}

.stats div{
    min-height:135px;
    padding:25px 20px;
    text-align:center;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    border-left:1px solid var(--border);
}

.stats div:last-child{
    border-left:none;
}

.stats strong{
    display:block;
    font-size:35px;
    font-weight:900;
    color:white;
}

.stats span{
    margin-top:3px;
    color:var(--muted);
    font-size:15px;
}

/* الأقسام */

.categories{
    width:min(1250px,88%);
    margin:auto;
    padding-bottom:90px;
}

.categories h2{
    font-size:34px;
    font-weight:900;
    margin-bottom:28px;
}

.category-grid{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:18px;
}

.cat{
    min-height:225px;
    position:relative;
    overflow:hidden;
    display:block;
    padding:28px 24px;
    border-radius:22px;
    border:1px solid var(--border);
    background:
        linear-gradient(145deg,rgba(255,255,255,.08),rgba(255,255,255,.025));
    box-shadow:0 18px 45px rgba(0,0,0,.18);
    color:white;
    text-decoration:none;
    font-size:44px;
    transition:.28s ease;
}

.cat::before{
    content:"";
    position:absolute;
    width:120px;
    height:120px;
    left:-40px;
    bottom:-50px;
    border-radius:50%;
    background:rgba(124,58,237,.18);
    filter:blur(10px);
}

.cat:hover{
    transform:translateY(-7px);
    border-color:rgba(168,85,247,.45);
    background:
        linear-gradient(145deg,rgba(124,58,237,.18),rgba(255,255,255,.04));
    box-shadow:0 25px 65px rgba(0,0,0,.28);
}

.cat h3{
    position:relative;
    z-index:2;
    font-size:20px;
    font-weight:800;
    margin:18px 0 8px;
}

.cat p{
    position:relative;
    z-index:2;
    color:var(--muted);
    font-size:14px;
    line-height:1.8;
}

/* استجابة الجوال والتابلت */

@media (max-width:1100px){
    header{
        padding:15px 4%;
        flex-wrap:wrap;
        justify-content:center;
    }

    .logo{
        width:100%;
        text-align:center;
    }

    .hero{
        grid-template-columns:1fr;
        text-align:center;
        padding-top:65px;
    }

    .hero-text{
        margin:auto;
    }

    .hero p{
        margin:auto;
    }

    .hero-buttons{
        justify-content:center;
    }

    .hero-visual{
        justify-self:center;
    }

    .category-grid{
        grid-template-columns:repeat(3,1fr);
    }
}

@media (max-width:750px){
    header{
        position:relative;
    }

    nav{
        gap:4px;
    }

    nav a{
        font-size:13px;
        padding:8px 9px;
    }

    .actions{
        justify-content:center;
    }

    .hero{
        min-height:auto;
        padding:55px 22px 70px;
        gap:45px;
    }

    .hero h1{
        font-size:72px;
    }

    .hero h2{
        font-size:31px;
    }

    .hero p{
        font-size:16px;
    }

    .hero-visual{
        height:340px;
    }

    .hero-visual div{
        width:82px;
        height:82px;
        font-size:46px;
    }

    .trophy{
        width:105px!important;
        height:105px!important;
        font-size:64px!important;
    }

    .stats{
        grid-template-columns:repeat(2,1fr);
    }

    .stats div{
        border-bottom:1px solid var(--border);
    }

    .category-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

@media (max-width:470px){
    .hero-buttons{
        flex-direction:column;
    }

    .hero-buttons a{
        width:100%;
    }

    .hero-visual{
        height:300px;
    }

    .category-grid{
        grid-template-columns:1fr;
    }

    .cat{
        min-height:185px;
    }
}