/* ═══════════════════════════════════════════════
   Valorant Dashboard — Nordic Glassmorphism v3
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700;900&display=swap');

:root {
    /* Nordic dark palette */
    --bg:          #070A10;
    --bg-2:        #0B0F18;
    --bg-3:        #0F1520;

    /* Glass surfaces */
    --glass:       rgba(255,255,255,0.04);
    --glass-hover: rgba(255,255,255,0.07);
    --glass-active:rgba(255,255,255,0.09);
    --glass-border:rgba(255,255,255,0.08);
    --glass-border-accent: rgba(255,69,85,0.4);

    /* Accents */
    --accent:      #FF4655;
    --accent-2:    #FF6B78;
    --accent-glow: rgba(255,70,85,0.25);
    --accent-dim:  rgba(255,70,85,0.12);

    /* Nordic frost */
    --frost:       rgba(120,180,255,0.06);
    --frost-border:rgba(120,180,255,0.15);

    /* Status */
    --green:       #30D980;
    --green-dim:   rgba(48,217,128,0.12);
    --green-glow:  rgba(48,217,128,0.3);
    --red:         #FF4655;
    --red-dim:     rgba(255,70,85,0.12);
    --gold:        #F5C842;
    --gold-dim:    rgba(245,200,66,0.15);
    --purple:      #8B5CF6;
    --night:       #1A1040;

    /* Text */
    --text:        #F0ECE8;
    --text-2:      #7A8A95;
    --text-3:      #4A5A65;
    --text-muted:  #2E3E4A;

    /* Rarity */
    --tier-select:    #5A9FE2;
    --tier-deluxe:    #00BFA5;
    --tier-premium:   #D946A8;
    --tier-ultra:     #F5C842;
    --tier-exclusive: #FF8C42;

    /* Layout */
    --radius:      10px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --transition:  0.22s cubic-bezier(0.4,0,0.2,1);
    --font:        'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ─── Reset ───────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    /* Subtle animated grid background */
    background-image:
        radial-gradient(ellipse at 15% 30%, rgba(255,70,85,0.07) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 70%, rgba(120,180,255,0.05) 0%, transparent 45%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
    background-attachment: fixed;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-2); }

/* ─── Scrollbar ───────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ─── Buttons ─────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition);
}
.btn:hover::after { opacity: 1; }

.btn-primary {
    background: linear-gradient(135deg, #FF4655 0%, #C8192A 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(255,70,85,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(255,70,85,0.45), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary,
.btn-small {
    background: var(--glass);
    color: var(--text);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
}
.btn-secondary:hover,
.btn-small:hover { background: var(--glass-hover); border-color: rgba(255,255,255,0.15); }
.btn-small { padding: 7px 16px; font-size: 13px; }
.btn-full { width: 100%; }

.btn-danger {
    background: linear-gradient(135deg, #C8192A 0%, #8B0000 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 20px rgba(200,25,42,0.3);
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(200,25,42,0.4); }

.select {
    padding: 7px 14px;
    background: var(--glass);
    color: var(--text);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 13px;
    cursor: pointer;
    backdrop-filter: blur(12px);
    outline: none;
    transition: border-color var(--transition);
}
.select:hover, .select:focus { border-color: rgba(255,255,255,0.2); }

.input {
    width: 100%;
    padding: 13px 16px;
    background: rgba(255,255,255,0.03);
    color: var(--text);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.input:focus {
    border-color: var(--accent);
    background: rgba(255,70,85,0.05);
    box-shadow: 0 0 0 3px rgba(255,70,85,0.12);
}
.input::placeholder { color: var(--text-3); }

/* ─── Spinner ─────────────────────────────────── */
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255,255,255,0.06);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 70px 20px;
    color: var(--text-2);
    font-size: 14px;
}

/* ─── Error ───────────────────────────────────── */
.error-msg {
    margin-top: 14px;
    padding: 11px 16px;
    background: var(--red-dim);
    border: 1px solid rgba(255,70,85,0.25);
    border-radius: var(--radius);
    color: #ff8a94;
    font-size: 13px;
    text-align: center;
}

/* ═══════════════════════════════════════════════
   登入畫面
   ═══════════════════════════════════════════════ */

.login-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.login-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 40%, rgba(255,70,85,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 60%, rgba(120,180,255,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(80,0,120,0.12) 0%, transparent 50%),
        var(--bg);
    animation: bgShift 12s ease infinite alternate;
}
@keyframes bgShift {
    from { opacity: 1; }
    to   { opacity: 0.85; }
}

.login-card {
    position: relative;
    width: 440px;
    max-width: 92vw;
    padding: 48px 40px;
    background: linear-gradient(160deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.03) 100%);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.1);
    border-top-color: rgba(255,255,255,0.18);
    border-radius: var(--radius-xl);
    box-shadow:
        0 32px 80px rgba(0,0,0,0.7),
        0 0 0 1px rgba(255,255,255,0.04) inset,
        0 1px 0 rgba(255,255,255,0.1) inset;
    animation: cardIn 0.6s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Login logo */
.login-logo-img {
    display: block;
    margin: 0 auto 10px;
    height: 64px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 20px rgba(255,70,85,0.5));
    animation: logoPulse 3s ease infinite alternate;
}
@keyframes logoPulse {
    from { filter: drop-shadow(0 4px 16px rgba(255,70,85,0.4)); }
    to   { filter: drop-shadow(0 4px 28px rgba(255,70,85,0.7)); }
}

.login-subtitle {
    text-align: center;
    color: var(--text-2);
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 36px;
}

.login-guide {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 4px;
}
.login-guide-step {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-2);
    font-size: 14px;
    text-align: left;
}
.step-num {
    min-width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--accent) 0%, #C8192A 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(255,70,85,0.4);
}

.login-mfa-hint {
    text-align: center;
    color: var(--text-2);
    font-size: 14px;
    margin-bottom: 16px;
}

.input-center { text-align: center; letter-spacing: 6px; font-size: 22px; font-weight: 700; }

.login-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    color: var(--text-2);
    font-size: 13px;
}
.login-loading .spinner { width: 20px; height: 20px; border-width: 2px; }

/* ═══════════════════════════════════════════════
   頂部導航
   ═══════════════════════════════════════════════ */

.top-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 28px;
    height: 60px;
    background: rgba(7,10,16,0.75);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 1px 0 rgba(255,70,85,0.08), 0 8px 32px rgba(0,0,0,0.4);
}

.nav-brand {
    display: flex;
    align-items: center;
    margin-right: 4px;
}
.nav-logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(255,70,85,0.4));
    transition: filter var(--transition);
}
.nav-logo-img:hover { filter: drop-shadow(0 2px 16px rgba(255,70,85,0.7)); }

.nav-tabs {
    display: flex;
    gap: 2px;
    flex: 1;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--text-2);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all var(--transition);
    position: relative;
}
.nav-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: transform var(--transition);
}
.nav-tab:hover { color: var(--text); background: var(--glass); }
.nav-tab.active {
    color: #fff;
    background: var(--accent-dim);
}
.nav-tab.active::after { transform: translateX(-50%) scaleX(1); }
.nav-tab svg { opacity: 0.6; transition: opacity var(--transition); }
.nav-tab:hover svg, .nav-tab.active svg { opacity: 1; }

.btn-logout {
    display: flex;
    align-items: center;
    padding: 9px;
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    border-radius: var(--radius);
    transition: all var(--transition);
}
.btn-logout:hover { color: var(--red); background: var(--red-dim); transform: scale(1.05); }

/* ═══════════════════════════════════════════════
   內容區
   ═══════════════════════════════════════════════ */

.content {
    max-width: 1120px;
    margin: 0 auto;
    padding: 32px 28px;
    min-height: calc(100vh - 60px - 120px);
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: tabSlide 0.35s cubic-bezier(0.4,0,0.2,1); }

@keyframes tabSlide {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 12px;
}
.header-actions { display: flex; gap: 8px; align-items: center; }

/* ─── Glass card base ─────────────────────────── */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

/* ═══════════════════════════════════════════════
   商店
   ═══════════════════════════════════════════════ */

.store-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 12px;
}

.store-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.balance-bar { display: flex; gap: 10px; align-items: center; }

.balance-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    backdrop-filter: blur(16px);
    transition: all var(--transition);
}
.balance-item:hover { border-color: rgba(255,255,255,0.15); background: var(--glass-hover); }

.currency-icon { width: 18px; height: 18px; object-fit: contain; }

.balance-amount { font-size: 15px; font-weight: 700; }

.store-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 22px;
    font-size: 13px;
    color: var(--text-3);
    letter-spacing: 0.3px;
}

.bundle-timer {
    font-size: 12px;
    color: var(--text-3);
    padding: 4px 12px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

.night-market-icon { font-size: 18px; }

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
    gap: 18px;
}

/* ─── Skin Card ───────────────────────────────── */
.skin-card {
    position: relative;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
    cursor: default;
}
.skin-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.05) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}
.skin-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(255,255,255,0.15);
    box-shadow:
        0 20px 60px rgba(0,0,0,0.5),
        0 0 0 1px rgba(255,255,255,0.06) inset;
}
.skin-card:hover::before { opacity: 1; }

.skin-card-top {
    position: relative;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    overflow: hidden;
}
/* Rarity glow top strip */
.skin-card-top::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 0;
}

/* Rarity colors */
.skin-card[data-tier="Select"]    .skin-card-top::after { background: var(--tier-select); box-shadow: 0 0 12px var(--tier-select); }
.skin-card[data-tier="Deluxe"]    .skin-card-top::after { background: var(--tier-deluxe); box-shadow: 0 0 12px var(--tier-deluxe); }
.skin-card[data-tier="Premium"]   .skin-card-top::after { background: var(--tier-premium); box-shadow: 0 0 12px var(--tier-premium); }
.skin-card[data-tier="Ultra"]     .skin-card-top::after { background: var(--tier-ultra); box-shadow: 0 0 12px var(--tier-ultra); }
.skin-card[data-tier="Exclusive"] .skin-card-top::after { background: var(--tier-exclusive); box-shadow: 0 0 12px var(--tier-exclusive); }

.skin-card[data-tier="Select"]    { border-color: rgba(90,159,226,0.2); }
.skin-card[data-tier="Deluxe"]    { border-color: rgba(0,191,165,0.2); }
.skin-card[data-tier="Premium"]   { border-color: rgba(217,70,168,0.2); }
.skin-card[data-tier="Ultra"]     { border-color: rgba(245,200,66,0.2); }
.skin-card[data-tier="Exclusive"] { border-color: rgba(255,140,66,0.2); }

.skin-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.5));
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.skin-card:hover .skin-image { transform: scale(1.06); }

.skin-tier-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    object-fit: contain;
    filter: drop-shadow(0 1px 4px rgba(0,0,0,0.6));
}

.skin-card-info {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.skin-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.skin-price {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    color: var(--gold);
}
.skin-price .currency-icon { width: 14px; height: 14px; }

/* Night market specific */
.night-market-card { border-color: rgba(138,43,226,0.25); }
.night-market-card .skin-card-top { background: linear-gradient(135deg, rgba(60,0,100,0.3) 0%, rgba(20,0,40,0.2) 100%); }

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    background: linear-gradient(135deg, #7B2FBE 0%, #9B59B6 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(123,47,190,0.5);
    letter-spacing: 0.3px;
}

.nm-original {
    text-decoration: line-through;
    color: var(--text-3);
    font-weight: 500;
    font-size: 12px;
}
.nm-discounted {
    color: var(--gold);
    font-weight: 700;
}

/* ═══════════════════════════════════════════════
   戰績
   ═══════════════════════════════════════════════ */

.history-summary {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.summary-card {
    padding: 16px 24px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    text-align: center;
    flex: 1;
    min-width: 80px;
    transition: all var(--transition);
}
.summary-card:hover { background: var(--glass-hover); transform: translateY(-2px); }
.summary-card .value { font-size: 24px; font-weight: 700; }
.summary-card .label { font-size: 11px; color: var(--text-2); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.5px; }

.match-list { display: flex; flex-direction: column; gap: 10px; }

.match-entry {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}
.match-entry:hover { border-color: rgba(255,255,255,0.12); box-shadow: 0 8px 32px rgba(0,0,0,0.3); }

.match-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    cursor: pointer;
    user-select: none;
    transition: background var(--transition);
}
.match-header:hover { background: rgba(255,255,255,0.02); }

.match-result-bar {
    width: 4px;
    height: 44px;
    border-radius: 4px;
    flex-shrink: 0;
}
.match-result-bar.win { background: var(--green); box-shadow: 0 0 12px var(--green-glow); }
.match-result-bar.loss { background: var(--red); box-shadow: 0 0 12px var(--accent-glow); }

.match-agent-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.match-main { flex: 1; min-width: 0; }
.match-title { font-size: 14px; font-weight: 600; }
.match-title .score { margin: 0 6px; }
.match-title .win { color: var(--green); }
.match-title .loss { color: var(--red); }
.match-sub { font-size: 12px; color: var(--text-2); margin-top: 3px; }

.match-stats {
    display: flex;
    gap: 18px;
    align-items: center;
    font-size: 13px;
    color: var(--text-2);
    flex-shrink: 0;
}
.match-stats .kda { font-weight: 700; color: var(--text); font-size: 14px; }

.match-expand {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    transition: transform var(--transition);
    flex-shrink: 0;
}
.match-entry.open .match-expand { transform: rotate(180deg); }

.match-detail {
    display: none;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 18px;
    background: rgba(0,0,0,0.2);
}
.match-entry.open .match-detail { display: block; }

/* 個人數據卡 */
.my-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.stat-item {
    padding: 12px 14px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    text-align: center;
    transition: all var(--transition);
}
.stat-item:hover { background: var(--glass-hover); }
.stat-item .stat-value { font-size: 19px; font-weight: 700; }
.stat-item .stat-label { font-size: 11px; color: var(--text-2); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; }

/* 射擊準度 */
.accuracy-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0 4px;
    background: rgba(255,255,255,0.04);
}
.accuracy-bar .head { background: var(--accent); }
.accuracy-bar .body { background: var(--gold); }
.accuracy-bar .legs { background: var(--green); }

.accuracy-legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-2); margin-bottom: 16px; }
.accuracy-legend span::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}
.accuracy-legend .leg-head::before { background: var(--accent); }
.accuracy-legend .leg-body::before { background: var(--gold); }
.accuracy-legend .leg-legs::before { background: var(--green); }

/* 隊伍表格 */
.team-section { margin-top: 16px; }
.team-label {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.team-label.ally { color: var(--green); border-color: var(--green); }
.team-label.enemy { color: var(--red); border-color: var(--red); }

.team-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: fixed;
}
.team-table th {
    text-align: left;
    padding: 7px 9px;
    color: var(--text-3);
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.team-table td { padding: 9px; vertical-align: middle; }

.team-table th:nth-child(1),
.team-table td:nth-child(1) { width: 42%; }
.team-table th:nth-child(2),
.team-table td:nth-child(2) { width: 14%; text-align: center; }
.team-table th:nth-child(3),
.team-table td:nth-child(3) { width: 18%; }
.team-table th:nth-child(4),
.team-table td:nth-child(4) { width: 13%; text-align: center; }
.team-table th:nth-child(5),
.team-table td:nth-child(5) { width: 13%; text-align: center; }

.team-table tr.is-me td { background: var(--accent-dim); }
.team-table tr:not(:last-child) td { border-bottom: 1px solid rgba(255,255,255,0.04); }
.team-table tbody tr { transition: background var(--transition); }
.team-table tbody tr:hover td { background: rgba(255,255,255,0.03); }
.team-table tbody tr.is-me:hover td { background: rgba(255,70,85,0.15); }

.player-cell { display: flex; align-items: center; gap: 9px; }
.player-agent-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.rank-icon-small {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.player-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}
.rank-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.rank-text-small {
    font-size: 10px;
    color: var(--text-3);
    white-space: nowrap;
    text-align: center;
    display: block;
}

/* ═══════════════════════════════════════════════
   個人資料
   ═══════════════════════════════════════════════ */

.profile-hero-banner {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 22px;
    min-height: 200px;
    background-color: var(--bg-3);
    background-size: cover;
    background-position: center;
    border: 1px solid var(--glass-border);
    box-shadow: 0 16px 60px rgba(0,0,0,0.5);
}

.profile-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        rgba(7,10,16,0.92) 0%,
        rgba(7,10,16,0.7) 50%,
        rgba(7,10,16,0.25) 100%
    );
}

.profile-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 36px 36px;
}

.profile-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-2);
    margin-top: 6px;
}
.profile-meta-sep { color: var(--text-3); }

/* Quick Stats */
.profile-quick-stats {
    display: flex;
    gap: 1px;
    margin-bottom: 22px;
    background: rgba(255,255,255,0.04);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}
.quick-stat {
    flex: 1;
    text-align: center;
    padding: 18px 8px;
    background: var(--glass);
    backdrop-filter: blur(16px);
    transition: all var(--transition);
}
.quick-stat:hover { background: var(--glass-hover); }
.quick-stat:first-child { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.quick-stat:last-child  { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.quick-stat-value { font-size: 22px; font-weight: 700; }
.quick-stat-label { font-size: 10px; color: var(--text-2); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.8px; }

.profile-rank-icon {
    width: 88px;
    height: 88px;
    object-fit: contain;
    filter: drop-shadow(0 4px 24px rgba(0,0,0,0.6));
    flex-shrink: 0;
}

.profile-info { flex: 1; min-width: 0; }
.profile-name { font-size: 26px; font-weight: 700; margin-bottom: 5px; text-shadow: 0 2px 12px rgba(0,0,0,0.5); }
.profile-rank-text { font-size: 16px; font-weight: 600; color: var(--accent); }
.profile-rr  { font-size: 13px; color: var(--text-2); }
.profile-level { font-size: 13px; color: var(--text-2); }

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
}

.profile-card {
    padding: 22px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}
.profile-card:hover { border-color: rgba(255,255,255,0.12); box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.profile-card h3 {
    font-size: 11px;
    color: var(--text-2);
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.profile-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
}
.profile-stat-row:not(:last-child) { border-bottom: 1px solid rgba(255,255,255,0.04); }
.profile-stat-row .label { color: var(--text-2); font-size: 14px; }
.profile-stat-row .value { font-weight: 700; font-size: 16px; }

/* ─── Multi-kill badges ──────────────────────── */
.mk-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0 14px;
}
.mk-badge {
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.mk-badge.mk-2 { background: rgba(48,217,128,0.15); color: var(--green); border: 1px solid rgba(48,217,128,0.3); }
.mk-badge.mk-3 { background: rgba(245,200,66,0.15); color: var(--gold); border: 1px solid rgba(245,200,66,0.3); }
.mk-badge.mk-4 { background: rgba(255,70,85,0.15); color: var(--accent); border: 1px solid rgba(255,70,85,0.3); }
.mk-badge.mk-5 { background: rgba(139,92,246,0.2); color: #A78BFA; border: 1px solid rgba(139,92,246,0.4); }

/* ─── Round timeline ─────────────────────────── */
.round-timeline {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.round-timeline-header {
    margin-bottom: 10px;
}
.round-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
}
.round-btn {
    min-width: 36px;
    height: 32px;
    padding: 0 8px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    display: flex;
    align-items: center;
    gap: 3px;
    transition: all var(--transition);
}
.round-btn:hover { background: var(--glass-hover); color: var(--text); }
.round-btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.round-num { font-size: 11px; }
.round-icon { font-size: 11px; }

.round-kills-container {
    max-height: 260px;
    overflow-y: auto;
}
.round-kills {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.kill-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: var(--radius);
    font-size: 13px;
}
.kill-row.ally  { background: rgba(48,217,128,0.06); border-left: 2px solid var(--green); }
.kill-row.enemy { background: rgba(255,70,85,0.06); border-left: 2px solid var(--red); }
.kill-time {
    font-size: 11px;
    color: var(--text-3);
    min-width: 32px;
    font-family: monospace;
}
.kill-agent {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.kill-name {
    font-weight: 500;
    color: var(--text);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.kill-name.victim { color: var(--text-2); }
.kill-arrow { color: var(--text-3); font-size: 11px; flex-shrink: 0; }

/* ─── Profile extras ─────────────────────────── */

.form-dots {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
.form-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    cursor: default;
}
.form-dot.win  { background: var(--green); box-shadow: 0 0 6px var(--green-glow); }
.form-dot.loss { background: var(--red);   box-shadow: 0 0 6px var(--accent-glow); }

/* ACS chart */
.acs-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 80px;
    padding-top: 8px;
}
.acs-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    gap: 2px;
    cursor: default;
}
.acs-bar {
    width: 100%;
    min-height: 4px;
    border-radius: 3px 3px 0 0;
    transition: opacity var(--transition);
}
.acs-bar.win  { background: var(--green); }
.acs-bar.loss { background: var(--red); opacity: 0.7; }
.acs-bar-wrap:hover .acs-bar { opacity: 1; }
.acs-bar-val {
    font-size: 9px;
    color: var(--text-3);
    white-space: nowrap;
}

/* Agent stats */
.agent-stats-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}
.agent-stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius);
    transition: background var(--transition);
}
.agent-stat-row:hover { background: rgba(255,255,255,0.06); }
.agent-stat-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.agent-stat-name {
    font-size: 14px;
    font-weight: 600;
    flex: 1;
    min-width: 60px;
}
.agent-stat-val {
    font-size: 12px;
    color: var(--text-2);
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════
   追蹤
   ═══════════════════════════════════════════════ */

.tracker-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    font-size: 14px;
    color: var(--text-2);
    padding: 12px 18px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    width: fit-content;
    backdrop-filter: blur(16px);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-3);
    flex-shrink: 0;
}
.tracker-status.online .status-dot {
    background: var(--green);
    box-shadow: 0 0 12px var(--green-glow);
    animation: pulse 2s ease infinite;
}
.tracker-status.offline .status-dot { background: var(--text-3); }

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.25); opacity: 0.7; }
}

.tracker-match {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 22px;
}

.tracker-match-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    font-size: 16px;
    font-weight: 600;
}

.tracker-teams {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.tracker-team h4 {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.tracker-team.ally h4 { color: var(--green); border-color: var(--green); }
.tracker-team.enemy h4 { color: var(--red); border-color: var(--red); }

.tracker-player {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius);
    transition: background var(--transition);
}
.tracker-player:hover { background: var(--glass-hover); }
.tracker-player.is-me { background: var(--accent-dim); border: 1px solid rgba(255,70,85,0.2); }

.tracker-player .rank-icon-small { width: 28px; height: 28px; }
.tracker-player .agent-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(255,255,255,0.1);
}
.tracker-player .player-info { flex: 1; min-width: 0; }
.tracker-player .player-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: none;
}
.tracker-player .player-rank { font-size: 12px; color: var(--text-2); }
.tracker-player .player-winrate { font-size: 12px; color: var(--text-3); white-space: nowrap; }

.tracker-no-match {
    text-align: center;
    padding: 50px 40px;
    color: var(--text-2);
}
.tracker-no-match svg { display: block; margin: 0 auto 16px; opacity: 0.2; }
.tracker-no-match p { font-size: 15px; }
.tracker-no-match p + p { font-size: 13px; margin-top: 6px; color: var(--text-3); }

/* ═══════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════ */

.site-footer {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 30px 28px;
    margin-top: 48px;
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
}
.footer-inner { max-width: 1120px; margin: 0 auto; text-align: center; }
.footer-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 13px;
}
.footer-links a { color: var(--text-2); transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-sep { color: var(--text-3); }
.footer-disclaimer { font-size: 11px; color: var(--text-3); line-height: 1.7; max-width: 620px; margin: 0 auto 8px; }
.footer-copy { font-size: 11px; color: var(--text-muted); }

/* ═══════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════ */

@media (max-width: 768px) {
    .top-nav { padding: 0 16px; height: 56px; }
    .nav-tab span { display: none; }
    .nav-tab { padding: 8px 12px; }
    .nav-logo-img { height: 32px; }

    .content { padding: 18px 16px; }

    .store-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

    .profile-hero-content { flex-direction: column; text-align: center; padding: 28px 20px; }
    .profile-quick-stats { flex-wrap: wrap; }
    .quick-stat { min-width: calc(25% - 1px); }
    .quick-stat:first-child, .quick-stat:last-child { border-radius: 0; }
    .profile-grid { grid-template-columns: 1fr; }

    .tracker-teams { grid-template-columns: 1fr; }
    .match-stats { display: none; }
    .store-header { flex-direction: column; align-items: flex-start; }
    .team-table { table-layout: auto; }
    .team-table th:nth-child(1),
    .team-table td:nth-child(1) { width: auto; }
}

@media (max-width: 480px) {
    .store-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .skin-name { font-size: 12px; }
    .login-card { padding: 32px 22px; }
    .profile-hero-content { padding: 20px 16px; }
}
