@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg-dark: #0b0f19;
    --bg-card: rgba(22, 28, 45, 0.55);
    --bg-card-hover: rgba(28, 37, 59, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    
    --primary: #f59e0b; /* Basketball Amber Gold */
    --primary-hover: #d97706;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    
    /* Rarity Glow Colors */
    --rarity-common: rgba(156, 163, 175, 0.4);
    --rarity-limited: rgba(234, 179, 8, 0.5);
    --rarity-rare: rgba(239, 68, 68, 0.5);
    --rarity-super-rare: rgba(59, 130, 246, 0.5);
    --rarity-unique: rgba(168, 85, 247, 0.6);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: radial-gradient(circle at top, #111827 0%, var(--bg-dark) 100%);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    padding-bottom: 60px;
    overflow-x: hidden;
}

h1, h2, h3, h4, .brand-title {
    font-family: 'Outfit', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(11, 15, 25, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
}

.nav-logo {
    width: 42px;
    height: auto;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.2));
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #fff 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-greeting {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
}

.user-nickname {
    color: var(--primary);
    font-weight: 700;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 0 24px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: none;
    outline: none;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: #0b0f19;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-danger {
    background-color: transparent;
    color: #f3f4f6;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    background-color: var(--danger);
    border-color: var(--danger);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Login Page Styling */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    padding: 24px;
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    padding: 48px 40px;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.login-card:hover {
    transform: translateY(-4px);
}

.login-logo {
    max-width: 140px;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.3));
}

.login-card h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
}

.login-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 32px;
    line-height: 1.5;
}

/* Home Section Layout */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
}

/* Filters Component */
.filters-bar {
    background: rgba(22, 28, 45, 0.3);
    border: 1px solid var(--border-color);
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 32px;
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.filter-select, .filter-input {
    background: #0f1422;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 140px;
}

.filter-select {
    cursor: pointer;
}

.filter-input {
    min-width: 200px;
}

.filter-select:focus, .filter-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

/* Card Gallery Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.card-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.card-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 0.73;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.card-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.card-item:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
    background-color: var(--bg-card-hover);
}

.card-item:hover .card-img {
    transform: scale(1.05);
}

/* Dynamic Rarity Glow Styling */
.card-rarity-common:hover {
    box-shadow: 0 10px 20px -5px var(--rarity-common);
    border-color: rgba(156, 163, 175, 0.6);
}
.card-rarity-limited:hover {
    box-shadow: 0 10px 25px -5px var(--rarity-limited);
    border-color: rgba(234, 179, 8, 0.6);
}
.card-rarity-rare:hover {
    box-shadow: 0 10px 25px -5px var(--rarity-rare);
    border-color: rgba(239, 68, 68, 0.6);
}
.card-rarity-super_rare:hover {
    box-shadow: 0 10px 25px -5px var(--rarity-super-rare);
    border-color: rgba(59, 130, 246, 0.6);
}
.card-rarity-unique:hover {
    box-shadow: 0 10px 30px -5px var(--rarity-unique);
    border-color: rgba(168, 85, 247, 0.8);
    background: linear-gradient(180deg, rgba(22, 28, 45, 0.55) 0%, rgba(168, 85, 247, 0.05) 100%);
}

.card-info {
    text-align: center;
    width: 100%;
}

.card-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.card-details {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.card-score {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
    cursor: help;
}

.card-power {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    cursor: help;
}

.card-stars {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 2px 7px;
    border-radius: 6px;
    cursor: help;
    transition: transform 0.15s ease, background 0.15s ease;
}

.card-stars:hover {
    background: rgba(245, 158, 11, 0.25);
    border-color: rgba(245, 158, 11, 0.55);
    transform: translateY(-1px);
}

.card-stars .star-icon {
    color: #f59e0b;
    font-size: 0.85rem;
    line-height: 1;
}

/* Card Price & Valuation Tracking */
.card-valuation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    width: 100%;
}

/* Rounded Box for Bought Price -> Current Price */
.valuation-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 4px 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.val-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    letter-spacing: 0.2px;
    cursor: help;
}

/* Acquisition Modes: Bought, Crafted, Traded, Reward */

/* Bought: light sky blue background with vivid sky blue text */
.val-bought.acquisition-bought,
.acquisition-bought {
    background-color: #e0f2fe;
    color: #0284c7;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Crafted: light purple/lavender background with deep violet text */
.val-bought.acquisition-crafted,
.acquisition-crafted {
    background-color: #ede9fe;
    color: #6d28d9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Traded: light teal/mint background with rich teal text */
.val-bought.acquisition-traded,
.acquisition-traded {
    background-color: #ccfbf1;
    color: #0f766e;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Reward: light gold/amber background with rich amber text */
.val-bought.acquisition-reward,
.acquisition-reward {
    background-color: #fef9c3;
    color: #a16207;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Default Bought Pill */
.val-bought {
    background-color: #e0f2fe;
    color: #0284c7;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Middle arrow */
.val-arrow {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    user-select: none;
}

/* Current Worth Pill: light peach background with crisp dark text */
.val-current {
    background-color: #ffedd5;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Rounded Box for Difference */
.valuation-diff-box,
.val-diff {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 12px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: help;
}

/* Red for negative difference (loss) */
.valuation-diff-box.diff-negative,
.diff-negative {
    background-color: #ef4444;
    color: #ffffff;
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

/* Green for positive difference (profit) */
.valuation-diff-box.diff-positive,
.diff-positive {
    background-color: #10b981;
    color: #ffffff;
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

/* Neutral difference */
.valuation-diff-box.diff-neutral,
.diff-neutral {
    background-color: #64748b;
    color: #ffffff;
}

/* Pagination Section */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(22, 28, 45, 0.2);
    border: 1px solid var(--border-color);
    padding: 16px 24px;
    border-radius: 12px;
    margin-top: 40px;
    flex-wrap: wrap;
    gap: 16px;
}

.pagination-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-input {
    background: #0f1422;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    width: 60px;
    text-align: center;
    outline: none;
}

.pagination-input:focus {
    border-color: var(--primary);
}

.pagination-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pagination-links {
    display: flex;
    gap: 12px;
}

.no-cards-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-muted);
}

.no-cards-message h3 {
    margin-bottom: 8px;
    color: var(--text-main);
}

/* Responsive tweaks */
@media(max-width: 640px) {
    .navbar {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .nav-user {
        flex-direction: column;
        gap: 10px;
    }
    
    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        justify-content: space-between;
    }
    
    .pagination-container {
        flex-direction: column;
        align-items: center;
    }
}

/* Sort Order Controls */
.sort-control-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-order-buttons {
    display: flex;
    align-items: center;
    background: #0f1422;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.sort-order-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sort-order-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
}

.sort-order-btn.active {
    background: var(--primary);
    color: #0b0f19;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.35);
}

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 20, 34, 0.7);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 7px 16px;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.nav-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.18);
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Stats Overview Grid */
.stats-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 22px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.stat-card-highlight {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(22, 28, 45, 0.7) 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 4px 24px rgba(245, 158, 11, 0.12);
}

.stat-card-highlight-green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(22, 28, 45, 0.7) 100%);
    border: 1px solid rgba(16, 185, 129, 0.35);
    box-shadow: 0 4px 24px rgba(16, 185, 129, 0.12);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    color: var(--text-muted);
}

.stat-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-amber {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-green {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-red {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-main);
}

.stat-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.text-gold {
    color: #f59e0b;
}

.text-green {
    color: #10b981;
}

.text-red {
    color: #ef4444;
}

/* Secondary Compact Stats Grid */
.stats-subgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stats-subgrid-3col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card-compact {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    backdrop-filter: blur(12px);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card-compact:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.18);
}

.compact-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.compact-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.compact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
    flex-wrap: wrap;
}

.compact-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    line-height: 1.3;
}

.compact-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
}

.compact-subvalue {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 2px;
}

.compact-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 2px;
}

/* Rarity Breakdown Section & Spacing */
.stats-rarity-section {
    margin-top: 24px;
    margin-bottom: 32px;
}

.stats-rarity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stats-rarity-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.rarity-card-compact {
    flex: 1 1 260px;
    max-width: 360px;
    padding: 16px 18px;
}

.stats-section-divider {
    margin-bottom: 14px;
}

.stats-section-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Tables Layout */
.stats-tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
    gap: 24px;
}

.stats-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 22px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.panel-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.panel-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.panel-badge.badge-green {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.panel-badge.badge-red {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.table-wrapper {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.stats-table th {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    color: var(--text-muted);
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
}

.stats-table td {
    padding: 12px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.stats-table tr:last-child td {
    border-bottom: none;
}

.stats-table tr:hover td {
    background: rgba(255, 255, 255, 0.025);
}

.card-sale-title {
    font-weight: 600;
    color: var(--text-main);
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
}

.card-table-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-table-thumb {
    width: 22px;
    height: 30px;
    max-width: 22px;
    max-height: 30px;
    object-fit: cover;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

.card-table-info {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex-wrap: wrap;
}

.card-table-name {
    font-weight: 600;
    color: var(--text-main);
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Rarity Pills */
.rarity-pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rarity-pill-limited {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.4);
}

.rarity-pill-rare {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.rarity-pill-super_rare {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.rarity-pill-unique {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.rarity-pill-common {
    background: rgba(156, 163, 175, 0.15);
    color: #d1d5db;
    border: 1px solid rgba(156, 163, 175, 0.4);
}

@media (max-width: 768px) {
    .stats-tables-grid {
        grid-template-columns: 1fr;
    }
    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }
    .navbar {
        flex-wrap: wrap;
    }
}

/* Stats Scoping & Section Headers */
.scope-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 3px 9px;
    border-radius: 6px;
    line-height: 1.2;
}

.scope-gallery {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.scope-historical {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.35);
}

.scope-combined {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.stats-group-header {
    margin: 28px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stats-group-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.stats-group-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
}

.stats-group-desc {
    font-size: 0.86rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Players Roster Table & Badges
   ========================================================================== */
.players-table th {
    padding: 12px 14px;
    background: rgba(15, 20, 34, 0.6);
}

.players-table td {
    padding: 14px;
}

.player-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-avatar-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-avatar-placeholder {
    font-size: 1.25rem;
}

.player-info-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.player-name {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
}

.player-tags {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.pos-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.rarity-mini-pill {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: capitalize;
    padding: 1px 6px;
    border-radius: 4px;
}

.team-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-logo-thumb {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.team-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.team-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.25;
}

.card-team-note {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.score-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    display: inline-block;
}

.score-l10 {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.score-season {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.diff-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    display: inline-block;
}

.diff-badge.diff-positive {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.diff-badge.diff-negative {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.diff-badge.diff-neutral {
    background: rgba(100, 116, 139, 0.18);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.missed-cell {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
}

.missed-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
}

.missed-high {
    color: #ef4444;
}

.missed-med {
    color: #f59e0b;
}

.missed-low {
    color: #10b981;
}

.missed-total {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.cards-count-pill {
    font-family: 'Outfit', sans-serif;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-main);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.88rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: inline-block;
}

.player-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge-inactive {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
    white-space: nowrap;
}

.score-badge.score-inactive {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 3px 8px;
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.25);
}

.filter-checkbox-group {
    display: flex;
    align-items: center;
}

.filter-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-main);
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.filter-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(245, 158, 11, 0.4);
}

.filter-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
    margin: 0;
}

.filter-badge-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.team-logo-inline {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
    vertical-align: middle;
}

.last5-cell {
    text-align: center;
    vertical-align: middle;
}

.last5-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-wrap: nowrap;
}

.gw-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 3px 5px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-color);
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    cursor: default;
}

.gw-pill:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.gw-label {
    font-size: 0.62rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.1;
}

.gw-score {
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
}

.gw-diff {
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.1;
}

.gw-pos .gw-diff {
    color: #34d399;
}

.gw-neg .gw-diff {
    color: #f87171;
}

.gw-zero .gw-diff {
    color: #94a3b8;
}

.gw-dnp {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.35);
}

.gw-dnp:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.55);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}

.gw-dnp .gw-score {
    color: #f87171;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.gw-dnp .gw-diff {
    color: #f87171;
    font-weight: 700;
}

.gw-no-game {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.07);
    opacity: 0.65;
}

.gw-no-game:hover {
    opacity: 0.95;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.16);
}

.gw-no-game .gw-score {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.gw-no-game .gw-diff {
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.02em;
}

/* Sortable Table Headers */
.th-sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
}

.th-sortable:hover {
    color: var(--primary-accent);
}

.th-sort-indicator {
    display: inline-block;
    margin-left: 4px;
    font-size: 0.72rem;
    opacity: 0.45;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.th-sortable:hover .th-sort-indicator {
    opacity: 0.85;
}

.th-sort-indicator.active {
    opacity: 1;
    color: var(--primary-accent);
    font-weight: 900;
}

/* ==========================================================================
   Player Detail View & Profile Styles
   ========================================================================== */

/* Player Links */
.player-link, .card-player-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

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

.player-avatar-placeholder-link {
    text-decoration: none;
    display: block;
}

.player-detail-container {
    max-width: 1240px;
    margin: 28px auto 60px;
    padding: 0 20px;
}

/* Back Navigation & Breadcrumb */
.detail-top-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(245, 158, 11, 0.4);
    transform: translateX(-2px);
}

.detail-breadcrumb {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.detail-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.detail-breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb-current {
    color: var(--text-main);
    font-weight: 600;
}

/* Player Hero Card */
.player-hero-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-bottom: 36px;
}

@media (min-width: 900px) {
    .player-hero-card {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.player-hero-main {
    display: flex;
    align-items: center;
    gap: 24px;
}

.player-hero-avatar-wrap {
    position: relative;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(30, 41, 59, 0.8));
    padding: 3px;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.25);
    flex-shrink: 0;
}

.player-hero-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #0f172a;
}

.player-hero-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: #1e293b;
}

.player-hero-team-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0f172a;
    border: 2px solid rgba(255, 255, 255, 0.15);
    padding: 2px;
    object-fit: contain;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.player-hero-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.player-hero-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.player-hero-name {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.player-shirt-num {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 2px 10px;
    border-radius: 6px;
}

.player-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.team-pill {
    background: rgba(255, 255, 255, 0.09);
    font-weight: 600;
}

.pill-team-icon, .pill-flag-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 2px;
}

.pos-pill {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    font-weight: 700;
    font-size: 0.76rem;
    min-width: 24px;
    justify-content: center;
}

.country-pill {
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.star-rating-pill {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.25));
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    font-weight: 700;
}

/* Hero KPIs */
.player-hero-kpis {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
}

@media (min-width: 600px) {
    .player-hero-kpis {
        grid-template-columns: repeat(4, 1fr);
        min-width: 480px;
    }
}

.hero-kpi-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.hero-kpi-card:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.3);
}

.kpi-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.kpi-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 4px;
}

.kpi-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.text-positive {
    color: #34d399 !important;
}

.text-negative {
    color: #f87171 !important;
}

/* Detail Sections */
.detail-section {
    margin-bottom: 40px;
}

.section-title-wrap {
    margin-bottom: 18px;
}

.section-flex-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 768px) {
    .section-flex-wrap {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.section-heading {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.section-subtext {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Rarity Floor Cards Grid */
.rarity-floors-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 18px;
}

@media (min-width: 600px) {
    .rarity-floors-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .rarity-floors-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.rarity-floor-card {
    background: rgba(22, 28, 45, 0.65);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--floor-border, #f59e0b);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.rarity-floor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.18);
    border-top-color: var(--floor-border, #f59e0b);
}

.floor-card-top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.floor-live-tag {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #34d399;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
}

.floor-none-tag {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
}

.floor-card-preview {
    width: 110px;
    height: 165px;
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.floor-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.floor-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
}

.placeholder-rarity-letter {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.12);
}

.floor-card-pricing {
    width: 100%;
    margin-bottom: 16px;
}

.floor-price-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.floor-price-val {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
}

.floor-price-val.has-price {
    color: #fff;
    background: linear-gradient(135deg, #fff 40%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.floor-price-val.no-price {
    font-size: 1.15rem;
    color: var(--text-muted);
    font-weight: 600;
}

.floor-card-action {
    width: 100%;
}

.btn-floor-action {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

/* Score Progression Graph */
.chart-summary-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chart-stat-pill {
    font-size: 0.78rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 6px;
    color: var(--text-muted);
}

.chart-stat-pill strong {
    color: #fff;
    font-family: 'Outfit', sans-serif;
}

.chart-wrapper-card {
    background: rgba(22, 28, 45, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.chart-canvas-container {
    position: relative;
    height: 320px;
    width: 100%;
}

.chart-legend-custom {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    align-items: center;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-score { background: #38bdf8; }
.dot-l10 { background: #f59e0b; border-radius: 2px; height: 3px; width: 14px; }
.dot-pos { background: #10b981; }
.dot-neg { background: #ef4444; }
.dot-dnp { background: #64748b; }

/* Game Log Table */
.game-log-card {
    background: rgba(22, 28, 45, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.game-date-cell {
    font-size: 0.85rem;
    color: var(--text-main);
    font-weight: 500;
}

.gw-badge-pill {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.opponent-matchup-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.opp-logo-thumb {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.matchup-text {
    font-weight: 600;
    color: #fff;
    font-size: 0.88rem;
}

.score-pill-val {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
}

.score-pill-pos {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.score-pill-neg {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.score-pill-neu {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.score-pill-dnp {
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.diff-tag-pill {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
}

.diff-tag-pos {
    color: #34d399;
    background: rgba(16, 185, 129, 0.1);
}

.diff-tag-neg {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
}

.diff-tag-neu {
    color: #94a3b8;
}

.status-pill {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 5px;
    text-transform: uppercase;
}

.status-pill-final {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-pill-dnp {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.row-dnp {
    opacity: 0.75;
}

/* Gameweek Group Dividers & Summary */
.gw-divider-row {
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%) !important;
    border-top: 2px solid rgba(245, 158, 11, 0.6) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.gw-divider-row td {
    padding: 10px 16px !important;
}

.gw-divider-row:hover {
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%) !important;
}

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

.gw-divider-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gw-divider-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.02em;
}

.gw-divider-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 4px;
}

.gw-divider-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.gw-summary-block {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gw-summary-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.gw-summary-score {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}

.gw-score-dnp {
    color: #f87171 !important;
    font-size: 0.9rem;
}

.gw-summary-diff {
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 800;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 5px;
}

.gw-summary-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-left: 2px;
}

/* Score Cell Wrap & Counted Badge */
.score-cell-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.counted-star-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fbbf24;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    line-height: 1.2;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
}

.row-counted {
    background: rgba(245, 158, 11, 0.08) !important;
}

.row-counted:hover {
    background: rgba(245, 158, 11, 0.14) !important;
}

/* Player GW Diffs Banner */
.player-gw-diffs-banner {
    background: linear-gradient(135deg, rgba(22, 28, 45, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 36px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.gw-diffs-banner-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .gw-diffs-banner-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: baseline;
    }
}

.gw-diffs-banner-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gw-diffs-badge-icon {
    font-size: 1.15rem;
}

.gw-diffs-banner-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.gw-diffs-banner-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.gw-diffs-banner-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 14px;
}

@media (min-width: 640px) {
    .gw-diffs-banner-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gw-diff-stat-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.gw-diff-stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.3);
}

.diff-card-label {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.diff-card-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 4px;
}

.diff-card-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ===== Lineups Page ===== */
.lineups-count-pill {
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.lineup-fixture {
    margin-bottom: 48px;
}

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

.lineup-fixture-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lineup-fixture-title {
    font-size: 1.35rem;
    font-weight: 700;
}

.lineup-fixture-dates {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lineup-fixture-dates strong {
    color: var(--text-main);
}

.countdown {
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #7dd3fc;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.fixture-state-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.state-live {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.state-upcoming {
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    animation: livePulse 1.6s ease-in-out infinite;
}

@keyframes livePulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.lineups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(520px, 1fr));
    gap: 20px;
}

.lineup-card {
    --lineup-accent: var(--rarity-common);
    position: relative;
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 18px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    animation: lineupFadeIn 0.4s ease both;
}

.lineup-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--lineup-accent), transparent);
}

.lineup-card:hover {
    transform: translateY(-3px);
    border-color: var(--lineup-accent);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 24px var(--lineup-accent);
}

.lineup-rarity-limited { --lineup-accent: var(--rarity-limited); }
.lineup-rarity-rare { --lineup-accent: var(--rarity-rare); }
.lineup-rarity-super_rare { --lineup-accent: var(--rarity-super-rare); }
.lineup-rarity-unique { --lineup-accent: var(--rarity-unique); }

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

.lineup-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.lineup-board {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.lineup-board-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.lineup-board-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.lineup-board-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.lineup-kpis {
    display: flex;
    gap: 10px;
}

.lineup-kpi {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 6px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    min-width: 72px;
}

.lineup-kpi-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}

.lineup-kpi-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.lineup-kpi-small {
    font-size: 0.9rem;
    font-weight: 600;
}

.lineup-players {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.lineup-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
}

.lineup-player-img-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 6px;
}

.lineup-player-img {
    width: 100%;
    display: block;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.lineup-player-img-wrap a:hover .lineup-player-img {
    transform: scale(1.04);
}

.lineup-player.is-captain .lineup-player-img {
    box-shadow: 0 0 0 2px var(--primary), 0 0 14px rgba(245, 158, 11, 0.45);
}

.captain-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: #0b0f19;
    background: var(--primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.lineup-player-name {
    width: 100%;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lineup-player-stars {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 3px;
    margin-bottom: 6px;
    padding: 1px 7px;
    border-radius: 9999px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.28);
    cursor: default;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.lineup-player-stars:hover {
    background: rgba(245, 158, 11, 0.18);
    transform: scale(1.04);
}

.lineup-player-stars .star-icon {
    font-size: 0.72rem;
    color: var(--primary);
}

.lineup-score-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 2px;
}

.lineup-score-box {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lineup-score-val {
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-family: 'Outfit', sans-serif;
    border: 1px solid transparent;
    text-align: center;
}

/* Score color tiers: gold (>=60), green (>=45), blue (>=30), slate (>=20), red (<20) */
.lineup-score-val.score-gold {
    color: #fef08a;
    background: rgba(234, 179, 8, 0.2);
    border-color: rgba(234, 179, 8, 0.5);
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.25);
}

.lineup-score-val.score-green {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.45);
}

.lineup-score-val.score-blue {
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
}

.lineup-score-val.score-slate {
    color: #cbd5e1;
    background: rgba(100, 116, 139, 0.16);
    border-color: rgba(100, 116, 139, 0.35);
}

.lineup-score-val.score-red {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.4);
}

.lineup-diff-sup {
    position: absolute;
    left: calc(100% + 2px);
    top: -5px;
    font-size: 0.62rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    font-family: 'Outfit', sans-serif;
    padding: 1px 3px;
    border-radius: 4px;
    white-space: nowrap;
    line-height: 1.1;
}

.lineup-diff-sup.diff-pos {
    color: #34d399;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.lineup-diff-sup.diff-neg {
    color: #f87171;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.lineup-diff-sup.diff-neu {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.lineup-player-score {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    border: 1px solid transparent;
}

.lineup-player-score.status-final {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
}

.lineup-player-score.status-live {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
}

.lineup-player-score.status-pending {
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.25);
    font-weight: 600;
    font-size: 0.72rem;
}

.lineup-player-score.status-dnp {
    color: var(--text-muted);
    background: rgba(100, 116, 139, 0.15);
    border-color: rgba(100, 116, 139, 0.3);
    font-size: 0.72rem;
}

.lineups-empty {
    padding: 28px;
    text-align: center;
    color: var(--text-muted);
    background: rgba(22, 28, 45, 0.3);
    border: 1px dashed var(--border-color);
    border-radius: 14px;
}

@media (max-width: 640px) {
    .lineups-grid {
        grid-template-columns: 1fr;
    }
    .lineup-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}



