/* ═══════════════════════════════════════════════════
   SHADOW THEME — Login Page
   Matches in-game shadow theme: dark, clean, minimal
   v2 — dual marquee + tabbed feature showcase
   ═══════════════════════════════════════════════════ */

:root {
    --sh-bg: #0a0e17;
    --sh-bg-rgb: 10, 14, 23;
    --sh-surface: rgba(15, 20, 35, 0.85);
    --sh-surface-rgb: 15, 20, 35;
    --sh-border: rgba(0, 210, 255, 0.08);
    --sh-border-active: rgba(0, 210, 255, 0.25);
    --sh-accent: #00d2ff;
    --sh-accent-rgb: 0, 210, 255;
    --sh-accent-dim: rgba(0, 210, 255, 0.6);
    --sh-text: #e0e6f0;
    --sh-text-dim: rgba(224, 230, 240, 0.5);
    --sh-text-muted: rgba(224, 230, 240, 0.35);
    --sh-danger: #ff4757;
    --sh-radius: 10px;
    --sh-radius-sm: 6px;
    --sh-radius-lg: 14px;
    --sh-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --sh-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Base ─── */
.sh-login {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: var(--sh-bg);
    color: var(--sh-text);
    font-family: var(--sh-font);
    font-size: 13px;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Static grid — same as in-game body::before */
.sh-login::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(0, 210, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 210, 255, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none;
}

/* Corner glow — same as in-game body::after */
.sh-login::after {
    content: '';
    position: fixed;
    top: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.06) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: rgba(var(--sh-accent-rgb), 0.2) transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(var(--sh-accent-rgb), 0.2); border-radius: 4px; }

/* ─── Alerts ─── */
.sh-alerts-fixed {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 90%;
    max-width: 500px;
}

/* ═══════════════════════════════════════
   HEADER
   ═══════════════════════════════════════ */
.sh-header {
    position: relative;
    z-index: 100;
    background: rgba(var(--sh-bg-rgb), 0.85);
    border-bottom: 1px solid var(--sh-border);
}
.sh-header-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 50px;
    padding: 0 20px;
    gap: 12px;
}

/* Logo */
.sh-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}
.sh-logo img {
    border-radius: var(--sh-radius-sm);
}
.sh-logo-text {
    font-size: 15px;
    font-weight: 800;
    color: var(--sh-text);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Nav */
.sh-nav {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: 20px;
    flex: 1;
}
.sh-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--sh-text-dim);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--sh-radius-sm);
    transition: color var(--sh-transition);
}
.sh-nav-link:hover,
.sh-nav-link.active {
    color: var(--sh-accent);
}

/* Header buttons */
.sh-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.sh-cta-sm {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--sh-text-dim);
    text-decoration: none;
    padding: 5px 12px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--sh-radius-sm);
    transition: all var(--sh-transition);
}
.sh-cta-sm:hover {
    color: var(--sh-text);
    border-color: rgba(255,255,255,0.15);
}
.sh-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--sh-accent);
    color: var(--sh-bg);
    font-weight: 700;
    font-size: 12px;
    padding: 5px 14px;
    border-radius: var(--sh-radius-sm);
    text-decoration: none;
    transition: all var(--sh-transition);
}
.sh-login-btn:hover {
    background: #33ddff;
    color: var(--sh-bg);
}

/* ═══════════════════════════════════════
   MAIN
   ═══════════════════════════════════════ */
.sh-content {
    position: relative;
    z-index: 1;
}
.sh-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── Hero ─── */
.sh-hero {
    text-align: center;
    padding: 48px 0 32px;
}
.sh-hero-title {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 6px;
    margin: 0 0 10px;
    line-height: 1.1;
}
.sh-hero-sub {
    font-size: 14px;
    color: var(--sh-text-dim);
    max-width: 480px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

/* Hero strip — stats + CTA inline */
.sh-hero-strip {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: var(--sh-surface);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    padding: 10px 20px;
}
.sh-stat {
    display: flex;
    align-items: baseline;
    gap: 5px;
    font-size: 12px;
    color: var(--sh-text-dim);
}
.sh-stat strong {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
}
.sh-stat .sh-live {
    color: var(--sh-accent);
}
.sh-stat span {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 10px;
}
.sh-stat-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
}
.sh-btn-join {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 7px 18px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--sh-accent);
    color: var(--sh-bg);
    border-radius: var(--sh-radius-sm);
    text-decoration: none;
    transition: all var(--sh-transition);
}
.sh-btn-join:hover {
    background: #33ddff;
    color: var(--sh-bg);
}

/* ═══════════════════════════════════════
   FEATURE MARQUEE — dual-direction scroll
   ═══════════════════════════════════════ */
.sh-marquee-section {
    position: relative;
    z-index: 1;
    padding: 8px 0;
    overflow: hidden;
    border-top: 1px solid var(--sh-border);
    border-bottom: 1px solid var(--sh-border);
    background: rgba(var(--sh-surface-rgb), 0.4);
    margin-bottom: 24px;
}

.sh-marquee {
    overflow: hidden;
    position: relative;
    width: 100%;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.sh-marquee + .sh-marquee {
    margin-top: 6px;
}

.sh-marquee-track {
    display: flex;
    gap: 6px;
    width: max-content;
    will-change: transform;
}

.sh-marquee-left {
    animation: marquee-scroll-left 45s linear infinite;
}

.sh-marquee-right {
    animation: marquee-scroll-right 50s linear infinite;
}

@keyframes marquee-scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes marquee-scroll-right {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* Pause on hover */
.sh-marquee:hover .sh-marquee-track {
    animation-play-state: paused;
}

/* Individual marquee item */
.sh-mq-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(var(--sh-accent-rgb), 0.04);
    border: 1px solid rgba(var(--sh-accent-rgb), 0.08);
    border-radius: 20px;
    white-space: nowrap;
    transition: all var(--sh-transition);
    flex-shrink: 0;
}

.sh-mq-item:hover {
    background: rgba(var(--sh-accent-rgb), 0.1);
    border-color: rgba(var(--sh-accent-rgb), 0.2);
}

.sh-mq-item iconify-icon {
    color: var(--sh-accent);
    font-size: 16px;
    opacity: 0.8;
}

.sh-mq-item span {
    font-size: 11px;
    font-weight: 600;
    color: var(--sh-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ─── Two Column Grid ─── */
.sh-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

/* ─── Card ─── */
.sh-card {
    background: var(--sh-surface);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius-lg);
    overflow: hidden;
}
.sh-card-tabs {
    display: flex;
    border-bottom: 1px solid var(--sh-border);
}
.sh-tab {
    flex: 1;
    display: block;
    text-align: center;
    padding: 11px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--sh-text-dim);
    text-decoration: none;
    transition: color var(--sh-transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.sh-tab:hover { color: var(--sh-text); }
.sh-tab.active {
    color: var(--sh-accent);
    border-bottom-color: var(--sh-accent);
}
.sh-card-body {
    padding: 20px;
}

/* Round notice */
.sh-round-notice {
    background: rgba(var(--sh-accent-rgb), 0.05);
    border: 1px solid rgba(var(--sh-accent-rgb), 0.15);
    border-radius: var(--sh-radius);
    padding: 10px 14px;
    margin-bottom: 14px;
    text-align: center;
    font-size: 13px;
    color: var(--sh-accent);
}

/* Form inputs */
.sh-form-content .form-control,
.sh-form-content input[type="text"],
.sh-form-content input[type="email"],
.sh-form-content input[type="password"] {
    width: 100%;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--sh-radius-sm);
    color: #fff;
    font-family: var(--sh-font);
    font-size: 13px;
    transition: border-color var(--sh-transition);
    outline: none;
}
.sh-form-content input:hover,
.sh-form-content .form-control:hover {
    border-color: rgba(255, 255, 255, 0.12);
}
.sh-form-content input:focus,
.sh-form-content .form-control:focus {
    border-color: var(--sh-accent);
    box-shadow: 0 0 0 2px rgba(var(--sh-accent-rgb), 0.08);
    background: rgba(var(--sh-accent-rgb), 0.02);
}
.sh-form-content input::placeholder,
.sh-form-content .form-control::placeholder {
    color: var(--sh-text-muted);
    font-size: 12px;
}

/* Submit button */
.sh-form-content .btn-warning,
.sh-form-content .btn-primary,
.sh-form-content button[type="submit"],
.sh-form-content input[type="submit"] {
    display: block;
    width: 100%;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: var(--sh-radius-sm);
    cursor: pointer;
    transition: all var(--sh-transition);
    color: var(--sh-bg);
    background: var(--sh-accent);
}
.sh-form-content .btn-warning:hover,
.sh-form-content .btn-primary:hover,
.sh-form-content button[type="submit"]:hover,
.sh-form-content input[type="submit"]:hover {
    background: #33ddff;
}
.sh-form-content a {
    color: var(--sh-accent-dim);
    text-decoration: none;
    font-size: 12px;
}
.sh-form-content a:hover {
    color: var(--sh-accent);
    text-decoration: underline;
}
.sh-card .alert {
    font-size: 12px;
    padding: 8px 12px;
    border-radius: var(--sh-radius-sm);
    margin-bottom: 10px;
}

/* ─── Section Title ─── */
.sh-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--sh-text-dim);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--sh-border);
}

/* ═══════════════════════════════════════
   TABBED FEATURE SHOWCASE
   ═══════════════════════════════════════ */
.sh-features-col {
    display: flex;
    flex-direction: column;
}

/* Feature tabs */
.sh-feat-tabs {
    list-style: none;
    margin: 0 0 2px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sh-feat-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--sh-text-dim);
    background: transparent;
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius-sm);
    cursor: pointer;
    transition: all var(--sh-transition);
}

.sh-feat-tab:hover {
    color: var(--sh-text);
    border-color: rgba(var(--sh-accent-rgb), 0.2);
    background: rgba(var(--sh-accent-rgb), 0.03);
}

.sh-feat-tab.active {
    color: var(--sh-accent);
    border-color: rgba(var(--sh-accent-rgb), 0.3);
    background: rgba(var(--sh-accent-rgb), 0.06);
}

.sh-feat-tab iconify-icon {
    opacity: 0.7;
}

.sh-feat-tab.active iconify-icon {
    opacity: 1;
    color: var(--sh-accent);
}

/* Feature panels */
.sh-feat-panels {
    flex: 1;
}

.sh-feat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

/* Feature card */
.sh-feat-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(var(--sh-surface-rgb), 0.6);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius-sm);
    transition: all var(--sh-transition);
}

.sh-feat-card:hover {
    background: rgba(var(--sh-accent-rgb), 0.04);
    border-color: rgba(var(--sh-accent-rgb), 0.15);
}

.sh-feat-card iconify-icon {
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--sh-accent);
    opacity: 0.65;
    transition: opacity var(--sh-transition);
}

.sh-feat-card:hover iconify-icon {
    opacity: 1;
}

.sh-feat-card div {
    min-width: 0;
}

.sh-feat-card strong {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--sh-text);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sh-feat-card span {
    display: block;
    font-size: 10px;
    color: var(--sh-text-muted);
    line-height: 1.3;
    margin-top: 1px;
}

/* ─── Footer ─── */
.sh-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    margin-top: 16px;
    border-top: 1px solid var(--sh-border);
    font-size: 11px;
    color: var(--sh-text-muted);
}
.sh-footer-links {
    display: flex;
    gap: 10px;
    align-items: center;
}
.sh-footer-links a {
    color: var(--sh-text-dim);
    text-decoration: none;
    font-size: 11px;
}
.sh-footer-links a:hover { color: var(--sh-accent); }

/* ─── Mobile Bottom Nav ─── */
.sh-mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(var(--sh-bg-rgb), 0.92);
    border-top: 1px solid var(--sh-border);
    display: flex;
    justify-content: space-around;
    padding: 6px 0;
    padding-bottom: env(safe-area-inset-bottom, 6px);
}
.sh-mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 14px;
    color: var(--sh-text-dim);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    transition: color var(--sh-transition);
}
.sh-mobile-nav-item:hover,
.sh-mobile-nav-item.active {
    color: var(--sh-accent);
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
    .sh-grid {
        grid-template-columns: 1fr;
    }
    .sh-hero {
        padding: 32px 0 24px;
    }
    .sh-hero-title {
        letter-spacing: 3px;
    }
    .sh-hero-strip {
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px 16px;
        gap: 10px;
    }
    .sh-btn-join {
        margin-left: 0;
        width: 100%;
        justify-content: center;
        margin-top: 4px;
    }
    .sh-header-inner {
        height: 46px;
    }
    .sh-logo-text {
        font-size: 13px;
        letter-spacing: 1.5px;
    }
    body.sh-login {
        padding-bottom: 60px;
    }
    .sh-feat-grid {
        grid-template-columns: 1fr;
    }
    .sh-feat-tabs {
        gap: 3px;
    }
    .sh-feat-tab {
        padding: 5px 8px;
        font-size: 10px;
    }
    .sh-mq-item {
        padding: 5px 10px;
    }
    .sh-mq-item span {
        font-size: 10px;
    }
}

@media (max-width: 576px) {
    .sh-hero {
        padding: 24px 0 18px;
    }
    .sh-hero-sub {
        font-size: 13px;
    }
    .sh-hero-strip {
        gap: 8px;
        padding: 8px 12px;
    }
    .sh-stat strong {
        font-size: 16px;
    }
    .sh-footer {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
    .sh-card-body {
        padding: 16px;
    }
    .sh-marquee-section {
        padding: 6px 0;
    }
}

/* ─── Tab transition polish ─── */
.sh-feat-panels .tab-pane {
    transition: opacity 0.2s ease;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .sh-marquee-left,
    .sh-marquee-right {
        animation: none;
    }
    .sh-feat-panels .tab-pane {
        transition: none;
    }
}

/* ═══ LEADERBOARDS ═══ */
.sh-leaderboards {
    padding: 0 12px;
}
.sh-leaderboards h3 {
    text-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
}
.sh-lb-card {
    background: linear-gradient(165deg, rgba(0, 20, 40, 0.7) 0%, rgba(0, 0, 0, 0.5) 100%);
    border: 1px solid rgba(0, 245, 255, 0.12);
    border-radius: 12px;
    padding: 14px 12px 10px;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.sh-lb-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.4), transparent);
}
.sh-lb-card:hover {
    border-color: rgba(0, 245, 255, 0.25);
    box-shadow: 0 4px 20px rgba(0, 245, 255, 0.08), inset 0 0 30px rgba(0, 245, 255, 0.02);
}
.sh-lb-header {
    color: #00f5ff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
    padding-bottom: 7px;
    border-bottom: 1px solid rgba(0, 245, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 0 8px rgba(0, 245, 255, 0.2);
}
.sh-lb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: lb;
}
.sh-lb-list li {
    counter-increment: lb;
    display: flex;
    align-items: center;
    padding: 4px 4px;
    font-size: 0.72rem;
    color: #c8d6e5;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    border-radius: 4px;
    transition: background 0.2s ease;
}
.sh-lb-list li:hover {
    background: rgba(0, 245, 255, 0.04);
}
.sh-lb-list li:last-child { border-bottom: none; }
.sh-lb-list li:first-child .sh-lb-name {
    color: #ffd700;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.15);
}
.sh-lb-list li:nth-child(2) .sh-lb-name {
    color: #c0c0c0;
}
.sh-lb-list li:nth-child(3) .sh-lb-name {
    color: #cd7f32;
}
.sh-lb-list li::before {
    content: counter(lb);
    color: #0d1117;
    font-weight: 800;
    font-size: 0.55rem;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    margin-right: 6px;
    border-radius: 50%;
    background: rgba(0, 245, 255, 0.2);
    flex-shrink: 0;
}
.sh-lb-list li:first-child::before {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #1a1a1a;
}
.sh-lb-list li:nth-child(2)::before {
    background: linear-gradient(135deg, #c0c0c0, #808080);
    color: #1a1a1a;
}
.sh-lb-list li:nth-child(3)::before {
    background: linear-gradient(135deg, #cd7f32, #8b4513);
    color: #1a1a1a;
}
.sh-lb-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #e6edf3;
    font-weight: 600;
    font-size: 0.73rem;
}
.sh-lb-val {
    color: #58d68d;
    font-size: 0.62rem;
    margin-left: 6px;
    white-space: nowrap;
    font-weight: 500;
    opacity: 0.85;
}
@media (max-width: 576px) {
    .sh-lb-card { padding: 10px 8px 6px; }
    .sh-lb-list li { font-size: 0.68rem; padding: 3px 2px; }
    .sh-lb-name { font-size: 0.68rem; }
    .sh-lb-val { font-size: 0.58rem; }
}
