/* ============================================================
   SightGaming — layout.css
   هدر، فوتر، ناوبری
   ============================================================ */

/* ════════════════════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════════════════════ */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--header-border);
    transition: var(--transition-slow);
}

.header.scrolled {
    box-shadow: var(--shadow);
}

.header__inner {
    display: flex;
    align-items: center;
    gap: 0;
    height: 68px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Logo ── */
.header__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-left: 32px;
    flex-shrink: 0;
}

@media (max-width: 1100px) {
    .header__logo { margin-left: 16px; }
    .header__nav { gap: 0; }
    .nav-item > a, .nav-item > button { padding: 8px 10px; font-size: 13.5px; }
}

.header__logo-icon {
    width: 38px; height: 38px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--accent-glow);
    flex-shrink: 0;
}

.header__logo-icon svg {
    width: 15px; height: 15px;
    color: #fff;
    stroke: #fff;
}

.header__logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.header__logo-name {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.header__logo-tag {
    font-size: 10px;
    color: var(--accent);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 3px;
    opacity: 0.8;
}

/* ── Nav ── */
.header__nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.nav-item {
    position: relative;
}

.nav-item > a,
.nav-item > button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'Vazir', sans-serif;
    white-space: nowrap;
}

.nav-item > a svg,
.nav-item > button svg {
    width: 15px; height: 15px;
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-item > a:hover,
.nav-item > button:hover,
.nav-item > a.active {
    color: var(--accent);
    background: var(--accent-dim);
}

.nav-item > a.active svg { opacity: 1; }

/* Dropdown */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: var(--transition);
    z-index: 10;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.nav-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-dropdown a svg { width: 15px; height: 15px; opacity: 0.6; }

.nav-dropdown a:hover { background: var(--accent-dim); color: var(--accent); }

.dropdown-arrow {
    width: 12px !important;
    height: 12px !important;
    transition: transform 0.2s;
    margin-right: 2px;
}

.nav-item:hover .dropdown-arrow { transform: rotate(180deg); }

/* ── Header right: actions ── */
.header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
}

/* Server status chip */
.header__status {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    background: var(--accent-dim);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: bold;
    color: var(--accent);
    cursor: default;
}

.header__status .count {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: normal;
}

/* Theme toggle */
.theme-toggle {
    width: 38px; height: 38px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.theme-toggle:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun  { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* Login btn */
.btn-login {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    background: var(--accent);
    color: var(--text-inverted);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: bold;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: var(--accent-glow);
}

.btn-login:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--accent-glow-lg); }
.btn-login svg   { width: 15px; height: 15px; }

/* ── Mobile hamburger ── */
.header__hamburger {
    display: none;
    width: 38px; height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    margin-right: 8px;
}

.header__hamburger svg { width: 20px; height: 20px; }

/* ── Mobile nav drawer ── */
.mobile-nav {
    display: none;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    z-index: 999;
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    gap: 4px;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
}

.mobile-nav.open { display: flex; }

.mobile-nav a,
.mobile-nav-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 15px;
    color: var(--text-secondary);
    transition: var(--transition);
    text-decoration: none;
}

.mobile-nav a svg { width: 18px; height: 18px; opacity: 0.7; }

.mobile-nav a:hover,
.mobile-nav a.active {
    background: var(--accent-dim);
    color: var(--accent);
}

.mobile-nav-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 8px 0;
}

/* ════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════ */
.footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--footer-border);
    position: relative;
    overflow: hidden;
}

/* Big glowing accent line at top */
.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 400px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

/* Ambient glow */
.footer::after {
    content: '';
    position: absolute;
    top: -80px; left: 50%;
    transform: translateX(-50%);
    width: 600px; height: 160px;
    background: radial-gradient(ellipse, rgba(96,213,163,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.footer__top {
    padding: 72px 0 56px;
    position: relative;
    z-index: 1;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 48px;
}

/* Brand col */
.footer__brand {}

.footer__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    text-decoration: none;
}

.footer__logo-icon {
    width: 44px; height: 44px;
    background: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--accent-glow);
    flex-shrink: 0;
}

.footer__logo-icon svg { width: 22px; height: 22px; stroke: #fff; }

.footer__logo-name {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    letter-spacing: 0.5px;
}

.footer__desc {
    font-size: 14px;
    color: rgba(255,255,255,0.45);
    line-height: 1.8;
    margin-bottom: 24px;
    max-width: 280px;
}

/* TS Connect chip */
.footer__ts-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(96,213,163,0.08);
    border: 1px solid rgba(96,213,163,0.2);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 20px;
    max-width: 100%;
    flex-wrap: wrap;
}

.footer__ts-chip-label {
    font-size: 10px;
    color: var(--accent);
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 3px;
}

.footer__ts-chip-addr {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    font-family: monospace;
}

.footer__ts-chip-copy {
    background: rgba(96,213,163,0.15);
    border: 1px solid rgba(96,213,163,0.3);
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-family: 'Vazir', sans-serif;
}

.footer__ts-chip-copy svg { width: 13px; height: 13px; }
.footer__ts-chip-copy:hover { background: var(--accent); color: #000; }

/* Social */
.footer__socials {
    display: flex;
    gap: 10px;
}

.footer__social-btn {
    width: 38px; height: 38px;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    transition: var(--transition);
    text-decoration: none;
}

.footer__social-btn svg { width: 16px; height: 16px; }
.footer__social-btn:hover { background: var(--accent); border-color: var(--accent); color: #000; transform: translateY(-3px); }

/* Link columns */
.footer__col {}
.footer__col-title {
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    margin-bottom: 20px;
}

.footer__col-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer__col-links a {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    color: rgba(255,255,255,0.45);
    transition: var(--transition);
    text-decoration: none;
}

.footer__col-links a svg { width: 14px; height: 14px; opacity: 0.5; transition: var(--transition); }

.footer__col-links a:hover { color: var(--accent); padding-right: 4px; }
.footer__col-links a:hover svg { opacity: 1; color: var(--accent); }

/* Status column */
.footer__server-status {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius);
    padding: 20px;
}

.footer__server-title {
    font-size: 11px;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 16px;
}

.footer__server-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 13px;
}

.footer__server-row:last-child { border-bottom: none; }
.footer__server-row-label { color: rgba(255,255,255,0.35); }
.footer__server-row-val   { font-weight: bold; color: #fff; }

.footer__join-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 16px;
    padding: 11px;
    background: var(--accent);
    color: #000;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--accent-glow);
}

.footer__join-btn:hover { transform: translateY(-2px); box-shadow: var(--accent-glow-lg); }
.footer__join-btn svg   { width: 15px; height: 15px; }

/* Bottom bar */
.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 22px 0;
    position: relative;
    z-index: 1;
}

.footer__bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer__copy {
    font-size: 13px;
    color: rgba(255,255,255,0.25);
}

.footer__bottom-links {
    display: flex;
    gap: 20px;
}

.footer__bottom-links a {
    font-size: 13px;
    color: rgba(255,255,255,0.25);
    text-decoration: none;
    transition: var(--transition);
}

.footer__bottom-links a:hover { color: var(--accent); }

.footer__made {
    font-size: 12px;
    color: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    gap: 5px;
}

.footer__made svg { width: 13px; height: 13px; color: var(--accent); }

/* ════════════════════════════════════════════════════════════
   PAGE WRAPPER
   ════════════════════════════════════════════════════════════ */
.page-wrapper {
    padding-top: 68px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-wrapper main { flex: 1; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — HEADER + FOOTER
   ════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
    .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
    .header__status { display: none; }
}

@media (max-width: 768px) {
    .header__nav    { display: none; }
    .header__hamburger { display: flex; }

    .footer__grid { grid-template-columns: 1fr; gap: 32px; }
    .footer__brand { grid-column: auto; }
    .footer__top   { padding: 48px 0 40px; }

    .footer__bottom-inner { justify-content: center; text-align: center; }
    .footer__made { display: none; }
}

@media (max-width: 600px) {
    .header__inner { height: 60px; padding: 0 16px; }
    .header__logo-icon { width: 34px; height: 34px; }
    .footer__col-links { gap: 10px; }
    .footer__server-status { padding: 16px; }
    .page-wrapper { padding-top: 60px; }
}

@media (max-width: 480px) {
    .header__logo-tag   { display: none; }
    .btn-login span     { display: none; }
    .btn-login          { padding: 8px 12px; }

    .footer__top { padding: 36px 0 28px; }
    .footer__logo-name { font-size: 17px; }
    .footer__desc { font-size: 13px; }
    .footer__bottom-links { gap: 14px; flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 360px) {
    .header__inner { padding: 0 12px; }
    .mobile-nav { padding: 12px; }
}
