:root {
    --bg-main: #0b0d13;
    --bg-secondary: #131722;
    --bg-card: rgba(23, 27, 40, 0.75);
    --bg-glass: rgba(18, 22, 34, 0.85);
    
    --primary: #ff3344;
    --primary-glow: rgba(255, 51, 68, 0.35);
    --secondary: #6366f1;
    --accent: #ff9900;
    
    --vip-color: #10b981;
    --vipplus-color: #f59e0b;
    --mvp-color: #06b6d4;
    --mvpplus-color: #a855f7;
    --champion-color: #ef4444;
    
    --text-white: #ffffff;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(255, 51, 68, 0.3);
    
    --ht1-color: #ff2a4b;
    --ht1-glow: rgba(255, 42, 75, 0.4);
    --lt1-color: #ff5252;
    --ht2-color: #a855f7;
    --ht2-glow: rgba(168, 85, 247, 0.4);
    --lt2-color: #c084fc;
    --ht3-color: #06b6d4;
    --ht3-glow: rgba(6, 182, 212, 0.4);
    --lt3-color: #38bdf8;
    --ht4-color: #10b981;
    --lt4-color: #34d399;
    --ht5-color: #64748b;
    --lt5-color: #94a3b8;
    
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Inter', sans-serif;
    --font-heading: 'Chakra Petch', 'Cairo', sans-serif;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-ar);
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-main);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

.bg-glow {
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 51, 68, 0.18) 0%, rgba(99, 102, 241, 0.08) 50%, transparent 75%);
    filter: blur(80px);
    z-index: -2;
    pointer-events: none;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background-color: rgba(11, 13, 19, 0.85);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 0;
}

.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text-white);
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    box-shadow: 0 0 15px var(--primary-glow);
    border: 1px solid rgba(255, 51, 68, 0.3);
}

.brand-text { display: flex; flex-direction: column; }
.brand-title { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; }
.brand-highlight { color: var(--primary); text-shadow: 0 0 12px var(--primary-glow); }
.brand-badge { font-size: 0.68rem; font-weight: 700; letter-spacing: 1px; color: var(--accent); display: flex; align-items: center; gap: 5px; }

.nav-menu { display: flex; align-items: center; gap: 12px; }
.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.05);
}

.store-nav-btn {
    position: relative;
    color: #fff;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.store-nav-btn:hover {
    background: rgba(16, 185, 129, 0.22);
    border-color: #10b981;
}

.nav-free-badge {
    font-size: 0.68rem;
    background: #10b981;
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
}

.nav-link.discord-link:hover { color: #5865F2; background: rgba(88, 101, 242, 0.1); }

.user-logged-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
}

.user-logged-avatar { width: 32px; height: 32px; border-radius: 6px; image-rendering: pixelated; }
.user-logged-name { font-weight: 700; font-size: 0.9rem; color: var(--text-white); }

.btn-logout { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 0.85rem; padding: 4px; transition: var(--transition); }
.btn-logout:hover { color: var(--primary); }

.btn {
    border: none;
    cursor: pointer;
    font-weight: 700;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #ff3344, #e61937);
    color: #fff;
    padding: 10px 20px;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 51, 68, 0.5);
}

.main-wrapper { max-width: 1300px; margin: 0 auto; padding: 30px 24px 60px; }
.hero-section { text-align: center; padding: 30px 0 40px; }

.owner-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 153, 0, 0.12);
    border: 1px solid rgba(255, 153, 0, 0.35);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.95rem;
    margin-bottom: 20px;
    animation: pulse 3s infinite ease-in-out;
}

.owner-avatar { width: 24px; height: 24px; border-radius: 4px; image-rendering: pixelated; }
.glow-text { color: #ffb703; text-shadow: 0 0 10px rgba(255, 183, 3, 0.5); }
.hero-title { font-size: 2.8rem; font-weight: 900; line-height: 1.2; margin-bottom: 12px; font-family: var(--font-heading); }
.text-gradient { background: linear-gradient(135deg, #ff3344, #ff7b00); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { max-width: 680px; margin: 0 auto 30px; color: var(--text-muted); font-size: 1.1rem; }

.server-detailed-panel {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    max-width: 980px;
    margin: 0 auto;
    padding: 24px 28px;
    text-align: right;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
}

.server-detailed-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff3344, #6366f1, #10b981);
}

.panel-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
}

.panel-title { font-size: 1.1rem; font-weight: 800; display: flex; align-items: center; gap: 10px; }

.btn-refresh-status {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-refresh-status:hover {
    color: #fff;
    border-color: var(--primary);
    background: rgba(255, 51, 68, 0.1);
}

.btn-refresh-status.spinning i { animation: spin 1s linear infinite; }
.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

.status-box {
    background: rgba(11, 13, 19, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.box-head { display: flex; justify-content: space-between; align-items: center; }
.edition-pill {
    font-size: 0.85rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.edition-pill.java { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.edition-pill.bedrock { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }

.status-tag { font-size: 0.8rem; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.status-tag.online { color: #10b981; }
.status-tag.offline { color: #ef4444; }

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    display: inline-block;
}

.status-tag.offline .pulse-dot { background: #ef4444; box-shadow: 0 0 10px #ef4444; }

.connection-row {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.conn-label { font-size: 0.78rem; color: var(--text-dim); }
.conn-ip { font-family: var(--font-en); font-weight: 700; font-size: 0.92rem; color: #fff; letter-spacing: 0.5px; }
.highlight-port { color: #38bdf8; }

.btn-mini-copy {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-mini-copy:hover { background: var(--primary); color: #fff; }

.players-live-box { display: flex; flex-direction: column; gap: 6px; }
.players-meta { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--text-muted); }

.progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #06b6d4);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.specs-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 8px;
}

.highlight-ver { color: #10b981; font-weight: 800; }
.highlight-sec { color: #6366f1; }

.motd-banner {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.motd-tag { font-size: 0.82rem; font-weight: 700; color: var(--text-dim); white-space: nowrap; }
.motd-text { font-family: var(--font-en), var(--font-ar); font-size: 0.95rem; font-weight: 700; }

.mc-gold { color: #FFAA00; text-shadow: 0 0 10px rgba(255, 170, 0, 0.4); }
.mc-white { color: #FFFFFF; }
.mc-aqua { color: #55FFFF; }
.mc-green { color: #55FF55; }

.tiers-section { margin-top: 50px; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 26px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.section-title { font-size: 1.85rem; font-weight: 800; display: flex; align-items: center; gap: 12px; }
.section-subtitle { color: var(--text-muted); font-size: 0.95rem; margin-top: 4px; }

.search-bar-wrapper { position: relative; min-width: 280px; }
.search-bar-wrapper input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 10px 18px 10px 42px;
    color: var(--text-white);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.search-bar-wrapper input:focus { border-color: var(--primary); box-shadow: 0 0 12px var(--primary-glow); }
.search-bar-wrapper .search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; }

.category-tabs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 30px; scrollbar-width: thin; }
.tab-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover { color: var(--text-white); border-color: rgba(255, 255, 255, 0.2); }
.tab-btn.active {
    background: linear-gradient(135deg, rgba(255, 51, 68, 0.2), rgba(255, 51, 68, 0.05));
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.tiers-grid { display: flex; flex-direction: column; gap: 24px; }
.tier-group { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 22px; transition: var(--transition); }
.tier-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.tier-badge-title { display: flex; align-items: center; gap: 12px; }

.tier-tag { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 800; padding: 4px 14px; border-radius: 6px; letter-spacing: 1px; }
.tier-tag.ht1 { background: rgba(255, 42, 75, 0.2); color: var(--ht1-color); border: 1px solid var(--ht1-color); box-shadow: 0 0 15px var(--ht1-glow); }
.tier-tag.lt1 { background: rgba(255, 82, 82, 0.15); color: var(--lt1-color); border: 1px solid var(--lt1-color); }
.tier-tag.ht2 { background: rgba(168, 85, 247, 0.2); color: var(--ht2-color); border: 1px solid var(--ht2-color); box-shadow: 0 0 15px var(--ht2-glow); }
.tier-tag.lt2 { background: rgba(192, 132, 252, 0.15); color: var(--lt2-color); border: 1px solid var(--lt2-color); }
.tier-tag.ht3 { background: rgba(6, 182, 212, 0.2); color: var(--ht3-color); border: 1px solid var(--ht3-color); box-shadow: 0 0 15px var(--ht3-glow); }
.tier-tag.lt3 { background: rgba(56, 189, 248, 0.15); color: var(--lt3-color); border: 1px solid var(--lt3-color); }
.tier-tag.ht4, .tier-tag.lt4 { background: rgba(16, 185, 129, 0.15); color: var(--ht4-color); border: 1px solid var(--ht4-color); }
.tier-tag.ht5, .tier-tag.lt5 { background: rgba(100, 116, 139, 0.2); color: var(--ht5-color); border: 1px solid var(--ht5-color); }

.tier-players-count { font-size: 0.85rem; color: var(--text-dim); }
.players-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }

.player-card {
    background: rgba(11, 13, 19, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}

.player-card.is-owner {
    border-color: rgba(255, 183, 3, 0.5);
    background: rgba(255, 183, 3, 0.06);
    box-shadow: 0 0 15px rgba(255, 183, 3, 0.1);
}

.player-avatar { width: 44px; height: 44px; border-radius: 6px; image-rendering: pixelated; background: #171b28; flex-shrink: 0; }
.player-info { display: flex; flex-direction: column; overflow: hidden; }
.player-name { font-family: var(--font-en); font-size: 0.95rem; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 6px; }
.player-rank { font-size: 0.72rem; color: var(--text-muted); }
.player-score { margin-right: auto; font-family: var(--font-heading); font-size: 0.85rem; font-weight: 700; color: var(--accent); }

.empty-tier-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.25);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-apply-inline {
    background: rgba(255, 51, 68, 0.15);
    border: 1px solid rgba(255, 51, 68, 0.35);
    color: #ff5252;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-apply-inline:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }

.store-section { margin-top: 60px; padding-top: 20px; }
.store-badge-highlight {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid #10b981;
    color: #34d399;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 800;
    animation: pulse 2.5s infinite;
}

.ranks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.rank-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.rank-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4); }
.rank-card.is-free { border-color: rgba(16, 185, 129, 0.4); box-shadow: 0 0 20px rgba(16, 185, 129, 0.15); }

.free-ribbon {
    position: absolute;
    top: 14px;
    left: -32px;
    background: #10b981;
    color: #000;
    font-weight: 900;
    font-size: 0.72rem;
    padding: 4px 34px;
    transform: rotate(-45deg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.popular-ribbon {
    position: absolute;
    top: 14px;
    left: -32px;
    background: #a855f7;
    color: #fff;
    font-weight: 900;
    font-size: 0.72rem;
    padding: 4px 34px;
    transform: rotate(-45deg);
}

.rank-card-header { text-align: center; margin-bottom: 20px; }
.rank-icon-wrapper {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.rank-vip .rank-icon-wrapper { background: rgba(16, 185, 129, 0.15); color: var(--vip-color); }
.rank-vipplus .rank-icon-wrapper { background: rgba(245, 158, 11, 0.15); color: var(--vipplus-color); }
.rank-mvp .rank-icon-wrapper { background: rgba(6, 182, 212, 0.15); color: var(--mvp-color); }
.rank-mvpplus .rank-icon-wrapper { background: rgba(168, 85, 247, 0.15); color: var(--mvpplus-color); }
.rank-champion .rank-icon-wrapper { background: rgba(239, 68, 68, 0.15); color: var(--champion-color); }

.rank-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.rank-price { display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.price-currency { font-size: 1.1rem; color: var(--text-dim); }
.price-value { font-size: 2rem; font-weight: 900; font-family: var(--font-heading); }
.price-period { font-size: 0.75rem; color: var(--text-dim); margin-right: 6px; }

.rank-features { list-style: none; margin-bottom: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 0.88rem; color: var(--text-muted); }
.rank-features li { display: flex; align-items: flex-start; gap: 8px; line-height: 1.4; }
.rank-features li i { color: #10b981; margin-top: 3px; flex-shrink: 0; }

.btn-claim-free {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    transition: var(--transition);
}

.btn-claim-free:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6); }

.btn-buy-rank {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 0.95rem;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
}

.btn-buy-rank:hover { background: #6366f1; border-color: #6366f1; transform: translateY(-2px); }
.btn-champion { background: linear-gradient(135deg, #ef4444, #b91c1c); border: none; box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4); }
.btn-champion:hover { background: #dc2626; }

.banner-section { margin-top: 60px; }
.banner-card {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.15), rgba(255, 51, 68, 0.12));
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: var(--radius-md);
    padding: 32px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.banner-text h3 { font-size: 1.45rem; font-weight: 800; margin-bottom: 6px; }
.banner-text p { color: var(--text-muted); font-size: 0.95rem; }
.banner-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.btn-discord-cta { background: #5865F2; color: #fff; padding: 12px 24px; font-size: 0.95rem; box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4); }
.btn-discord-cta:hover { background: #4752c4; transform: translateY(-2px); }

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 32px 28px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-card.modal-card-wide { max-width: 620px; padding: 34px 30px; }
.modal-overlay.open .modal-card { transform: translateY(0); }

.btn-close-modal {
    position: absolute;
    top: 18px;
    left: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-dim);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-close-modal:hover { background: rgba(255, 51, 68, 0.2); color: var(--primary); }
.modal-header { text-align: center; margin-bottom: 22px; }

.player-avatar-preview { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 12px; overflow: hidden; border: 2px solid var(--border-color); background: #000; }
.player-avatar-preview img { width: 100%; height: 100%; image-rendering: pixelated; }

.google-logo-wrapper, .rank-icon-preview {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rank-icon-preview.vip-glow {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    font-size: 1.8rem;
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.modal-title { font-size: 1.35rem; font-weight: 800; margin-bottom: 6px; }
.modal-desc { font-size: 0.85rem; color: var(--text-muted); }

.btn-google-sign {
    width: 100%;
    background: #ffffff;
    color: #1f2937;
    border: none;
    border-radius: var(--radius-sm);
    padding: 11px 16px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    margin-bottom: 16px;
}

.btn-google-sign:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.auth-divider { text-align: center; position: relative; margin: 16px 0; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border-color); }
.auth-divider span { position: relative; background: var(--bg-secondary); padding: 0 12px; font-size: 0.8rem; color: var(--text-dim); }

.modal-form { display: flex; flex-direction: column; gap: 15px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; text-align: right; }
.form-group label { font-size: 0.85rem; font-weight: 700; color: #e2e8f0; display: flex; align-items: center; gap: 6px; }

.form-group input, .form-select {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
    font-family: var(--font-ar);
}

.form-select option { background: #131722; color: #fff; }
.form-group input:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 10px var(--primary-glow); }

.password-wrapper { position: relative; display: flex; align-items: center; }
.password-wrapper input { width: 100%; padding-left: 40px; }
.btn-toggle-pwd { position: absolute; left: 10px; background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 1rem; padding: 4px; }
.form-hint { font-size: 0.75rem; color: var(--text-dim); }
.form-security-note { font-size: 0.72rem; color: #10b981; display: flex; align-items: center; gap: 4px; margin-top: 2px; }

.btn-submit-auth {
    background: linear-gradient(135deg, #ff3344, #e61937);
    color: #fff;
    padding: 12px;
    font-size: 1rem;
    margin-top: 6px;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-google-confirm { background: #1a73e8; color: #fff; padding: 12px; font-size: 1rem; box-shadow: 0 4px 15px rgba(26, 115, 232, 0.4); }
.btn-google-confirm:hover { background: #1557b0; transform: translateY(-2px); }

.btn-claim-confirm { background: linear-gradient(135deg, #10b981, #059669); color: #fff; padding: 12px; font-size: 1rem; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4); }
.btn-claim-confirm:hover { background: #047857; transform: translateY(-2px); }

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 2000;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: #10b981; }
.toast.success .toast-icon { color: #10b981; font-size: 1.3rem; }
.toast.error { border-color: #ef4444; }
.toast.error .toast-icon { color: #ef4444; font-size: 1.3rem; }
.toast-content strong { font-size: 0.9rem; display: block; }
.toast-content p { font-size: 0.8rem; color: var(--text-muted); }

.footer { background: #08090e; border-top: 1px solid var(--border-color); padding: 40px 0 20px; margin-top: 60px; }
.footer-container { max-width: 1300px; margin: 0 auto; padding: 0 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; }
.footer-info p { color: var(--text-muted); font-size: 0.9rem; max-width: 420px; margin-top: 10px; }
.owner-tag { color: #ffb703 !important; font-weight: 700; }
.footer-links h4 { font-size: 1rem; margin-bottom: 12px; }
.footer-links a { display: block; color: var(--text-muted); text-decoration: none; font-size: 0.9rem; margin-bottom: 8px; transition: var(--transition); }
.footer-links a:hover { color: #fff; transform: translateX(-4px); }
.footer-bottom { max-width: 1300px; margin: 30px auto 0; padding: 20px 24px 0; border-top: 1px solid rgba(255, 255, 255, 0.05); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.82rem; color: var(--text-dim); }

@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }
@keyframes spin { 100% { transform: rotate(360deg); } }

@media (max-width: 768px) {
    .hero-title { font-size: 2.1rem; }
    .status-grid { grid-template-columns: 1fr; }
    .form-grid-2 { grid-template-columns: 1fr; }
    .ranks-grid { grid-template-columns: 1fr; }
    .nav-menu { display: none; }
    .banner-card { text-align: center; justify-content: center; }
}