/* Root variables for design system */
:root {
    --bg-main: #0a0a0c;
    --bg-card: #141418;
    --border-card: #24242c;
    --border-hover: #383844;
    
    --color-text-primary: #ffffff;
    --color-text-secondary: #9ca3af;
    --color-text-muted: #6b7280;
    
    /* Accent Colors */
    --color-yellow: #facc15;
    --color-yellow-dark: #ca8a04;
    --color-green-glow: #10b981;
    --color-green-bg: #064e3b;
    --color-green-border: #047857;
    --color-green-text: #34d399;
    
    /* Segment Colors */
    --color-seg-1: #2563eb; /* Blue */
    --color-seg-2: #0891b2; /* Cyan */
    --color-seg-3: #059669; /* Green */
    --color-seg-4: #84cc16; /* Light green / Lime */
    
    /* Font families */
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.7), 0 1px 1px 0 rgba(255, 255, 255, 0.05) inset;
    --shadow-active: 0 0 20px rgba(250, 204, 21, 0.2);
}

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

body {
    background-color: var(--bg-main);
    background-image: radial-gradient(circle at 50% 10%, #1c1c24 0%, var(--bg-main) 70%);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* Header Styles */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-card);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--color-text-primary);
    background: linear-gradient(135deg, #ffffff 50%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.game-selector-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.field-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* Search Wrapper & Autocomplete Dropdown */
.search-wrapper {
    position: relative;
    width: 320px;
}

@media (max-width: 600px) {
    .game-selector-container {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    .search-wrapper {
        width: 100%;
    }
}

.search-input {
    width: 100%;
    background-color: #1e1e24;
    border: 1px solid var(--border-card);
    color: var(--color-text-primary);
    padding: 0.6rem 2.2rem 0.6rem 1rem;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus, .search-input:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

.clear-search-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 5;
}

.clear-search-btn:hover {
    color: #ef4444;
}

.add-custom-btn {
    background-color: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.add-custom-btn:hover {
    border-color: var(--border-hover);
    color: var(--color-text-primary);
    background-color: rgba(255, 255, 255, 0.02);
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background-color: #141418;
    border: 1px solid var(--border-card);
    border-radius: 8px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(10px);
}

.search-dropdown.hidden {
    display: none;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.search-item-cover {
    width: 36px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    background-color: #222;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.search-item-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.search-item-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item-meta {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-top: 0.15rem;
}

.search-no-results, .search-loading {
    padding: 1rem;
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
}


/* Custom Game Form (Modal-like) */
.custom-game-form {
    background: rgba(20, 20, 24, 0.95);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-premium);
}

.custom-game-form.hidden {
    display: none;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.form-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #ef4444;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.input-group input {
    background-color: #1e1e24;
    border: 1px solid var(--border-card);
    border-radius: 6px;
    padding: 0.6rem;
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--border-hover);
}

.apply-btn {
    background-color: var(--color-yellow);
    color: #000;
    border: none;
    border-radius: 6px;
    padding: 0.6rem 1.5rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: background-color 0.2s, transform 0.1s;
}

.apply-btn:hover {
    background-color: #fef08a;
}

.apply-btn:active {
    transform: scale(0.98);
}

/* Layout Grid */
.calculator-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.5rem;
}

@media (max-width: 850px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
}

.calculator-left, .calculator-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Card Styling */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-premium);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    border-color: var(--border-hover);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.card-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.card-desc {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}

.card-desc-large {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
}

/* Game Info Card */
.game-info-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--color-yellow);
}

.game-cover {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    background-color: #1e1e24;
    border: 1px solid var(--border-card);
}

.game-metadata {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.game-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
}

.game-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

/* Main Score Card */
.main-score-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.season-toggles {
    display: flex;
    background-color: #1a1a20;
    padding: 0.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-card);
}

.season-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--color-text-secondary);
    padding: 0.6rem;
    border-radius: 6px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.season-btn.active {
    background-color: var(--color-yellow);
    color: #000000;
    box-shadow: var(--shadow-active);
}

.score-formula {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0;
}

.formula-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.formula-val {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
    transition: transform 0.2s ease;
}

.formula-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.formula-sign {
    font-size: 1.5rem;
    color: var(--color-text-muted);
    font-weight: 400;
    margin-top: -1.25rem;
}

.formula-item.total {
    border-radius: 8px;
    padding: 0.25rem 0.75rem;
    background-image: radial-gradient(circle, rgba(250, 204, 21, 0.05) 0%, transparent 100%);
}

.formula-item.total .formula-val {
    color: var(--color-yellow);
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.3);
}

.formula-item.total .formula-label {
    color: var(--color-yellow-dark);
}

/* Points Badge */
.points-badge {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-card);
    color: var(--color-text-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
}

.modifier-badge {
    background-color: #1e1e24;
    border: 1px solid var(--border-card);
    color: var(--color-text-primary);
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* Completion Time Card */
.progress-container {
    background-color: #16161c;
    border-radius: 8px;
    padding: 0.5rem;
    border: 1px solid var(--border-card);
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cycle-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.cycle-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    padding: 0 0.25rem;
}

.cycle-title {
    color: var(--color-text-secondary);
}

.cycle-points {
    color: var(--color-yellow);
    font-family: var(--font-heading);
    font-weight: 700;
}

.segmented-progress {
    display: flex;
    height: 28px;
    border-radius: 6px;
    overflow: hidden;
    background-color: #222228;
}

.progress-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    transition: width 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.seg-blue { background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%); }
.seg-cyan { background: linear-gradient(180deg, #06b6d4 0%, #0891b2 100%); }
.seg-green { background: linear-gradient(180deg, #10b981 0%, #047857 100%); }
.seg-yellow { background: linear-gradient(180deg, #84cc16 0%, #4d7c0f 100%); }

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.bullet-blue { background-color: var(--color-seg-1); }
.bullet-cyan { background-color: var(--color-seg-2); }
.bullet-green { background-color: var(--color-seg-3); }
.bullet-yellow { background-color: var(--color-seg-4); }

/* Slider Styling */
.slider-container {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-card);
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.slider-value {
    color: var(--color-yellow);
    font-weight: 700;
    font-size: 1.1rem;
}

.slider-wrapper {
    position: relative;
    padding: 0.5rem 0;
    margin-bottom: 0.25rem;
}

.custom-slider {
    width: 100%;
    -webkit-appearance: none;
    background: #1a1a20;
    height: 8px;
    border-radius: 4px;
    outline: none;
    border: 1px solid var(--border-card);
}

.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 10px rgba(0,0,0,0.5), 0 0 0 4px var(--color-yellow);
    cursor: pointer;
    transition: transform 0.1s;
}

.custom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.hltb-tick {
    position: absolute;
    top: -3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    transition: left 0.3s ease;
}

.tick-line {
    width: 2px;
    height: 18px;
    background-color: var(--color-green-glow);
    box-shadow: 0 0 8px var(--color-green-glow);
}

.tick-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--color-green-glow);
    margin-top: 4px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Modifier Columns */
.modifier-columns {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #17171c;
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.mod-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
}

.col-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-text-muted);
}

.col-val {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.mod-arrow {
    color: var(--color-text-muted);
    font-size: 1.25rem;
    padding: 0 0.5rem;
}

.green-box {
    background-color: var(--color-green-bg);
    border: 1px solid var(--color-green-border);
    color: var(--color-green-text);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 1.15rem;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Top Games Section Styles */
.top-games-card {
    margin-top: 2rem;
    width: 100%;
}

.top-games-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-card);
    background-color: #121216;
}

.top-games-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.top-games-table th {
    background-color: #18181f;
    color: var(--color-text-secondary);
    font-weight: 600;
    padding: 0.85rem 1rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-card);
}

.top-games-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
    color: var(--color-text-primary);
}

.top-games-table tbody tr {
    transition: background-color 0.2s;
}

.top-games-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.top-games-table tbody tr:last-child td {
    border-bottom: none;
}

.game-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.game-cell-cover {
    width: 32px;
    height: 42px;
    object-fit: cover;
    border-radius: 4px;
    background-color: #222;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.game-cell-title {
    font-weight: 600;
    color: var(--color-text-primary);
}

.points-val {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text-primary);
}

.efficiency-val {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-yellow);
    text-shadow: 0 0 8px rgba(250, 204, 21, 0.1);
}

.select-game-btn {
    background-color: transparent;
    border: 1px solid var(--border-card);
    color: var(--color-text-secondary);
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

.select-game-btn:hover {
    border-color: var(--color-yellow);
    color: #000;
    background-color: var(--color-yellow);
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.2);
}

.table-loading {
    text-align: center;
    padding: 2rem !important;
    color: var(--color-text-secondary);
    font-style: italic;
}

/* Steam Badge Styles */
.steam-badge {
    display: inline-flex;
    margin-top: 0.5rem;
}

.steam-badge.hidden {
    display: none !important;
}

.steam-badge a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background-color: rgba(26, 38, 57, 0.6);
    border: 1px solid #1b2838;
    color: #66c0f4;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.steam-badge a:hover {
    background-color: rgba(102, 192, 244, 0.15);
    border-color: #66c0f4;
    color: #fff;
    box-shadow: 0 0 8px rgba(102, 192, 244, 0.2);
}

.steam-icon {
    color: inherit;
}

/* Genres Tags styles */
.game-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.genre-tag {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-card);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.genre-tag:hover {
    border-color: var(--border-hover);
    color: var(--color-text-primary);
}

.genre-tag-horror {
    background-color: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.genre-tag-horror:hover {
    border-color: #ef4444;
    color: #fee2e2;
}

.game-cell-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.game-cell-genres {
    font-size: 0.72rem;
    color: var(--color-text-muted);
}

.search-item-genres {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

/* Filters styling */
.table-filters {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
}

.filter-input {
    flex: 1.2;
    background-color: #16161c;
    border: 1px solid var(--border-card);
    color: var(--color-text-primary);
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    outline: none;
    transition: all 0.2s ease;
}

.filter-input:focus {
    border-color: var(--border-hover);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.03);
}

.filter-selects {
    display: flex;
    gap: 0.75rem;
    flex: 1.8;
}

.filter-select {
    flex: 1;
    background-color: #16161c;
    border: 1px solid var(--border-card);
    color: var(--color-text-primary);
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239ca3af' viewBox='0 0 24 24'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.2rem;
    padding-right: 2.2rem;
}

.filter-select:focus, .filter-select:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.03);
}

.filter-select option {
    background-color: #141418;
    color: var(--color-text-primary);
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .table-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .filter-selects {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Custom Multiselect Dropdown */
.custom-multiselect {
    position: relative;
    flex: 1;
}

.multiselect-trigger {
    width: 100%;
    background-color: #16161c;
    border: 1px solid var(--border-card);
    color: var(--color-text-primary);
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.multiselect-trigger:hover, .multiselect-trigger:focus {
    border-color: var(--border-hover);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.03);
}

.multiselect-trigger .trigger-arrow {
    transition: transform 0.2s ease;
    color: #9ca3af;
}

.custom-multiselect.open .multiselect-trigger .trigger-arrow {
    transform: rotate(180deg);
}

.multiselect-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    min-width: 240px;
    background-color: rgba(22, 22, 28, 0.96);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 100;
    max-height: 280px;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.multiselect-dropdown.hidden {
    display: none;
}

.multiselect-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--color-text-muted);
    transition: background-color 0.15s ease, color 0.15s ease;
    user-select: none;
}

.multiselect-option:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--color-text-primary);
}

.multiselect-option input[type="checkbox"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    position: relative;
    background-color: transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.multiselect-option input[type="checkbox"]:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.multiselect-option input[type="checkbox"]:checked::after {
    content: "";
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
    display: block;
}

.multiselect-option input[type="checkbox"]:focus {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.multiselect-option span {
    font-family: var(--font-body);
}

.multiselect-option input[type="checkbox"]:checked + span {
    color: var(--color-text-primary);
    font-weight: 500;
}

/* Build / Strategy Passage styles */
.build-card {
    margin-top: 1.5rem;
}

.build-table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
}

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

.build-table th, .build-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.build-table th {
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-card);
}

.build-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.build-step-num {
    font-weight: 700;
    color: var(--color-text-muted);
    margin-right: 0.5rem;
}

.build-cumulative-val {
    font-weight: 500;
    color: #10b981; /* Premium green */
}

.clear-build-btn {
    margin-top: 1rem;
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-build-btn:hover {
    background-color: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

/* Action buttons in Top Table */
.add-build-btn {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
}

.add-build-btn:hover {
    background-color: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
}

.remove-build-btn {
    background-color: transparent;
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-build-btn:hover {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

/* 8-Hour Day Tabs Styling */
.build-days-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding: 0.35rem;
    background-color: #14141a;
    border-radius: 8px;
    border: 1px solid var(--border-card);
}

.build-day-tab {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    background-color: transparent;
    color: var(--color-text-secondary);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-family: var(--font-body);
}

.build-day-tab:hover {
    color: var(--color-text-primary);
    background-color: rgba(255, 255, 255, 0.04);
}

.build-day-tab.active {
    background-color: rgba(250, 204, 21, 0.08);
    border-color: var(--color-yellow);
    color: var(--color-yellow);
}

.build-day-tab .tab-sub {
    font-size: 0.68rem;
    color: var(--color-text-muted);
    font-weight: 400;
}

.build-day-tab.active .tab-sub {
    color: var(--color-yellow-dark);
}

/* Google Search/Download Button */
.google-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

.google-search-btn:hover {
    background-color: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #fff;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
}

/* Game Platform Badge */
.game-platform-badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 4px;
    background-color: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #60a5fa;
    vertical-align: middle;
    margin-left: 6px;
    font-family: var(--font-body);
}

.game-platform-badge.main-badge {
    font-size: 0.85rem;
    padding: 0.2rem 0.5rem;
    background-color: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    margin-left: 8px;
}

.game-platform-badge.inline-badge {
    font-size: 0.58rem;
    padding: 0.02rem 0.18rem;
    background-color: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-radius: 3px;
    vertical-align: super;
    margin-left: 4px;
    font-weight: 500;
}

