:root {
    --primary-color: #3498db; /* Blue */
    --secondary-color: #87CEEB; /* Light Blue */
    --highlight-color: #f59e0b; /* Amber (for highlighted plots) */
    --white-color: #ffffff;
    --text-color: #333;
    --light-text-color: #555;
    --bg-color: #f4f7f6;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    --font-family: 'Poppins', sans-serif;
    /* Footer panel behavior:
       - Collapsed: copyright only
       - Expanded: copyright + menu (when scrolled to bottom)
    */
    --footer-collapsed-space: 88px;
    --footer-expanded-space: 160px;
    --header-height: 0px;
}

/* --- Base & Animations --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
}

body {
    font-family: var(--font-family);
    line-height: 1.7;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Disable text selection across the site (allow in form fields). */
html, body {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body * {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

input, textarea, [contenteditable="true"] {
    -webkit-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Always reserve space for the fully expanded footer so content is never covered. */
    padding-bottom: var(--footer-expanded-space);
}

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

main {
    animation: fadeIn 0.5s ease-out;
}

.page-shell main {
    flex: 1 0 auto;
    min-height: calc(100vh - var(--footer-collapsed-space) - var(--header-height));
    min-height: calc(100dvh - var(--footer-collapsed-space) - var(--header-height));
}

/* --- Header & Navigation --- */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

header h1 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.8rem;
}

.site-logo-link {
    color: inherit;
    text-decoration: none;
    display: inline-block;
}

.site-logo-letter {
    display: inline-block;
    transform-origin: 50% 60%;
}

.site-logo-link:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 4px;
    border-radius: 10px;
}

@keyframes sakuraFlash {
    0% {
        color: var(--primary-color);
    }
    35% {
        color: #f8cdda;
    }
    100% {
        color: var(--primary-color);
    }
}

.site-logo-link.is-logo-animate {
    animation: sakuraFlash 600ms ease-out;
}

@keyframes logoSpinOnce {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.site-logo-link.is-logo-animate .site-logo-letter {
    animation: logoSpinOnce 600ms ease-out;
    animation-delay: calc(var(--i, 0) * 0.1s);
}

header nav ul {
    list-style: none;
    display: flex;
}

.header-menu-button {
    display: none;
    border: 1px solid #e9ecef;
    background: rgba(255, 255, 255, 0.85);
    color: var(--light-text-color);
    font-family: var(--font-family);
    font-weight: 600;
    padding: 0.55rem 0.9rem;
    border-radius: 12px;
    cursor: pointer;
}

.header-menu-button:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 3px;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
}

body.mobile-menu-open {
    overflow: hidden;
}

body.mobile-menu-open .mobile-menu-overlay {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-panel {
    height: 100%;
    width: 100%;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.mobile-menu-title {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.mobile-menu-close {
    border: 1px solid #e9ecef;
    background: rgba(255, 255, 255, 0.85);
    color: var(--light-text-color);
    font-family: var(--font-family);
    font-weight: 600;
    padding: 0.55rem 0.9rem;
    border-radius: 12px;
    cursor: pointer;
}

.mobile-menu-close:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 3px;
}

.mobile-menu-nav {
    margin-top: 1.25rem;
    display: grid;
    gap: 0.75rem;
}

.mobile-menu-nav a {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.4rem;
    padding: 1rem 1rem;
    border-radius: 15px;
    background: var(--white-color);
    box-shadow: var(--card-shadow);
}

.mobile-menu-nav a:hover {
    color: var(--primary-color);
}

@media (max-width: 720px) {
    header nav {
        display: none;
    }

    .header-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    header {
        padding: 1rem 1rem;
    }

    header h1 {
        font-size: 1.5rem;
    }
}

header nav li {
    margin-left: 25px;
}

header nav a {
    text-decoration: none;
    color: var(--light-text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}

header nav a:hover {
    color: var(--primary-color);
}

header nav a.active {
    color: var(--primary-color);
}

header nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}


/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
    text-align: center;
    padding: 6rem 1rem;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero h2 {
    font-size: 3rem;
    font-weight: 700;
    animation: fadeIn 1s ease-out 0.2s both;
}

.hero p {
    font-size: 1.3rem;
    font-weight: 300;
    animation: fadeIn 1s ease-out 0.5s both;
}

/* --- Content Sections (Card Layout) --- */
.page-section {
    padding: 4rem 1rem;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem;
    background: var(--white-color);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
}

.page-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.about-content, .discord-presence {
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
}

.service-action-link {
    margin-top: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 520px;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    font-family: var(--font-family);
    font-weight: 600;
    background: var(--primary-color);
    color: var(--white-color);
    box-shadow: var(--card-shadow);
    text-decoration: none;
    transition: transform 160ms ease, opacity 160ms ease;
}

.service-action-link:hover {
    transform: translateY(-2px);
}

.service-action-link:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 3px;
}

/* --- VALORANT --- */
.valorant-token-status {
    margin-top: 1.25rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    align-items: center;
    font-size: 1rem;
    color: var(--light-text-color);
}


.valorant-token-label {
    font-weight: 600;
    color: var(--text-color);
}

.valorant-token-state {
    font-weight: 600;
}

.valorant-actions {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

.valorant-action-button {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    font-family: var(--font-family);
    font-weight: 600;
    cursor: pointer;
    background: var(--primary-color);
    color: var(--white-color);
    box-shadow: var(--card-shadow);
    transition: transform 160ms ease, opacity 160ms ease;
}

.valorant-action-button:hover {
    transform: translateY(-2px);
}

.valorant-action-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.valorant-action-secondary {
    background: var(--secondary-color);
}

.valorant-note {
    margin-top: 1.75rem;
}

.valorant-token-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.valorant-token-overlay[hidden] {
    display: none;
}

.valorant-token-panel {
    width: min(720px, 100%);
    background: var(--white-color);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    padding: 1.25rem;
}

.valorant-token-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.valorant-token-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

.valorant-token-close {
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: transparent;
    color: var(--light-text-color);
    font-family: var(--font-family);
    font-weight: 600;
    padding: 0.55rem 0.85rem;
    border-radius: 12px;
    cursor: pointer;
}

.valorant-token-help {
    margin-top: 0.75rem;
    color: var(--light-text-color);
    font-size: 0.95rem;
    line-height: 1.7;
}

.valorant-token-field {
    margin-top: 1rem;
    display: grid;
    gap: 0.4rem;
}

.valorant-token-field label {
    font-weight: 600;
    color: var(--text-color);
}

.valorant-token-field input {
    width: 100%;
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: var(--white-color);
    color: var(--text-color);
    font-family: var(--font-family);
}

.valorant-token-field input:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

.valorant-token-actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.valorant-token-primary,
.valorant-token-danger {
    border: 0;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-family: var(--font-family);
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--card-shadow);
    transition: transform 160ms ease, opacity 160ms ease;
}

.valorant-token-primary {
    background: var(--primary-color);
    color: var(--white-color);
}

.valorant-token-danger {
    background: var(--secondary-color);
    color: var(--white-color);
}

.valorant-token-primary:hover,
.valorant-token-danger:hover {
    transform: translateY(-2px);
}

.valorant-token-message {
    margin-top: 0.85rem;
    color: var(--light-text-color);
    font-size: 0.95rem;
}



/* --- News --- */
.news-list {
    margin-top: 1.5rem;
}

.news-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-item {
    border-top: 1px solid #e9ecef;
}

.news-item:last-child {
    border-bottom: 1px solid #e9ecef;
}

.news-item-button {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    padding: 1rem 0.5rem;
    cursor: pointer;
}

.news-item-button:hover .news-item-title {
    color: var(--primary-color);
}

.news-item-meta {
    display: flex;
    gap: 1rem;
    align-items: baseline;
}

.news-item-date {
    min-width: 6.5rem;
    color: var(--light-text-color);
    font-weight: 500;
}

.news-item-title {
    color: var(--text-color);
    font-weight: 600;
}

.news-detail {
    margin-top: 1.5rem;
}

.news-detail-actions {
    margin-bottom: 1rem;
}

.news-back-link {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
}

.news-loading, .news-error {
    text-align: center;
    color: var(--light-text-color);
}

/* --- Language Switcher (Floating Button) --- */
.lang-switcher {
    position: fixed;
    left: 20px;
    bottom: calc(20px + var(--footer-collapsed-space));
    z-index: 1000;
}

.lang-fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 0;
    background: var(--primary-color);
    color: var(--white-color);
    font-family: var(--font-family);
    font-weight: 700;
    letter-spacing: 0.03em;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-fab:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 3px;
}

/* --- Language Picker (Full Screen) --- */
.lang-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 1600;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
    display: flex;
    align-items: flex-end;
    padding: 1.25rem;
}

body.lang-picker-open {
    overflow: hidden;
}

body.lang-picker-open .lang-picker-overlay {
    opacity: 1;
    pointer-events: auto;
}

.lang-picker-panel {
    width: min(640px, 100%);
    margin: 0 auto;
    background: var(--white-color);
    border: 1px solid #e9ecef;
    border-radius: 18px;
    box-shadow: var(--card-shadow);
    padding: 1.1rem;
    transform: translateY(16px);
    opacity: 0;
    transition: transform 180ms ease, opacity 180ms ease;
}

body.lang-picker-open .lang-picker-panel {
    transform: translateY(0);
    opacity: 1;
}

.lang-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.9rem;
}

.lang-picker-title {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.lang-picker-close {
    border: 1px solid #e9ecef;
    background: rgba(255, 255, 255, 0.85);
    color: var(--light-text-color);
    font-family: var(--font-family);
    font-weight: 600;
    padding: 0.55rem 0.9rem;
    border-radius: 12px;
    cursor: pointer;
}

.lang-picker-close:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 3px;
}

.lang-picker-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 720px) {
    .lang-picker-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.lang-picker-item {
    width: 100%;
    border: 1px solid #e9ecef;
    background: var(--bg-color);
    border-radius: 15px;
    padding: 1rem 0.95rem;
    cursor: pointer;
    font-family: var(--font-family);
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.05rem;
    text-align: center;
}

.lang-picker-item:hover {
    background: var(--white-color);
    color: var(--primary-color);
}

.lang-picker-item[aria-current="true"] {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--white-color);
}

.lang-menu {
    position: absolute;
    left: 0;
    bottom: calc(52px + 10px);
    background: var(--white-color);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 8px;
    min-width: 160px;
}

.lang-menu-item {
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-family);
    color: var(--text-color);
    font-weight: 500;
}

.lang-menu-item:hover {
    background: var(--bg-color);
}

.lang-menu-item[aria-current="true"] {
    color: var(--primary-color);
}

/* --- Premium --- */
.premium-rate-box {
    margin: 1.5rem auto 1.5rem auto;
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    background: var(--bg-color);
    text-align: center;
}

.premium-rate-title {
    margin: 0 0 0.5rem 0;
    color: var(--light-text-color);
    font-weight: 600;
}

.premium-coin-rate {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
}

.premium-rate-note {
    margin: 0.5rem 0 0 0;
    color: var(--light-text-color);
    font-size: 0.95rem;
}

.premium-intro {
    text-align: center;
    color: var(--light-text-color);
    font-size: 1.05rem;
    margin: 0 0 1.5rem 0;
}

.premium-promo {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: -1rem 0 1.5rem 0;
    padding: 0.5rem;
    background-color: #e6f7ff;
    border-radius: 8px;
}


/* Use more screen width on the Premium page (reduce horizontal scrolling). */
.premium-container {
    max-width: 1200px;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0 1rem;
}

.premium-tiers.premium-tiers-mobile {
    display: none;
}

.premium-tier-lines {
    margin: 0;
    padding: 0;
    list-style: none;
}

.premium-tier-lines li {
    padding: 0.9rem 0;
    border-top: 1px solid #e9ecef;
    color: var(--light-text-color);
    text-align: center;
}

.premium-tier-lines li:first-child {
    border-top: 0;
}

@media (max-width: 980px) {
    .premium-container {
        padding: 0;
    }

    .premium-compare-wrap {
        display: none;
    }

    .premium-tiers.premium-tiers-mobile {
        display: grid;
        gap: 1rem;
        margin-top: 1rem;
    }
}

.premium-compare-wrap {
    overflow-x: auto;
}

.premium-compare {
    width: 100%;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--white-color);
}

.premium-compare th,
.premium-compare td {
    padding: 0.9rem 0.9rem;
    border-top: 1px solid #e9ecef;
    border-left: 1px solid #e9ecef;
    vertical-align: middle;
}

.premium-compare thead th {
    border-top: 0;
}

.premium-compare tr > *:first-child {
    border-left: 0;
}

.premium-compare-feature-col {
    text-align: left;
    min-width: 200px;
    background: var(--bg-color);
    color: var(--text-color);
    font-weight: 700;
}

.premium-compare-plan-col {
    min-width: 150px;
    text-align: center;
}

.premium-plan-head {
    display: grid;
    gap: 0.25rem;
    justify-items: center;
}

.premium-plan-name {
    font-weight: 800;
    color: var(--text-color);
}

.premium-plan-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--primary-color);
    color: var(--white-color);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.premium-plan-badge-muted {
    background: #e9ecef;
    color: var(--light-text-color);
}

.premium-plan-price {
    font-weight: 700;
    color: var(--primary-color);
}

html[lang="ja"] .premium-plan-price,
html[lang="ja"] .premium-tier-price {
    white-space: pre-line;
}

.premium-compare-feature {
    text-align: left;
    background: var(--bg-color);
    color: var(--light-text-color);
    font-weight: 600;
}

.premium-compare-cell {
    text-align: center;
}

.compare-icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    line-height: 1;
}

.compare-icon.yes {
    background: var(--primary-color);
    color: var(--white-color);
}

.compare-icon.yes::before {
    content: '✓';
}

.compare-icon.no {
    background: #e9ecef;
    color: var(--light-text-color);
}

.compare-icon.no::before {
    content: '×';
}

.premium-compare-featured {
    border-left-color: var(--primary-color) !important;
    border-right: 1px solid var(--primary-color);
    background: var(--bg-color);
}

.premium-tiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.premium-tier {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: var(--white-color);
    padding: 1.25rem;
}

.premium-tier-featured {
    border-color: var(--primary-color);
}

.premium-tier-name {
    margin: 0 0 0.5rem 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-color);
}

.premium-tier-price {
    margin: 0 0 1rem 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-color);
}

.premium-tier-level {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: -0.25rem 0 1rem 0;
}

.premium-tier-level span {
    height: 8px;
    border-radius: 999px;
    background: #e9ecef;
}

.premium-tier-level.level-1 span:nth-child(-n+1),
.premium-tier-level.level-2 span:nth-child(-n+2),
.premium-tier-level.level-3 span:nth-child(-n+3),
.premium-tier-level.level-4 span:nth-child(-n+4) {
    background: var(--primary-color);
}

.premium-tier-features {
    margin: 0;
    padding: 0;
    color: var(--light-text-color);
    list-style: none;
}

.premium-tier-features li {
    margin: 0.4rem 0;
    position: relative;
    padding-left: 1.4rem;
}

.premium-tier-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color);
    font-weight: 700;
}

/* Unified Discord Community Card Styling */
.discord-community-card {
    max-width: 600px;
    margin: 2rem auto 0 auto;
    background: var(--white-color);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.community-card-banner {
    padding: 15px 20px;
    min-height: 79px; /* Reserve space: 48px avatar + 15*2 padding + 1px border */
    border-bottom: 1px solid #e9ecef;
    background-color: #fdfdfd;
}

#member-banner-content {
    display: flex;
    align-items: center;
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
}

#member-banner-content.fading {
    opacity: 0;
}

#member-banner-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 15px;
    background-color: var(--bg-color);
}

#member-banner-info #member-banner-name {
    margin: 0 0 4px 0;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
}

#member-banner-info #member-banner-type {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 6px;
    visibility: hidden; /* Hide badge until populated */
}

#member-banner-info #member-banner-type.visible {
    visibility: visible;
}

#member-banner-type.suzuka-member {
    background-color: var(--primary-color);
    color: var(--white-color);
}

#member-banner-info #member-banner-type.suzuka-user {
    background-color: #e9ecef;
    color: var(--light-text-color);
}

#member-banner-info #member-banner-type.server-booster {
    background: linear-gradient(135deg, #f8cdda, #a684e3);
    color: white;
    font-weight: 600;
}

/* --- New Animation Keyframes --- */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-100%); opacity: 0; }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* --- Animation Classes --- */
.community-card-banner {
    position: relative;
    overflow: hidden;
}

#member-banner-content.slide-in {
    animation: slideIn 0.5s forwards ease-out;
}

#member-banner-content.slide-out {
    animation: slideOut 0.5s forwards ease-in;
}

.is-booster::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        100deg,
        rgba(255, 255, 255, 0) 20%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 80%
    );
    animation: shimmer 1.5s ease-out;
    animation-delay: 0.5s;
}



/* --- Body of the Community Card --- */
.discord-card-header {
    display: flex;
    align-items: center;
    padding: 25px;
}

.discord-card-icon-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 20px;
    background-color: var(--bg-color);
    border: 1px solid #e9ecef;
}

.discord-card-info h3 {
    margin: 0 0 8px 0;
    color: var(--text-color);
    font-size: 1.6rem;
    font-weight: 600;
}

#discord-server-description {
    font-size: 1rem;
    color: var(--light-text-color);
    line-height: 1.6;
}

.discord-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
}

.discord-card-footer .discord-presence {
    margin: 0;
    display: flex;
    align-items: center;
    color: var(--light-text-color);
    font-size: 1rem;
}

.online-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #2ecc71;
    border-radius: 50%;
    margin-right: 10px;
}

.discord-join-button {
    background-color: #5865F2;
    color: var(--white-color);
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(88, 101, 242, 0.2);
}

.discord-join-button:hover {
    background-color: #4f5bda;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(88, 101, 242, 0.3);
}





/* --- Footer --- */
footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    text-align: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #999;
    font-size: 0.9rem;
    margin-top: auto;
    padding-bottom: 1.25rem;
    overflow: hidden;
    max-height: var(--footer-collapsed-space);
    transition: max-height 220ms ease;
}

footer p {
    margin: 0;
}

.footer-menu {
    margin: 0.5rem auto 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem 1.25rem;
    max-width: 520px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: max-height 220ms ease, opacity 180ms ease, transform 220ms ease;
}

.footer-menu-link {
    display: block;
    text-decoration: none;
    color: #999;
    font-weight: 500;
    padding: 0.25rem 0;
}

.footer-menu-link:hover {
    color: var(--primary-color);
}

body.footer-expanded footer {
    max-height: var(--footer-expanded-space);
}

body.footer-expanded .footer-menu {
    max-height: 120px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* --- Loader Styles --- */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: opacity 0.5s ease;
}

#loader {
    border: 6px solid #f3f3f3;
    border-top: 6px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.notice-box {
    display: flex;
    align-items: flex-start;
    padding: 1em;
    margin-bottom: 1em;
    border-radius: 8px;
    border: 1px solid;
}

.notice-box-warning {
    background-color: #fff5f5;
    border-color: #e53e3e;
    color: #c53030;
}

.notice-box-icon {
    flex-shrink: 0;
    margin-right: 0.75em;
    font-size: 1.25em;
    line-height: 1.2;
}

.notice-box-content {
    flex-grow: 1;
}

/* --- Match History --- */
.valorant-match-filter {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-color);
    border: 1px solid #e9ecef;
    border-radius: 12px;
}

.valorant-match-summary {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--white-color);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    color: var(--light-text-color);
    font-size: 0.95rem;
    box-shadow: var(--card-shadow);
}

.valorant-match-summary strong {
    color: var(--text-color);
}

.valorant-match-summary-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0.5rem;
}

.valorant-match-summary-title {
    font-weight: 800;
    color: var(--text-color);
}

.valorant-match-summary-sub {
    font-size: 0.85rem;
    color: var(--light-text-color);
}

.valorant-match-summary-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: center;
}

.valorant-metric {
    display: inline-flex;
    gap: 0.35rem;
    align-items: baseline;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    border: 1px solid #e9ecef;
    background: var(--bg-color);
}

.valorant-metric-key {
    font-weight: 800;
    color: var(--text-color);
    font-size: 0.85rem;
}

.valorant-metric-value {
    font-weight: 800;
    color: var(--text-color);
}

.valorant-metric-muted {
    color: var(--light-text-color);
    font-size: 0.85rem;
}

.valorant-filter-label {
    font-weight: 700;
    color: var(--text-color);
    font-size: 0.9rem;
}

.valorant-filter-select {
    appearance: auto;
    font-family: var(--font-family);
    font-size: 0.9rem;
    color: var(--text-color);
    background: var(--white-color);
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 0.4rem 0.75rem;
}

.valorant-filter-select:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.match-history-container {
    margin-top: 2rem;
    display: grid;
    gap: 1.5rem;
}

.match-card {
    background: var(--bg-color);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem;
    /* Keep outside minimap labels from widening the page (no horizontal scroll). */
    overflow-x: clip;
}

@supports not (overflow: clip) {
    .match-card {
        overflow-x: hidden;
    }
}

.match-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: center;
    padding-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--light-text-color);
    cursor: pointer;
    position: relative;
    padding-left: 1.5rem; /* Space for indicator */
}

.match-meta-left {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
}

.match-detail-button {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 0.35rem 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.85rem;
    line-height: 1.2;
    cursor: pointer;
}

.match-detail-button:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.match-card:not(.collapsed) .match-meta {
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 0.75rem;
}

.match-map {
    font-weight: 700;
    color: var(--text-color);
}

.match-score {
    font-weight: 700;
}

.match-teams {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 600px) {
    .match-teams {
        grid-template-columns: 1fr 1fr;
    }
}

.team-red h4, .team-blue h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 700;
}

.team-red h4 {
    color: #e53e3e;
}

.team-blue h4 {
    color: #3b82f6;
}

.player-row {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.25rem 0;
    font-size: 0.95rem;
}

/* Party highlighting (same party_id) */
.player-row.party-member {
    border-left: 4px solid var(--highlight-color);
    padding-left: 0.5rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.65);
}

.player-row.party-color-1 { border-left-color: var(--highlight-color); }
.player-row.party-color-2 { border-left-color: var(--primary-color); }
.player-row.party-color-3 { border-left-color: var(--secondary-color); }
.player-row.party-color-4 { border-left-color: var(--highlight-color); }
.player-row.party-color-5 { border-left-color: var(--primary-color); }
.player-row.party-color-6 { border-left-color: var(--secondary-color); }

.player-agent {
    display: flex;
    justify-content: center;
    align-items: center;
}

.player-agent-icon {
    width: 24px;
    height: 24px;
}

.player-name {
    color: var(--light-text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.player-link {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
}

.player-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.player-link:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
    border-radius: 6px;
}

.player-row.party-member .player-name::before {
    content: attr(data-party-label);
    display: inline-block;
    margin-right: 0.4rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: var(--highlight-color);
    color: var(--white-color);
    font-weight: 700;
    font-size: 0.75rem;
    line-height: 1.2;
    vertical-align: middle;
}

.player-kda {
    font-weight: 600;
}

.error {
    color: #e53e3e;
    font-weight: 600;
    text-align: center;
}

/* --- Collapsible Match History --- */

.match-meta::before {
    content: '▼';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
    transition: transform 0.2s ease;
}

.match-card.collapsed .match-meta::before {
    transform: translateY(-50%) rotate(-90deg);
}

.match-card.collapsed .match-teams {

    display: none;

}



.valorant-puuid-status {

    margin-top: 0.5rem;

}



.match-meta {

    flex-wrap: wrap;

    gap: 0.75rem 1rem;

}



.match-result, .match-rr {

    font-weight: 700;

}

.match-result {
    color: var(--text-color);
}



.match-win {

    color: #3b82f6; /* Blue */

}

/* --- Match Detail page: use full width (no card frame) --- */
#valorant-detail-result .container {
    max-width: none;
    padding: 1.25rem 1rem;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

#valorant-detail-result .match-card {
    background: transparent;
    border: none;
    padding: 0;
}

#valorant-detail-result .match-meta {
    padding-left: 0;
}

#valorant-detail-result .match-meta::before {
    content: none;
}

#valorant-detail-result .match-card:not(.collapsed) .match-meta {
    border-bottom: none;
    margin-bottom: 0.5rem;
}

/* --- Match Detail: per-player grid (1 row = 1 player) --- */
#valorant-detail-result .match-player-grid-scroll {
    margin-top: 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
}

#valorant-detail-result .match-player-grid {
    min-width: 900px;
}

#valorant-detail-result .player-grid-header {
    display: grid;
    grid-template-columns: 84px minmax(180px, 1fr) repeat(9, 56px);
    gap: 0.5rem;
    align-items: center;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-color);
    border-bottom: 1px solid #e9ecef;
}

#valorant-detail-result .player-grid-th {
    white-space: nowrap;
}

#valorant-detail-result .player-grid-th:nth-child(n + 3) {
    text-align: center;
}

#valorant-detail-result .player-grid-th-btn {
    appearance: none;
    border: none;
    background: transparent;
    font: inherit;
    color: inherit;
    padding: 0.15rem 0.25rem;
    border-radius: 10px;
    cursor: pointer;
}

#valorant-detail-result .player-grid-th-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

#valorant-detail-result .player-grid-th-btn:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

#valorant-detail-result .player-grid-th-btn.is-sorted::after {
    content: '▾';
    display: inline-block;
    margin-left: 0.25rem;
    font-size: 0.85em;
    opacity: 0.85;
}

#valorant-detail-result .player-grid-th-btn.is-sorted[data-sort-dir="asc"]::after {
    content: '▴';
}

#valorant-detail-result .player-row.player-grid-row {
    display: grid;
    grid-template-columns: 84px minmax(180px, 1fr) repeat(9, 56px);
    gap: 0.5rem;
    align-items: center;
    padding: 0.45rem 0.75rem;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(233, 236, 239, 0.75);
}

#valorant-detail-result .player-row.player-grid-row:last-child {
    border-bottom: none;
}

#valorant-detail-result .player-row.player-grid-row .player-stat {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

#valorant-detail-result .player-row.player-grid-row .player-name {
    color: var(--text-color);
}

#valorant-detail-result .player-row.team-red .player-name-team {
    color: #e53e3e;
}

#valorant-detail-result .player-row.team-blue .player-name-team {
    color: #3b82f6;
}

#valorant-detail-result .player-tag {
    color: var(--light-text-color);
    font-weight: 700;
}

/* --- Match Detail (single match page) --- */
.match-detail-grid {
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem 1rem;
    font-size: 0.9rem;
    color: var(--light-text-color);
}

@media (min-width: 600px) {
    .match-detail-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.match-detail-row {
    display: flex;
    gap: 0.5rem;
    min-width: 0;
}

.match-detail-key {
    flex: 0 0 auto;
    font-weight: 700;
    color: var(--text-color);
}

.match-detail-value {
    flex: 1 1 auto;
    word-break: break-word;
}

.match-detail-divider {
    margin: 1rem 0;
    border-top: 1px solid #e9ecef;
}

.match-detail-h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-color);
}

/* --- Round details --- */
.rounds-panel {
    display: grid;
    gap: 0.75rem;
}

.round-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.round-tab {
    padding: 0.35rem 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    background: var(--bg-color);
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.9rem;
}

.round-tab.match-win,
.round-tab.match-loss {
    /* Override base .round-tab { color: var(--text-color); } so currentColor becomes team color */
    color: inherit;
    background: currentColor;
    border-color: currentColor;
}

/* Ensure team color wins over .round-tab's color rule (same element). */
.round-tab.match-win { color: #3b82f6; }
.round-tab.match-loss { color: #e53e3e; }

.round-tab-text {
    color: inherit;
}

.round-tab.match-win .round-tab-text,
.round-tab.match-loss .round-tab-text {
    color: var(--white-color);
}

.round-tab.is-active {
    font-weight: inherit;
}

.round-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 780px) {
    .round-body {
        grid-template-columns: 710px minmax(0, 1fr);
        align-items: start;
    }
}

/* If the Log column would become too narrow (< ~300px), stack it below the map. */
@media (max-width: 1050px) {
    .round-body {
        grid-template-columns: 1fr;
    }

    /* When stacked, place tabs between map and log: Map -> Tabs -> Log */
    .rounds-panel:not([data-disable-map]) {
        grid-template-areas:
            "map"
            "tabs"
            "log";
    }

    .rounds-panel:not([data-disable-map]) .round-body {
        display: contents;
    }

    .rounds-panel:not([data-disable-map]) .round-left {
        grid-area: map;
    }

    .rounds-panel:not([data-disable-map]) .round-tabs {
        grid-area: tabs;
    }

    .rounds-panel:not([data-disable-map]) .round-right {
        grid-area: log;
    }
}

.round-section {
    margin-bottom: 0.75rem;
}

.round-section-title {
    font-weight: 800;
    color: var(--text-color);
    margin: 0.25rem 0 0.5rem 0;
}

.round-summary-title {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: baseline;
}

.round-summary-round {
    font-weight: 900;
    color: var(--text-color);
}

.round-summary-winner {
    font-weight: 800;
}

.round-summary-sub {
    margin-top: 0.25rem;
    color: var(--light-text-color);
}

.round-map {
    position: relative;
    --killer-outline-color: var(--highlight-color);
    --actor-highlight-color: var(--highlight-color);
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
    border: none;
    border-radius: 12px;
    background: transparent;
    overflow: visible;
    z-index: 2;
}

.round-map-canvas {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 160px;
    border-radius: 12px;
    overflow: hidden;
}

.round-map-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.round-map-overlay {
    position: absolute;
    inset: 0;
}

/* Map outside labels (leader lines + labels outside minimap) */
.round-map-outside {
    position: absolute;
    /* Allow labels to render outside the minimap image, but prevent page widening via .match-card overflow-x. */
    --outside-pad: clamp(24px, 6vw, 60px);
    inset: calc(-1 * var(--outside-pad));
    pointer-events: none;
    z-index: 3;
}

.round-map-outside-svg {
    position: absolute;
    inset: var(--outside-pad);
    overflow: visible;
    color: inherit;
}

.round-map-outside-labels {
    position: absolute;
    inset: var(--outside-pad);
}

.map-outside-line {
    opacity: 0.75;
}

.map-outside-label {
    position: absolute;
    transform: translate(-50%, -50%);
    font-size: 12px;
    line-height: 1.2;
    padding: 2px 6px;
    border-radius: 9999px;
    background: currentColor;
    white-space: nowrap;
    max-width: min(260px, calc(100vw - 64px));
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Team colors for outside labels (background uses currentColor). */
.map-outside-label.match-win { --team-color: #3b82f6; color: var(--team-color); }
.map-outside-label.match-loss { --team-color: #e53e3e; color: var(--team-color); }

.map-outside-label-text {
    color: var(--white-color);
}

.map-outside-label.is-killer {
    font-weight: 900;
    border: 2px solid var(--killer-outline-color);
}

.map-outside-label.is-victim {
    text-decoration: line-through;
    opacity: 0.85;
}

.map-outside-left { transform: translate(-100%, -50%); margin-left: -10px; }
.map-outside-right { transform: translate(0%, -50%); margin-left: 10px; }
.map-outside-top { transform: translate(-50%, -100%); margin-top: -10px; }
.map-outside-bottom { transform: translate(-50%, 0%); margin-top: 10px; }

.map-player-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
}

/* Team color token for map markers (used for outline/tip even when actor highlight is yellow). */
.map-player-marker.match-win { --team-color: #3b82f6; }
.map-player-marker.match-loss { --team-color: #e53e3e; }

/* Highlight actors (killer / planter / defuser) in yellow; keep victim styling separate. */
.map-player-marker.is-actor:not(.is-victim) {
    color: var(--actor-highlight-color);
}

.map-player-marker-arrow {
    position: absolute;
    left: 0;
    top: 0;
    width: 14px;
    height: 14px;
    background: currentColor;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    transform: translate(-50%, -50%) rotate(var(--marker-rot, 0deg));
    transform-origin: 50% 50%;
    opacity: 0.95;
}

/* Dead player marker (X) */
.map-player-marker-x {
    position: absolute;
    left: 0;
    top: 0;
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%);
    opacity: 0.95;
}

.map-player-marker-x::before,
.map-player-marker-x::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 2.4px;
    background: currentColor;
    transform-origin: 50% 50%;
}

.map-player-marker-x::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.map-player-marker-x::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Darker tip to make facing direction clearer */
.map-player-marker-arrow::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--team-color, currentColor);
    /* Only the tip area */
    clip-path: polygon(50% 0%, 28% 46%, 72% 46%);
    filter: brightness(0.7);
    opacity: 1;
}

/* Killer highlight (outline) */
.map-player-marker.is-killer .map-player-marker-arrow {
    z-index: 1;
}

/* Killer outline should indicate team color. */
.map-player-marker.is-killer {
    --killer-outline-color: var(--team-color, var(--actor-highlight-color));
}

.map-player-marker.is-killer .map-player-marker-arrow::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: var(--killer-outline-color);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    z-index: -1;
}

.map-player-marker-arrow::before {
    content: none;
}

.map-player-marker-label {
    position: absolute;
    left: 0;
    top: 0;
    transform: translate(16px, -50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.map-player-marker-line {
    width: 34px;
    height: 3px;
    background: currentColor;
    opacity: 0.85;
}

.map-player-marker-text {
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--bg-color);
    border-radius: 999px;
    background: currentColor;
    color: var(--white-color);
    font-weight: 700;
    font-size: 0.82rem;
    line-height: 1.2;
}

.map-player-marker.is-killer .map-player-marker-text {
    font-weight: 900;
}

.map-player-marker.is-victim .map-player-marker-text {
    text-decoration: line-through;
}

@keyframes suzuka-actor-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.25; }
}

.map-player-marker.is-actor .map-player-marker-arrow {
    animation: suzuka-actor-blink 1s steps(2, end) infinite;
}

.map-player-marker.is-actor .map-player-marker-x {
    animation: suzuka-actor-blink 1s steps(2, end) infinite;
}

.map-outside-label.is-actor {
    animation: suzuka-actor-blink 1s steps(2, end) infinite;
}

.map-outside-label.is-actor:not(.is-victim) {
    color: var(--team-color, currentColor);
}

.round-map-empty {
    padding: 1rem;
    color: var(--light-text-color);
    text-align: center;
}

.map-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
    color: var(--text-color);
    border: 1px solid var(--bg-color);
}

.map-marker.is-out-of-bounds {
    opacity: 0.25;
}

.map-marker.is-player {
    opacity: 0.7;
}

.map-marker.is-kill {
    width: 10px;
    height: 10px;
    opacity: 0.95;
}

.map-marker.is-plant {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    opacity: 0.95;
}

.map-marker.is-focus {
    width: 16px;
    height: 16px;
    background: transparent;
    border: 2px solid currentColor;
    box-shadow: 0 0 0 2px var(--bg-color);
    opacity: 1;
    z-index: 5;
}

.round-log {
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
    max-height: 420px;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

/* Prefer showing map outside name labels even if they overlap into the log column. */
.round-body > :first-child {
    position: relative;
    z-index: 2;
}

.round-body > :nth-child(2) {
    position: relative;
    z-index: 1;
}

.round-log-list {
    display: grid;
    gap: 0;
}

.round-log-item {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 0.75rem;
    align-items: baseline;
}

/* Light team-tinted backgrounds for key log events (kill / plant / defuse). */
.round-log-item.match-win { --log-team-color: #3b82f6; }
.round-log-item.match-loss { --log-team-color: #e53e3e; }

.round-log-item.is-kill.match-win,
.round-log-item.is-plant.match-win,
.round-log-item.is-defuse.match-win,
.round-log-item.is-kill.match-loss,
.round-log-item.is-plant.match-loss,
.round-log-item.is-defuse.match-loss {
    border-radius: 10px;
    background: color-mix(in srgb, var(--log-team-color) 10%, transparent);
}

@supports not (background: color-mix(in srgb, red 10%, transparent)) {
    .round-log-item.is-kill.match-win,
    .round-log-item.is-plant.match-win,
    .round-log-item.is-defuse.match-win { background: rgba(59, 130, 246, 0.10); }

    .round-log-item.is-kill.match-loss,
    .round-log-item.is-plant.match-loss,
    .round-log-item.is-defuse.match-loss { background: rgba(229, 62, 62, 0.10); }
}

.round-log-item.has-location {
    cursor: pointer;
    padding: 0 0.5rem;
    border-radius: 10px;
}

.round-log-item.has-location:hover {
    outline: 1px solid #e9ecef;
    outline-offset: -1px;
}

.round-log-item.is-active {
    outline: 1px solid #e9ecef;
    outline-offset: -1px;
    background: var(--white-color);
}

/* Active selection: make team-tinted rows noticeably stronger. */
.round-log-item.is-active.match-win,
.round-log-item.is-active.match-loss {
    background: color-mix(in srgb, var(--log-team-color) 22%, var(--white-color));
}

@supports not (background: color-mix(in srgb, red 10%, transparent)) {
    .round-log-item.is-active.match-win { background: rgba(59, 130, 246, 0.22); }
    .round-log-item.is-active.match-loss { background: rgba(229, 62, 62, 0.22); }
}

.round-log-time {
    font-weight: 800;
    color: var(--text-color);
}

.round-log-text {
    color: var(--light-text-color);
    min-width: 0;
    word-break: break-word;
}

.round-log-weapon {
    color: var(--text-color);
    font-weight: 700;
}

.round-empty {
    color: var(--light-text-color);
    text-align: center;
}



.match-loss {



    color: #e53e3e; /* Red */



}







.match-draw {



    color: var(--light-text-color);



}



.rr-positive {

    color: #22c55e; /* Green */

}



.rr-negative {

    color: #e53e3e; /* Red */

}



.rr-neutral {

    color: var(--light-text-color);

}

.player-level, .player-rank {
    display: inline-flex;
    align-items: center;
    font-size: 0.8em;
    font-weight: 700;
    margin-right: 0.4rem;
    vertical-align: middle;
    line-height: 1.2;
}

.player-level {
    background-color: #e9ecef;
    color: var(--light-text-color);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.player-rank {
    gap: 0.25rem;
    color: var(--light-text-color);
    padding: 0;
}

.player-rank-icon {
    width: 20px;
    height: 20px;
}
