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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0a0a0a;
    min-height: 100vh;
    padding: 20px;
    color: #e0e0e0;
    position: relative;
    overflow-x: hidden;
}

.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.15;
    pointer-events: none;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 100px,
            rgba(184, 134, 11, 0.1) 100px,
            rgba(184, 134, 11, 0.1) 101px
        ),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 150px,
            rgba(184, 134, 11, 0.05) 150px,
            rgba(184, 134, 11, 0.05) 151px
        );
    animation: wave 20s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(0.5deg);
    }
    50% {
        transform: translateY(-20px) rotate(0deg);
    }
    75% {
        transform: translateY(-10px) rotate(-0.5deg);
    }
}

.quota-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.quota-notification-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 20px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
}

.quota-icon {
    font-size: 24px;
}

.quota-message {
    flex: 1;
    text-align: center;
    max-width: 800px;
}

.quota-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.quota-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nav-tabs {
    position: relative;
    z-index: 10;
    display: flex;
    gap: 48px;
    padding: 0 0 8px 0;
    border-bottom: 1px solid rgba(184, 134, 11, 0.2);
    margin-bottom: 8px;
    justify-content: center;
}

.nav-tab {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    padding: 12px 24px;
    transition: all 0.3s ease;
    font-size: 20px;
    font-weight: 400;
    position: relative;
}

.nav-tab::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.nav-tab:hover {
    color: rgba(255, 255, 255, 0.8);
}

.nav-tab:hover::before {
    border-color: rgba(184, 134, 11, 0.3);
}

.nav-tab.active {
    color: #ffffff;
}

.nav-tab.active::before {
    border-color: rgba(184, 134, 11, 0.5);
}

.tab-view {
    display: none;
}

.tab-view.active {
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0px 40px 40px 40px;
    position: relative;
    z-index: 1;
}

h1 {
    color: #ffffff;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 300;
    letter-spacing: 2px;
}

.form-section {
    margin-bottom: 40px;
}

input[type="text"],
select {
    width: 100%;
    padding: 16px 20px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    font-size: 16px;
    color: #ffffff;
    transition: all 0.3s;
}

input[type="text"]::placeholder {
    color: #666;
}

input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: rgba(184, 134, 11, 0.4);
    background: #222;
    box-shadow: 0 0 20px rgba(184, 134, 11, 0.1);
}

label {
    display: block;
    color: #888;
    margin-top: 20px;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.color-identity-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    margin-bottom: 10px;
}

.color-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0 !important;
}

.color-checkbox input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.color-indicator {
    color: #fff;
    font-size: 14px;
    user-select: none;
}

.color-indicator.white { color: #f0f0f0; }
.color-indicator.blue { color: #4a9eff; }
.color-indicator.black { color: #a0a0a0; }
.color-indicator.red { color: #ff6b6b; }
.color-indicator.green { color: #6bcf7f; }

.search-results {
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    display: none;
}

.search-results.active {
    display: block;
}

.result-item {
    display: flex;
    align-items: center;
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #2a2a2a;
    transition: background-color 0.2s;
}

.result-item:hover {
    background-color: #252525;
}

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

.result-item img {
    width: 60px;
    height: 84px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.result-item .card-info {
    flex: 1;
}

.result-item .card-name {
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 4px;
}

.result-item .card-type {
    font-size: 14px;
    color: #888;
}

.collection-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .collection-metrics-grid {
        grid-template-columns: 1fr;
    }
}

.metric-card-collection {
    background: #1a1a1a;
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.metric-card-collection:hover {
    border-color: rgba(184, 134, 11, 0.5);
    transform: translateY(-4px) rotateX(5deg) rotateY(5deg);
    box-shadow: 0 8px 20px rgba(184, 134, 11, 0.25);
}

.metric-card-collection.chart-card {
    grid-column: span 2;
}

@media (max-width: 1024px) {
    .metric-card-collection.chart-card {
        grid-column: span 1;
    }
}

.metric-value {
    font-size: 48px;
    font-weight: 200;
    color: #ffffff;
    margin-bottom: 8px;
}

.metric-value-small {
    font-size: 16px;
    font-weight: 300;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.6;
}

.metric-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metric-detail {
    font-size: 10px;
    color: #666;
    margin-top: 8px;
    line-height: 1.4;
}

.commander-timeline-section {
    margin-bottom: 40px;
}

.chart-container-small {
    height: 220px;
    width: 100%;
    position: relative;
    margin-top: 12px;
}

.chart-container-medium {
    height: 300px;
    position: relative;
    background: #1a1a1a;
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 8px;
    padding: 20px;
}

.color-filters {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

.color-filter-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.color-filter-dot:hover {
    opacity: 1;
    transform: scale(1.1);
}

.color-filter-dot.active {
    opacity: 1;
    border-color: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.color-filter-dot.white {
    background: linear-gradient(135deg, #f9f6e8 0%, #e8dfc0 100%);
}

.color-filter-dot.blue {
    background: linear-gradient(135deg, #0e68ab 0%, #0a4a7a 100%);
}

.color-filter-dot.black {
    background: linear-gradient(135deg, #150b00 0%, #000000 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.color-filter-dot.black.active {
    border-color: #ffffff;
}

.color-filter-dot.red {
    background: linear-gradient(135deg, #d3202a 0%, #a10f16 100%);
}

.color-filter-dot.green {
    background: linear-gradient(135deg, #00733e 0%, #004d29 100%);
}

/* Recent commanders section */
.recent-commanders-section {
    margin: 30px 0 40px 0;
}

.recent-commanders-section .section-title {
    font-size: 18px;
    font-weight: 300;
    color: rgba(184, 134, 11, 0.8);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.recent-commanders-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 20px;
}

.recent-commander-tile {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(30, 30, 30, 0.98) 100%);
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.recent-commander-tile:hover {
    border-color: rgba(184, 134, 11, 0.5);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.15);
    transform: translateY(-2px);
}

.recent-commander-image-container {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.recent-commander-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.recent-commander-info {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
}

.recent-commander-name {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.recent-commander-player {
    font-size: 13px;
    color: rgba(184, 134, 11, 0.7);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recent-commander-game {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* Responsive design for recent commanders */
@media (max-width: 1024px) {
    .recent-commanders-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .recent-commanders-metrics {
        grid-template-columns: 1fr;
    }
}

.player-metrics {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.player-metric {
    background: #1a1a1a;
    border: 1px solid rgba(184, 134, 11, 0.15);
    border-radius: 4px;
    padding: 20px 28px;
    min-width: 140px;
    cursor: pointer;
    transition: all 0.3s;
}

.player-metric:hover {
    border-color: rgba(184, 134, 11, 0.4);
    background: rgba(184, 134, 11, 0.05);
}

.player-metric.active {
    border-color: rgba(184, 134, 11, 0.8);
    background: rgba(184, 134, 11, 0.15);
    box-shadow: 0 0 20px rgba(184, 134, 11, 0.2);
}

.player-metric .player-name {
    font-size: 14px;
    color: rgba(184, 134, 11, 0.6);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 11px;
}

.player-metric .player-count {
    font-size: 36px;
    font-weight: 200;
    color: #ffffff;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.growth-indicator {
    font-size: 14px;
    color: rgba(184, 134, 11, 0.9);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.latest-commanders {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    justify-content: center;
}

.latest-commander-img {
    width: 50px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(184, 134, 11, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.latest-commander-img:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.4);
    z-index: 10;
    position: relative;
}

.selected-card {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    margin-bottom: 20px;
}

.selected-card img {
    width: 100px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 20px;
}

.selected-card .card-info h4 {
    color: #ffffff;
    margin-bottom: 8px;
    font-weight: 400;
}

.selected-card .card-info p {
    color: #888;
    font-size: 14px;
}

.art-variants {
    margin-top: 20px;
}

.art-variant-item {
    display: inline-block;
    margin: 10px;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.art-variant-item:hover {
    border-color: #4a4a4a;
}

.art-variant-item.selected {
    border-color: rgba(184, 134, 11, 0.8);
    box-shadow: 0 0 15px rgba(184, 134, 11, 0.4);
}

.art-variant-item img {
    width: 120px;
    height: 168px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.art-variant-item .set-name {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.btn-confirm {
    width: 100%;
    padding: 16px;
    background: rgba(184, 134, 11, 0.15);
    color: rgba(184, 134, 11, 1);
    border: 1px solid rgba(184, 134, 11, 0.4);
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.btn-confirm:hover {
    background: rgba(184, 134, 11, 0.25);
    border-color: rgba(184, 134, 11, 0.6);
    box-shadow: 0 0 20px rgba(184, 134, 11, 0.2);
}

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

.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.message.success {
    background-color: #1a2e1a;
    color: #7ed87e;
    border: 1px solid #2a4a2a;
    display: block;
}

.message.error {
    background-color: #2e1a1a;
    color: #e87e7e;
    border: 1px solid #4a2a2a;
    display: block;
}

.existing-commanders {
    margin-top: 40px;
}

#commandersList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.commander-item {
    background: #1a1a1a;
    border: none;
    border-radius: 4px;
    overflow: hidden;
    cursor: default;
    will-change: transform, opacity;
}

.commander-item:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.commander-item .card-image-container {
    width: 100%;
    height: 280px;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
}

.commander-item .card-image {
    width: 100%;
    height: 280px;
    object-fit: contain;
    background: #0a0a0a;
}

.commander-item .partner-cards {
    position: relative;
    width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.commander-item .partner-cards .card-image {
    position: absolute;
    width: 100%;
    height: 280px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.commander-item .partner-cards .card-image:first-child {
    z-index: 2;
}

.commander-item .partner-cards .card-image:last-child {
    z-index: 1;
}

.commander-item:hover .partner-cards .card-image:first-child {
    transform: translateX(-30px) rotate(-5deg);
}

.commander-item:hover .partner-cards .card-image:last-child {
    transform: translateX(30px) rotate(5deg);
}

.commander-item .info {
    padding: 12px;
}

.commander-item .name-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.commander-item .name {
    font-weight: 400;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.3;
}

.commander-item .edhrec-data {
    font-size: 10px;
    color: #888;
    font-weight: 400;
}

.commander-item .meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.commander-item .color-circles {
    display: flex;
    gap: 3px;
}

.commander-item .color-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.commander-item .color-circle.white {
    background: linear-gradient(135deg, #f9f6e8 0%, #e8dfc0 100%);
}

.commander-item .color-circle.blue {
    background: linear-gradient(135deg, #0e68ab 0%, #0a4a7a 100%);
}

.commander-item .color-circle.black {
    background: linear-gradient(135deg, #150b00 0%, #000000 100%);
}

.commander-item .color-circle.red {
    background: linear-gradient(135deg, #d3202a 0%, #a10f16 100%);
}

.commander-item .color-circle.green {
    background: linear-gradient(135deg, #00733e 0%, #004d29 100%);
}

.commander-item .game-count {
    font-size: 10px;
    color: #666;
    font-weight: 400;
}

.commander-item .player {
    font-size: 11px;
    color: #666;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.commander-item .deck-link {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.commander-item .deck-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Maven Dashboard Styles */
.maven-title {
    text-align: center;
    color: #ffffff;
    font-size: 36px;
    font-weight: 200;
    letter-spacing: 3px;
    margin-bottom: 50px;
    text-transform: uppercase;
}

.maven-section {
    margin-bottom: 60px;
}

.section-title {
    color: rgba(184, 134, 11, 1);
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 2px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(184, 134, 11, 0.3);
    text-transform: uppercase;
}

.section-header-with-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header-with-button .section-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.btn-add-commander {
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.2), rgba(184, 134, 11, 0.3));
    border: 1px solid rgba(184, 134, 11, 0.5);
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(184, 134, 11, 1);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-add-commander:hover {
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.3), rgba(184, 134, 11, 0.4));
    border-color: rgba(184, 134, 11, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.2);
}

.btn-add-commander:active {
    transform: translateY(0);
}

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

.stat-card {
    background: #1a1a1a;
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 8px;
    padding: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.stat-card:hover {
    border-color: rgba(184, 134, 11, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(184, 134, 11, 0.2);
}

.stat-card-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px 8px 0 0;
    background: #0a0a0a;
    flex-shrink: 0;
}

/* Compact Commander Cards */
.compact-commander-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, 200px);
    gap: 16px;
    justify-content: center;
}

.compact-commander-card {
    background: #1a1a1a;
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 8px;
    padding: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    width: 200px;
}

.compact-commander-card:hover {
    border-color: rgba(184, 134, 11, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(184, 134, 11, 0.2);
}

.compact-commander-card.expanded {
    border-color: rgba(184, 134, 11, 0.7);
}

.compact-commander-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px 8px 0 0;
    background: #0a0a0a;
    flex-shrink: 0;
}

.compact-commander-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.compact-commander-name-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-bottom: 1px solid rgba(184, 134, 11, 0.2);
    padding-bottom: 12px;
}

.compact-commander-name {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
}

.compact-commander-owner {
    font-size: 13px;
    color: #888;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 6px;
}

.compact-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.compact-stat-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: #0a0a0a;
    border-radius: 4px;
}

.compact-stat-value {
    font-size: 24px;
    font-weight: 300;
    color: rgba(184, 134, 11, 0.9);
}

.compact-stat-label {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.compact-stat-detail {
    font-size: 11px;
    color: #888;
}

.compact-expand-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    background: rgba(184, 134, 11, 0.1);
    border-radius: 4px;
    color: rgba(184, 134, 11, 0.9);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.compact-commander-card:hover .compact-expand-button {
    background: rgba(184, 134, 11, 0.2);
}

.elimination-methods-list {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(184, 134, 11, 0.2);
    display: none;
}

.elimination-methods-list.visible {
    display: block;
}

.elimination-method-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #0a0a0a;
    border-radius: 4px;
    margin-bottom: 6px;
}

.elimination-method-name {
    color: #ccc;
    font-size: 13px;
}

.elimination-method-count {
    color: rgba(184, 134, 11, 0.9);
    font-weight: 500;
    font-size: 15px;
}

@media (max-width: 1200px) {
    .compact-commander-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .compact-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .compact-stat-block {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

@media (max-width: 600px) {
    .compact-commander-list {
        grid-template-columns: 1fr;
    }
}

.stat-card-content {
    padding: 12px 16px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.stat-card-name {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 300;
    color: rgba(184, 134, 11, 1);
    margin-bottom: 4px;
}

.stat-card-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-detail {
    font-size: 12px;
    color: #aaa;
    margin-top: 8px;
}

.player-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.player-stat-item {
    background: #1a1a1a;
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 8px;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.player-stat-item:hover {
    border-color: rgba(184, 134, 11, 0.5);
    transform: translateX(4px);
}

.player-stat-card {
    background: #1a1a1a;
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 8px;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.player-stat-card:hover {
    border-color: rgba(184, 134, 11, 0.5);
    transform: translateX(4px);
}

.player-win-rate-content {
    flex: 1;
}

.player-win-rate-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.trend-icon {
    font-size: 20px;
    font-weight: bold;
}

.trend-icon.trend-up {
    color: #4ade80;
}

.trend-icon.trend-down {
    color: #f87171;
}

.trend-icon.trend-neutral {
    color: #94a3b8;
}

.trend-label {
    color: #888;
    font-size: 11px;
}

.player-sparkline {
    display: block;
}

.player-stat-name {
    font-size: 18px;
    font-weight: 400;
    color: #ffffff;
}

.player-stat-value {
    font-size: 32px;
    font-weight: 300;
    color: rgba(184, 134, 11, 1);
}

.player-stat-detail {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

.outlier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.outlier-card {
    background: #1a1a1a;
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 6px;
    padding: 12px 14px;
    transition: all 0.3s ease;
}

.outlier-card:hover {
    border-color: rgba(184, 134, 11, 0.5);
}

.outlier-title {
    font-size: 12px;
    font-weight: 500;
    color: rgba(184, 134, 11, 1);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.outlier-content {
    font-size: 14px;
    color: #ffffff;
    line-height: 1.4;
}

.outlier-detail {
    font-size: 11px;
    color: #888;
    margin-top: 6px;
}

.radar-chart-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #1a1a1a;
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 8px;
}

.elimination-methods-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 100%;
}

#eliminationMethods {
    max-width: 860px !important;
}

.elimination-method-card {
    background: #1a1a1a;
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 6px;
    padding: 8px;
    transition: all 0.3s ease;
    min-width: 0;
    overflow: hidden;
}

.elimination-method-card:hover {
    border-color: rgba(184, 134, 11, 0.5);
    transform: translateY(-2px);
}

.method-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(184, 134, 11, 0.2);
}

.method-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.method-card-image {
    width: 30px;
    height: 42px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid rgba(184, 134, 11, 0.3);
}

.method-name {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
}

.method-count {
    font-size: 18px;
    font-weight: 300;
    color: rgba(184, 134, 11, 1);
}

.method-sparkline {
    display: block;
    opacity: 0.7;
}

.method-commanders,
.method-top-player {
    margin-bottom: 8px;
}

.method-label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.method-value {
    font-size: 12px;
    color: #ffffff;
    line-height: 1.4;
}

.method-breakdown {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(184, 134, 11, 0.1);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #aaa;
}

.breakdown-item span:last-child {
    color: rgba(184, 134, 11, 0.8);
    font-weight: 500;
}

@media (max-width: 768px) {
    .stat-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .outlier-grid {
        grid-template-columns: 1fr;
    }
    
    .maven-title {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 16px;
    }
}

/* Mages Dashboard Styles */
.mages-title {
    text-align: center;
    color: #ffffff;
    font-size: 36px;
    font-weight: 200;
    letter-spacing: 3px;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.player-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0 0 20px 0;
    border-bottom: 1px solid rgba(184, 134, 11, 0.2);
    margin-bottom: 20px;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.maven-subtabs {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 0 0 20px 0;
    border-bottom: 1px solid rgba(184, 134, 11, 0.2);
    margin-bottom: 15px;
}

.maven-subtab {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    padding: 10px 20px;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 400;
    position: relative;
    cursor: pointer;
}

.maven-subtab:hover {
    color: rgba(255, 255, 255, 0.8);
}

.maven-subtab.active {
    color: #b8860b;
    border-bottom: 2px solid #b8860b;
}

.maven-subtab-content {
    display: none;
}

.maven-subtab-content.active {
    display: block;
}

.elimination-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.elimination-filters-wrapper {
    margin-bottom: 30px;
}

.player-filters-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.player-filter-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(184, 134, 11, 0.3);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.player-filter-card:hover {
    border-color: rgba(184, 134, 11, 0.6);
    background: rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.2);
}

.player-filter-card.active {
    background: rgba(184, 134, 11, 0.15);
    border-color: #b8860b;
    box-shadow: 0 0 15px rgba(184, 134, 11, 0.3);
}

.player-filter-land {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid rgba(184, 134, 11, 0.3);
    flex-shrink: 0;
}

.player-filter-land-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    background: rgba(184, 134, 11, 0.1);
    border: 1px solid rgba(184, 134, 11, 0.3);
    flex-shrink: 0;
}

.player-filter-content {
    flex: 1;
    min-width: 0;
}

.player-filter-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.player-filter-name {
    font-size: 16px;
    font-weight: 600;
    color: #e0e0e0;
}

.player-filter-colors {
    display: flex;
    gap: 4px;
    align-items: center;
}

.player-filter-insights {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.player-filter-insight {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-filter-btn {
    background: transparent;
    border: 1px solid rgba(184, 134, 11, 0.3);
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.player-filter-btn:hover {
    border-color: rgba(184, 134, 11, 0.6);
    color: rgba(255, 255, 255, 0.9);
}

.player-filter-btn.active {
    background: rgba(184, 134, 11, 0.2);
    border-color: #b8860b;
    color: #b8860b;
}

.elimination-chart-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 40px;
}

.elimination-trend-chart-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 40px;
    height: 400px;
}

.player-tab {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 400;
    position: relative;
    border: 1px solid transparent;
    border-radius: 4px;
}

.player-tab:hover {
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(184, 134, 11, 0.3);
}

.player-tab.active {
    color: #ffffff;
    background: rgba(184, 134, 11, 0.1);
    border-color: rgba(184, 134, 11, 0.5);
}

.player-tab-name {
    font-size: 16px;
}

.player-tab-colors {
    display: flex;
    gap: 4px;
    height: 12px;
    min-height: 12px;
}

.player-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.2s ease;
}

.player-color-dot:hover {
    transform: scale(1.2);
}

.player-color-dot.w {
    background: linear-gradient(135deg, #f0e68c, #fff9e6);
}

.player-color-dot.u {
    background: linear-gradient(135deg, #0e68ab, #6bb6ff);
}

.player-color-dot.b {
    background: linear-gradient(135deg, #1e1e1e, #4a4a4a);
}

.player-color-dot.r {
    background: linear-gradient(135deg, #d3202a, #ff6b6b);
}

.player-color-dot.g {
    background: linear-gradient(135deg, #00733e, #4ade80);
}

.player-dashboard {
    min-height: 400px;
    overflow: visible;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

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

.dashboard-grid-compact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .dashboard-grid-compact {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .dashboard-grid-compact {
        grid-template-columns: 1fr;
    }
}

.dashboard-stat-card {
    background: #1a1a1a;
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 8px;
    padding: 24px;
    transition: all 0.3s ease;
}

.dashboard-stat-card-compact {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(30, 30, 30, 0.98) 100%);
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 10px;
    padding: 18px;
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.dashboard-stat-card-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(184, 134, 11, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-stat-card-compact:hover::before {
    opacity: 1;
}

.dashboard-stat-card-compact:hover {
    border-color: rgba(184, 134, 11, 0.5);
    transform: translateY(-4px) rotateX(5deg) rotateY(5deg);
    box-shadow: 0 8px 20px rgba(184, 134, 11, 0.25);
}

.stat-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stat-card-icon {
    font-size: 20px;
    line-height: 1;
}

.stat-card-title {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.stat-card-value {
    font-size: 32px;
    font-weight: 300;
    color: rgba(184, 134, 11, 1);
    margin-bottom: 8px;
    line-height: 1;
}

.stat-card-trend {
    font-size: 12px;
    color: #aaa;
    line-height: 1.4;
}

.stat-card-trend .trend-value {
    font-weight: 600;
    color: rgba(184, 134, 11, 0.9);
}

.stat-value-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.stat-chart-inline {
    width: 120px;
    height: 50px;
    flex-shrink: 0;
}

.dashboard-stat-card:hover {
    border-color: rgba(184, 134, 11, 0.5);
}

.dashboard-stat-title {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.dashboard-stat-value {
    font-size: 36px;
    font-weight: 300;
    color: rgba(184, 134, 11, 1);
    margin-bottom: 8px;
}

.dashboard-stat-detail {
    font-size: 14px;
    color: #aaa;
}

.color-distribution {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.color-bar {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    position: relative;
}

.color-bar.white {
    background: linear-gradient(135deg, #f9f6e8 0%, #e8dfc0 100%);
}

.color-bar.blue {
    background: linear-gradient(135deg, #0e68ab 0%, #0a4a7a 100%);
}

.color-bar.black {
    background: linear-gradient(135deg, #150b00 0%, #000000 100%);
}

.color-bar.red {
    background: linear-gradient(135deg, #d3202a 0%, #a10f16 100%);
}

.color-bar.green {
    background: linear-gradient(135deg, #00733e 0%, #004d29 100%);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.chart-section {
    background: #1a1a1a;
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 32px;
}

.chart-section.small {
    margin-bottom: 0;
}

.chart-title {
    font-size: 18px;
    color: rgba(184, 134, 11, 1);
    font-weight: 400;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.chart-container {
    position: relative;
    height: 400px;
}

.chart-container.small {
    height: 250px;
}


.chart-subtitle {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin-top: 10px;
    font-style: italic;
}

.narrative-section {
    background: #1a1a1a;
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 8px;
    padding: 32px;
    margin-bottom: 32px;
}

.narrative-content {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.8;
    font-weight: 300;
    white-space: pre-line;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 32px;
    margin-bottom: 32px;
}

.insight-card {
    background: #1a1a1a;
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.insight-card:hover {
    border-color: rgba(184, 134, 11, 0.5);
    transform: translateY(-2px);
}

.insight-card-title {
    font-size: 13px;
    color: rgba(184, 134, 11, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.insight-card-value {
    font-size: 24px;
    font-weight: 300;
    color: #ffffff;
    margin-bottom: 8px;
}

.insight-card-description {
    font-size: 13px;
    color: #888;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .player-tabs {
        gap: 8px;
    }
    
    .player-tab {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 300px;
    }
    
    .mages-title {
        font-size: 24px;
    }
}

.comparison-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(184, 134, 11, 0.15);
}

.comparison-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.comparison-player {
    font-size: 11px;
    color: #888;
    min-width: 60px;
    text-align: right;
}

.comparison-bar-container {
    flex: 1;
    position: relative;
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.comparison-bar {
    height: 100%;
    background: linear-gradient(90deg, rgba(184, 134, 11, 0.3) 0%, rgba(184, 134, 11, 0.5) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.comparison-value {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #fff;
    font-weight: 500;
}

/* Matchups Page Styles */
.matchups-section {
    margin-bottom: 50px;
}

.sol-ring-analysis {
    margin-top: 20px;
}

.sol-ring-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.sol-ring-card {
    background: #1a1a1a;
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 8px;
    padding: 20px;
}

.sol-ring-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #b8860b;
    margin-bottom: 15px;
}

.sol-ring-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sol-ring-stat-row:last-child {
    border-bottom: none;
}

.sol-ring-label {
    color: #888;
    font-size: 14px;
}

.sol-ring-value {
    color: #fff;
    font-weight: 500;
    font-size: 16px;
}

.sol-ring-value.positive {
    color: #4caf50;
}

.sol-ring-value.negative {
    color: #ff6b6b;
}

.sol-ring-impact {
    border: 2px solid rgba(184, 134, 11, 0.4);
}

.sol-ring-insight {
    margin-top: 15px;
    padding: 12px;
    background: rgba(184, 134, 11, 0.1);
    border-radius: 6px;
    color: #b8860b;
    font-size: 14px;
    line-height: 1.5;
}

.matchups-grid {
    margin-top: 20px;
}

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

@media (max-width: 768px) {
    .matchup-cards {
        grid-template-columns: 1fr;
    }
}

.matchup-card {
    background: #1a1a1a;
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.2s, border-color 0.2s;
}

.matchup-card:hover {
    transform: translateY(-2px);
    border-color: rgba(184, 134, 11, 0.4);
}

.matchup-commanders {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.matchup-commander {
    flex: 1;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.matchup-commander.favorite {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
}

.matchup-commander.underdog {
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.3);
}

.matchup-commander-name {
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
    font-size: 14px;
}

.matchup-win-rate {
    font-size: 12px;
    color: #888;
}

.matchup-vs {
    font-weight: 700;
    color: #b8860b;
    font-size: 18px;
    flex-shrink: 0;
}

.matchup-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #888;
    font-size: 12px;
}

.matchup-favorite-badge {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.matchup-even-badge {
    background: rgba(184, 134, 11, 0.2);
    color: #b8860b;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.matchup-cards-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 24px;
}

.matchup-card-compact {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(30, 30, 30, 0.95));
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.matchup-card-compact:hover {
    transform: translateY(-3px);
    border-color: rgba(184, 134, 11, 0.5);
    box-shadow: 0 8px 24px rgba(184, 134, 11, 0.15);
}

.matchup-header-compact {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.matchup-commander-mini {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.matchup-commander-mini.favorite {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
}

.commander-mini-img {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid rgba(184, 134, 11, 0.3);
    background: #0a0a0a;
    flex-shrink: 0;
}

.commander-mini-info {
    flex: 1;
    min-width: 0;
}

.commander-mini-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffd60a;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.commander-mini-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.win-rate-highlight {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.win-count {
    color: #888;
    font-size: 12px;
}

.matchup-vs-compact {
    font-size: 14px;
    font-weight: 700;
    color: #666;
    flex-shrink: 0;
}

.matchup-chart-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.matchup-line-chart {
    width: 100%;
    height: 60px;
    display: block;
}

.matchup-meta-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.favorite-badge {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.even-badge {
    background: rgba(255, 255, 255, 0.05);
    color: #888;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.section-header-with-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.game-range-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.range-filter-btn {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(184, 134, 11, 0.3);
    color: #888;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.range-filter-btn:hover {
    background: rgba(184, 134, 11, 0.1);
    border-color: rgba(184, 134, 11, 0.5);
    color: #b8860b;
}

.range-filter-btn.active {
    background: rgba(184, 134, 11, 0.2);
    border-color: #b8860b;
    color: #ffd60a;
    font-weight: 600;
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

/* Tablet and below (768px) */
@media (max-width: 768px) {
    /* Collection page metrics */
    .metrics-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    /* Maven dashboard cards */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .elimination-methods-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    }
    
    /* Mages player dashboard */
    .player-stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Matchups page */
    .sol-ring-cards {
        grid-template-columns: 1fr !important;
    }
    
    .matchups-grid {
        grid-template-columns: 1fr !important;
    }
    
    .matchup-cards-compact {
        grid-template-columns: 1fr !important;
    }
    
    .matchup-header-compact {
        flex-direction: column;
        gap: 10px;
    }
    
    .matchup-vs-compact {
        transform: rotate(90deg);
    }
    
    /* Header navigation */
    .tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .tab {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    /* Player tabs in Mages */
    .player-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .player-tab {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    /* Card images */
    .card-image-container {
        max-width: 100%;
    }
    
    /* Stat cards with images */
    .stat-card-with-image {
        flex-direction: column;
    }
    
    .stat-card-with-image .card-image-container {
        margin-bottom: 1rem;
    }
    
    /* Radar chart container */
    .radar-chart-container {
        max-width: 100%;
        margin: 0 auto;
    }
    
    /* Color filter buttons */
    .color-filters {
        gap: 0.5rem;
    }
    
    .color-btn {
        width: 36px;
        height: 36px;
    }
}

/* Mobile phones (480px) */
@media (max-width: 480px) {
    /* Further reduce card sizes */
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* Compact tabs */
    .tab, .player-tab {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Commander cards grid */
    .commanders-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    }
    
    /* Elimination methods grid */
    .elimination-methods-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Smaller chart labels */
    .chart-container {
        font-size: 0.85rem;
    }
    
    /* Compact color circles */
    .mana-dot {
        width: 16px;
        height: 16px;
    }
    
    /* Player filter buttons */
    .player-filter-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Small mobile (380px) */
@media (max-width: 380px) {
    .commanders-grid {
        grid-template-columns: 1fr !important;
    }
    
    .stat-card-with-image .card-image-container {
        max-width: 200px;
    }
    
    .tab, .player-tab {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
}

/* ========================================
   LAND ART SELECTION MODAL
   ======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.2s ease-in-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

.land-art-modal {
    padding: 0;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #ffd700;
    font-size: 1.5rem;
}

.modal-close {
    color: #888;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: #ffd700;
}

.modal-body {
    padding: 2rem;
}

.land-type-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.land-type-btn {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.land-type-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
}

.land-type-btn.active {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    color: #ffd700;
}

.land-arts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.land-art-option {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    border: 2px solid transparent;
}

.land-art-option:hover {
    transform: scale(1.05);
    border-color: rgba(255, 215, 0, 0.5);
}

.land-art-option.selected {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.land-art-option img {
    width: 100%;
    height: auto;
    display: block;
}

.land-art-checkmark {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ffd700;
    color: #000;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s;
}

.land-art-option.selected .land-art-checkmark {
    opacity: 1;
}

.select-land-art-btn {
    background: linear-gradient(135deg, #4a4a6a 0%, #2a2a3a 100%);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    margin-top: 1rem;
}

.select-land-art-btn:hover {
    background: linear-gradient(135deg, #5a5a7a 0%, #3a3a4a 100%);
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Player land art display */
.player-land-art {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid rgba(255, 215, 0, 0.3);
    margin-right: 8px;
    vertical-align: middle;
}

/* Badge Changes Section */
.badge-transfer-section {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
}

.badge-transfer-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffd700;
    margin-bottom: 0.75rem;
    text-align: center;
}

.badge-transfers {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Badge Transfer (Exclusive badges) */
.badge-transfer {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
    background: rgba(184, 134, 11, 0.1);
    border-left: 3px solid #b8860b;
    border-radius: 4px;
}

.badge-transfer-label {
    font-weight: 600;
    color: #ffd700;
    font-size: 0.85rem;
}

.badge-transfer-flow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.badge-transfer-from {
    color: rgba(255, 255, 255, 0.6);
}

.badge-transfer-arrow {
    color: #ffd700;
}

.badge-transfer-to {
    color: #ffd700;
    font-weight: 600;
}

.badge-transfer-count {
    color: rgba(255, 255, 255, 0.5);
    margin-left: auto;
}

/* Badge Achievement (Count-based) */
.badge-achievement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(100, 200, 100, 0.1);
    border-left: 3px solid #64c864;
    border-radius: 4px;
    font-size: 0.8rem;
}

.badge-achievement-icon {
    font-size: 1rem;
}

.badge-achievement-player {
    color: #ffd700;
    font-weight: 600;
}

.badge-achievement-label {
    color: rgba(255, 255, 255, 0.9);
}

.badge-achievement-detail {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* Signature Method Change */
.badge-signature-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(150, 100, 200, 0.1);
    border-left: 3px solid #9664c8;
    border-radius: 4px;
    font-size: 0.8rem;
}

.badge-signature-icon {
    font-size: 1rem;
}

.badge-signature-player {
    color: #ffd700;
    font-weight: 600;
}

.badge-signature-label {
    color: rgba(255, 255, 255, 0.9);
}

.badge-signature-count {
    color: rgba(255, 255, 255, 0.6);
}

.badge-signature-previous {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-style: italic;
}

/* Badge Tie */
.badge-tie {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(200, 150, 100, 0.1);
    border-left: 3px solid #c89664;
    border-radius: 4px;
    font-size: 0.8rem;
}

.badge-tie-icon {
    font-size: 1rem;
}

.badge-tie-players {
    color: #ffd700;
    font-weight: 600;
}

.badge-tie-label {
    color: rgba(255, 255, 255, 0.9);
}

.badge-tie-count {
    color: rgba(255, 255, 255, 0.6);
}

/* Streak Lost */
.badge-streak-lost {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(200, 100, 100, 0.1);
    border-left: 3px solid #c86464;
    border-radius: 4px;
    font-size: 0.8rem;
}

.badge-streak-icon {
    font-size: 1rem;
}

.badge-streak-player {
    color: #ffd700;
    font-weight: 600;
}

.badge-streak-label {
    color: rgba(255, 255, 255, 0.9);
}

.badge-streak-detail {
    color: rgba(255, 100, 100, 0.8);
    font-style: italic;
}

/* Analytics Tab Styles */
.analytics-header {
    margin-bottom: 2rem;
}

.analytics-input-section {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#analyticsQuestion {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(184, 134, 11, 0.3);
    border-radius: 8px;
    color: #e0e0e0;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 80px;
    transition: all 0.3s ease;
}

#analyticsQuestion:focus {
    outline: none;
    border-color: rgba(184, 134, 11, 0.6);
    background: rgba(255, 255, 255, 0.08);
}

#analyticsQuestion::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.analytics-response {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    max-height: 600px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.analytics-response::-webkit-scrollbar {
    width: 8px;
}

.analytics-response::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.analytics-response::-webkit-scrollbar-thumb {
    background: rgba(184, 134, 11, 0.3);
    border-radius: 4px;
}

.analytics-response::-webkit-scrollbar-thumb:hover {
    background: rgba(184, 134, 11, 0.5);
}

/* Commander Details Panel Scrollbar */
.commander-details-panel::-webkit-scrollbar {
    width: 5px;
}

.commander-details-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.commander-details-panel::-webkit-scrollbar-thumb {
    background: rgba(184, 134, 11, 0.25);
    border-radius: 4px;
}

.commander-details-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(184, 134, 11, 0.4);
}

/* Details Methods List Scrollbar */
.details-methods-list::-webkit-scrollbar {
    width: 4px;
}

.details-methods-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.details-methods-list::-webkit-scrollbar-thumb {
    background: rgba(184, 134, 11, 0.2);
    border-radius: 4px;
}

.details-methods-list::-webkit-scrollbar-thumb:hover {
    background: rgba(184, 134, 11, 0.35);
}

/* Modal Content Scrollbar */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(184, 134, 11, 0.25);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(184, 134, 11, 0.4);
}

/* Badge Modal, Deck Modal, and Matchup Modal Scrollbars */
.badge-modal-content::-webkit-scrollbar,
.deck-modal-content::-webkit-scrollbar,
.matchup-modal-content::-webkit-scrollbar {
    width: 6px;
}

.badge-modal-content::-webkit-scrollbar-track,
.deck-modal-content::-webkit-scrollbar-track,
.matchup-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.badge-modal-content::-webkit-scrollbar-thumb,
.deck-modal-content::-webkit-scrollbar-thumb,
.matchup-modal-content::-webkit-scrollbar-thumb {
    background: rgba(184, 134, 11, 0.25);
    border-radius: 4px;
}

.badge-modal-content::-webkit-scrollbar-thumb:hover,
.deck-modal-content::-webkit-scrollbar-thumb:hover,
.matchup-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(184, 134, 11, 0.4);
}

.analytics-welcome {
    padding: 1.5rem;
    background: rgba(184, 134, 11, 0.1);
    border-left: 4px solid rgba(184, 134, 11, 0.6);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
}

.analytics-message {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.analytics-message.user-message {
    background: rgba(100, 150, 200, 0.08);
    border-left: 3px solid rgba(100, 150, 200, 0.5);
}

.analytics-message.bot-message {
    background: rgba(184, 134, 11, 0.08);
    border-left: 3px solid rgba(184, 134, 11, 0.5);
}

.analytics-message.error-message {
    background: rgba(200, 50, 50, 0.08);
    border-left: 3px solid rgba(200, 50, 50, 0.5);
}

.message-header {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.message-content {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

.message-content p {
    margin-bottom: 0.5rem;
}

.message-content ul {
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.message-content li {
    margin-bottom: 0.25rem;
}

.message-content strong {
    color: rgba(255, 255, 255, 0.95);
}

.analytics-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    margin-top: 1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(184, 134, 11, 0.1);
    border-top: 4px solid rgba(184, 134, 11, 0.6);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.analytics-loading p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .analytics-response {
        max-height: 400px;
    }
    
    #analyticsQuestion {
        min-height: 60px;
    }
}

/* Commander Performance Chart */
.commander-chart-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: all 0.3s ease-in-out;
}

.commander-chart-container {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 550px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease-in-out;
}

.commander-chart-tooltip {
    position: absolute;
    background: rgba(20, 20, 20, 0.98);
    border: 2px solid rgba(184, 134, 11, 0.6);
    border-radius: 12px;
    padding: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

.commander-tooltip-content {
    display: flex;
    gap: 15px;
    padding: 15px;
}

.commander-tooltip-image {
    width: 150px;
    height: auto;
    border-radius: 8px;
    border: 2px solid rgba(184, 134, 11, 0.4);
    flex-shrink: 0;
}

.commander-tooltip-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.commander-tooltip-name {
    font-size: 16px;
    font-weight: 600;
    color: rgba(184, 134, 11, 1);
    line-height: 1.2;
}

.commander-tooltip-owner {
    font-size: 13px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
}

.commander-tooltip-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tooltip-stat {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 13px;
}

.tooltip-stat-label {
    color: #888;
    font-weight: 500;
}

.tooltip-stat-value {
    color: #ffffff;
    font-weight: 600;
    font-size: 15px;
}

.tooltip-stat-detail {
    color: #666;
    font-size: 12px;
}

.commander-tooltip-methods {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
}

.tooltip-methods-toggle {
    color: rgba(138, 43, 226, 0.9);
    font-size: 12px;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: background 0.2s;
    user-select: none;
}

.tooltip-methods-toggle:hover {
    background: rgba(138, 43, 226, 0.1);
}

.tooltip-methods-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.commander-tooltip-methods.expanded .tooltip-methods-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 8px;
}

.tooltip-method-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 4px;
}

.tooltip-method-name {
    font-size: 12px;
    color: #ddd;
}

.tooltip-method-count {
    font-size: 12px;
    font-weight: 600;
    color: rgba(184, 134, 11, 0.9);
}

/* Commander Details Panel */
.commander-details-panel {
    flex: 0 0 320px;
    width: 320px;
    background: rgba(20, 20, 20, 0.95);
    border: 2px solid rgba(184, 134, 11, 0.6);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    max-height: 550px;
    overflow-y: auto;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.commander-details-panel.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.details-panel-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.details-panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 17px;
    font-weight: 600;
    color: rgba(184, 134, 11, 1);
    margin-bottom: 6px;
}

.details-panel-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 20px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.details-panel-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.details-panel-owner {
    color: #888;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.details-panel-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.details-panel-image {
    width: 100%;
    max-width: 240px;
    height: auto;
    border-radius: 8px;
    border: 2px solid rgba(184, 134, 11, 0.4);
    align-self: center;
    transition: transform 0.2s ease;
}

.details-panel-image:hover {
    transform: scale(1.02);
}

.details-panel-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.details-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    transition: background 0.2s ease;
}

.details-stat-item:hover {
    background: rgba(0, 0, 0, 0.4);
}

.details-stat-label {
    color: #888;
    font-weight: 500;
    font-size: 13px;
}

.details-stat-value {
    color: #fff;
    font-weight: 600;
    font-size: 13px;
}

.details-panel-methods {
    flex: 1;
}

.details-panel-methods h4 {
    color: rgba(184, 134, 11, 0.9);
    font-size: 14px;
    margin-bottom: 10px;
}

.details-methods-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 250px;
    overflow-y: auto;
}

.details-method-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.details-method-item:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: translateX(2px);
}

.details-method-name {
    color: #ddd;
    font-size: 12px;
}

.details-method-count {
    color: rgba(184, 134, 11, 0.9);
    font-weight: 600;
    font-size: 12px;
}

/* Responsive layout for commander performance chart */
@media (max-width: 1024px) {
    .commander-chart-layout {
        flex-direction: column;
    }
    
    .commander-details-panel {
        flex: 1;
        width: 100%;
        max-width: 100%;
        transform: translateY(20px);
    }
    
    .commander-details-panel.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
    
    .commander-chart-container {
        height: 550px;
    }
}

/* Matchup Modal Styles */
.matchup-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.2s ease-in-out;
}

.matchup-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.matchup-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

.matchup-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.matchup-modal-title {
    margin: 0;
    color: #ffd700;
    font-size: 1.5rem;
}

.matchup-modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    padding: 0;
}

.matchup-modal-close:hover {
    color: #ffd700;
}

.matchup-modal-body {
    padding: 1.5rem 2rem;
}

.sol-ring-frequency {
    background: rgba(184, 134, 11, 0.1);
    border: 1px solid rgba(184, 134, 11, 0.3);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.frequency-stat {
    text-align: center;
}

.frequency-label {
    color: #b8860b;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.frequency-value {
    font-size: 32px;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 4px;
}

/* Expected badge clickable style */
.expected-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.expected-clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* Hide Matchups Tab and Races Tab */
.maven-subtab[data-subtab="matchups"],
#mavenMatchups,
.maven-subtab[data-subtab="races"],
#mavenRaces {
    display: none !important;
}

/* Compact Race Chart Container */
.race-chart-container-compact {
    height: 250px;
    max-width: 100%;
    margin: 0 auto;
}

/* Commander Debut Timeline Legend */
.debut-chart-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 15px 0;
    margin-top: 15px;
}

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

.debut-legend-land {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}

.debut-legend-square {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
}

/* Year Commanders Modal */
.year-commanders-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.year-commanders-modal.active {
    opacity: 1;
}

.year-commanders-modal-content {
    background: #1a1a1a;
    border: 1px solid rgba(184, 134, 11, 0.3);
    border-radius: 8px;
    padding: 0;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.year-commanders-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(184, 134, 11, 0.2);
    position: sticky;
    top: 0;
    background: #1a1a1a;
    z-index: 1;
}

.year-commanders-modal-header h3 {
    margin: 0;
    color: #ffd60a;
    font-size: 20px;
}

.year-commanders-modal-close {
    background: none;
    border: none;
    color: #b8860b;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.year-commanders-modal-close:hover {
    color: #ffd60a;
}

.year-commanders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 16px;
    padding: 20px;
}

@media (max-width: 768px) {
    .year-commanders-grid {
        grid-template-columns: 1fr;
    }
}

.year-commander-card {
    background: #0d0d0d;
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

.year-commander-card:hover {
    border-color: rgba(184, 134, 11, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.2);
}

.year-commander-rank {
    font-size: 18px;
    font-weight: bold;
    color: #b8860b;
    min-width: 35px;
}

.year-commander-img {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid rgba(184, 134, 11, 0.3);
}

.year-commander-info {
    flex: 1;
    min-width: 0;
}

.year-commander-name {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.year-commander-player {
    font-size: 13px;
    color: #b8860b;
    margin-bottom: 4px;
}

.year-commander-games {
    font-size: 12px;
    color: #888;
}

/* Leader Tiles (5-Color & Colorless) */
.leader-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.leader-land-art {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid rgba(184, 134, 11, 0.5);
    flex-shrink: 0;
}

.leader-name {
    font-size: 16px;
    font-weight: 600;
    color: #ffd60a;
}

.leader-count {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.leader-detail-text {
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
}

.leader-commanders {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

.leader-commander-thumb {
    width: 60px;
    height: 84px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid rgba(184, 134, 11, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.leader-commander-thumb:hover {
    transform: translateY(-4px) scale(1.05);
    border-color: rgba(184, 134, 11, 0.8);
    box-shadow: 0 6px 16px rgba(184, 134, 11, 0.4);
    z-index: 10;
}

/* ==================== */
/* AI Insights Section */
/* ==================== */

.ai-insights-section {
    margin: 30px 0 40px 0;
    padding: 25px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
    border-radius: 16px;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.insights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.insights-header .section-title {
    margin: 0;
    font-size: 24px;
    color: #ffd60a;
}

.insights-loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(139, 92, 246, 0.3);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.insights-loading p {
    color: #888;
    font-size: 14px;
}

.insights-error {
    text-align: center;
    padding: 40px 20px;
    color: #ef4444;
}

.insights-content {
    animation: fadeIn 0.5s ease-in;
}

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

.insights-summary {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    border-left: 4px solid #8b5cf6;
}

.summary-text {
    font-size: 16px;
    line-height: 1.6;
    color: #e0e0e0;
    margin-bottom: 12px;
}

.data-stats {
    font-size: 13px;
    color: #888;
    margin-top: 10px;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.insight-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.insight-card:hover {
    transform: translateY(-2px);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
}

.insight-card.impact-high {
    border-left: 4px solid #ef4444;
}

.insight-card.impact-medium {
    border-left: 4px solid #f59e0b;
}

.insight-card.impact-low {
    border-left: 4px solid #3b82f6;
}

.insight-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.insight-header h3 {
    margin: 0;
    font-size: 18px;
    color: #ffd60a;
    flex: 1;
}

.impact-badge {
    background: rgba(139, 92, 246, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    margin-left: 10px;
}

.impact-high .impact-badge {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.impact-medium .impact-badge {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.impact-low .impact-badge {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.insight-finding {
    font-size: 14px;
    line-height: 1.5;
    color: #d0d0d0;
    margin: 0 0 12px 0;
}

.insight-recommendation {
    background: rgba(139, 92, 246, 0.15);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #a78bfa;
    border-left: 3px solid #8b5cf6;
    margin-top: 12px;
}

.insights-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.chart-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-card .chart-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #ffd60a;
}

.chart-card canvas {
    max-height: 300px;
}

@media (max-width: 768px) {
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .insights-charts {
        grid-template-columns: 1fr;
    }
    
    .ai-insights-section {
        padding: 15px;
    }
}

/* All Badges View */
.all-badges-view {
  padding: 20px 0;
}

.all-badges-header {
  margin-bottom: 40px;
}

.player-land-arts-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.player-land-art-card {
  width: 120px;
  text-align: center;
}

.land-art-image {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid rgba(184, 134, 11, 0.3);
  margin-bottom: 8px;
}

.land-art-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #888;
  margin: 0 auto 8px;
}

.player-land-name {
  font-size: 14px;
  font-weight: 500;
  color: rgba(184, 134, 11, 0.9);
  margin-bottom: 4px;
}

.player-badge-count {
  font-size: 16px;
  font-weight: 400;
  color: #ffd700;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.25));
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 12px;
  padding: 4px 12px;
  display: inline-block;
  margin-top: 4px;
}

.player-badge-count.gold-medal {
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.4);
}

.player-badge-count.silver-medal {
  box-shadow: 0 0 20px rgba(192, 192, 192, 0.6), 0 0 30px rgba(192, 192, 192, 0.4);
  color: #c0c0c0;
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.15), rgba(192, 192, 192, 0.25));
  border-color: rgba(192, 192, 192, 0.4);
}

.player-badge-count.bronze-medal {
  box-shadow: 0 0 20px rgba(205, 127, 50, 0.6), 0 0 30px rgba(205, 127, 50, 0.4);
  color: #cd7f32;
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.15), rgba(205, 127, 50, 0.25));
  border-color: rgba(205, 127, 50, 0.4);
}

.badges-section {
  margin-bottom: 60px;
}

.badge-timeline-chart-container {
  height: 400px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(184, 134, 11, 0.1);
}

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

.badge-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(184, 134, 11, 0.2);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.badge-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(184, 134, 11, 0.5);
  transform: translateY(-2px);
}

.badge-emoji {
  font-size: 32px;
  margin-bottom: 12px;
}

.badge-label {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 8px;
}

.badge-current-owner {
  font-size: 13px;
  color: rgba(184, 134, 11, 0.9);
  margin-bottom: 6px;
}

.badge-history-count {
  font-size: 11px;
  color: #888;
}

.commander-badge-leaderboard {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  padding: 30px;
  border: 1px solid rgba(184, 134, 11, 0.1);
}

.all-colors {
  display: flex;
  gap: 4px;
  justify-content: center;
}

/* Commander Badge Leaderboard Styles */
.commander-leaderboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.commander-leaderboard-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(184, 134, 11, 0.2);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.3s ease;
}

.commander-leaderboard-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(184, 134, 11, 0.5);
  transform: translateY(-2px);
}

.leaderboard-rank {
  font-size: 24px;
  font-weight: 700;
  color: rgba(184, 134, 11, 0.7);
  min-width: 40px;
  text-align: center;
}

.leaderboard-commander-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.leaderboard-commander-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.commander-placeholder {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #888;
}

.leaderboard-commander-info {
  flex: 1;
}

.leaderboard-commander-name {
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 4px;
}

.leaderboard-commander-player {
  font-size: 14px;
  color: rgba(184, 134, 11, 0.8);
  margin-bottom: 8px;
}

.leaderboard-badge-stats {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #888;
}

.leaderboard-badge-count {
  color: rgba(184, 134, 11, 0.9);
  font-weight: 500;
}

/* Badge Directory View Toggle */
.badge-directory-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.view-toggle {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 4px;
  border: 1px solid rgba(184, 134, 11, 0.2);
}

.toggle-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.toggle-btn.active {
  background: rgba(184, 134, 11, 0.3);
  color: #b8860b;
}

.toggle-btn:hover:not(.active) {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.05);
}

/* Badge Timeline View Styles */
.badge-timeline-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.badge-timeline-row {
  display: grid;
  grid-template-columns: 200px 1fr 120px;
  gap: 20px;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(184, 134, 11, 0.1);
  border-radius: 8px;
  padding: 16px;
  transition: all 0.3s ease;
}

.badge-timeline-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(184, 134, 11, 0.3);
}

.badge-timeline-tag {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
}

.badge-sparkline {
  height: 40px;
  position: relative;
}

.badge-timeline-owner {
  text-align: right;
  font-size: 14px;
  color: rgba(184, 134, 11, 0.9);
}

.badge-timeline-owner.unclaimed {
  color: #888;
  font-style: italic;
}

/* Exclusive Badge Bars Styles */
.exclusive-badge-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exclusive-badge-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.exclusive-badge-tile {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(184, 134, 11, 0.1);
  border-radius: 6px;
  padding: 10px 12px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.exclusive-badge-tile:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(184, 134, 11, 0.3);
}

.badge-tile-header {
  border-left: 3px solid;
  padding-left: 8px;
  margin-bottom: 6px;
}

.badge-tile-label {
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
}

.badge-tile-owner {
  font-size: 12px;
  font-weight: 600;
  padding-left: 11px;
}

/* Compact badge tiles with rounded tags */
.exclusive-badge-tiles-compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
}

.exclusive-badge-tile-compact {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(184, 134, 11, 0.1);
  border-radius: 6px;
  padding: 8px 10px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.exclusive-badge-tile-compact:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(184, 134, 11, 0.3);
  transform: translateY(-1px);
}

.badge-tile-header-compact {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.badge-tile-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-tile-label-compact {
  font-size: 12px;
  font-weight: 500;
  color: #ffffff;
}

.badge-earn-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.badge-earn-tag {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
  border: 1px solid;
  transition: all 0.2s ease;
}

.badge-earn-tag.current-owner {
  font-weight: 600;
}

/* Player badge pills (used on individual player pages and All badges view) */
.player-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid;
}

.player-badge.clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.player-badge .badge-label-with-helper {
  color: rgba(255, 255, 255, 0.9);
}

.player-badge .badge-count {
  font-weight: 600;
  color: #ffffff;
}

.player-badge .badge-helper-text {
  font-size: 10px;
  opacity: 0.7;
  margin-left: 4px;
}

/* Badge type colors */
.player-badge.champion {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.25));
  border-color: rgba(255, 215, 0, 0.4);
  color: #ffd700;
}

.player-badge.elimination-milestone {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(220, 38, 38, 0.25));
  border-color: rgba(220, 38, 38, 0.4);
  color: #dc2626;
}

.player-badge.color-identity,
.player-badge.color-count {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.15), rgba(147, 51, 234, 0.25));
  border-color: rgba(147, 51, 234, 0.4);
  color: #9333ea;
}

.player-badge.archetype {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.25));
  border-color: rgba(59, 130, 246, 0.4);
  color: #3b82f6;
}

.player-badge.time-based {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(236, 72, 153, 0.25));
  border-color: rgba(236, 72, 153, 0.4);
  color: #ec4899;
}

.player-badge.game-ender {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(249, 115, 22, 0.25));
  border-color: rgba(249, 115, 22, 0.4);
  color: #f97316;
}

.player-badge.exclusive {
  border-width: 2px;
  border-style: double;
}

/* All badges grid layout - minimal/compact */
.all-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.badge-tile-with-owner {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.badge-tile-with-owner:hover {
  transform: translateY(-1px);
  filter: brightness(1.2);
}

.badge-owner-name {
  text-align: center;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.exclusive-badge-bars-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exclusive-badge-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(184, 134, 11, 0.1);
  border-radius: 6px;
  padding: 10px 12px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.exclusive-badge-bar-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(184, 134, 11, 0.3);
}

.badge-bar-label {
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  min-width: 140px;
  flex-shrink: 0;
}

.badge-bar-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.badge-stacked-bar {
  display: flex;
  width: 100%;
  height: 24px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.badge-bar-segment {
  height: 100%;
  transition: opacity 0.3s ease;
}

.badge-bar-segment:hover {
  opacity: 0.8;
}

.badge-bar-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #888;
}

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

/* Exclusive Ownership Timeline Styles */
.exclusive-ownership-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ownership-timeline-row {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(184, 134, 11, 0.1);
  border-radius: 8px;
  padding: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.ownership-timeline-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(184, 134, 11, 0.3);
}

.ownership-badge-info {
  min-width: 220px;
  flex-shrink: 0;
}

.ownership-badge-label {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 6px;
}

.ownership-current-owner {
  font-size: 12px;
  color: #888;
}

.ownership-current-owner strong {
  color: rgba(184, 134, 11, 0.9);
}

.ownership-sparkline-container {
  flex: 1;
  height: 50px;
}

/* Compact Commander Leaderboard Styles */
.commander-leaderboard-grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.commander-leaderboard-card-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(184, 134, 11, 0.2);
  border-radius: 8px;
  padding: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.commander-leaderboard-card-compact:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(184, 134, 11, 0.5);
  transform: translateY(-2px);
}

.leaderboard-rank-compact {
  font-size: 18px;
  font-weight: 700;
  color: rgba(184, 134, 11, 0.7);
  min-width: 30px;
  text-align: center;
}

.leaderboard-commander-image-compact {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.leaderboard-commander-image-compact img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leaderboard-commander-info-compact {
  flex: 1;
  min-width: 0;
}

.leaderboard-commander-name-compact {
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-badge-count-compact {
  font-size: 11px;
  color: rgba(184, 134, 11, 0.9);
  font-weight: 500;
}

/* Commander Debut Modal Styles */
.commander-debut-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.commander-debut-modal-content {
  background: linear-gradient(135deg, rgba(20, 20, 25, 0.98) 0%, rgba(26, 26, 32, 0.98) 100%);
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(184, 134, 11, 0.3);
}

.commander-debut-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid rgba(184, 134, 11, 0.2);
}

.commander-debut-modal-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.commander-debut-modal-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid rgba(184, 134, 11, 0.3);
}

.commander-debut-modal-title {
  font-size: 20px;
  font-weight: 500;
  color: #ffffff;
  margin: 0;
}

.commander-debut-modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(184, 134, 11, 0.3);
  color: #ffffff;
  font-size: 28px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.commander-debut-modal-close:hover {
  background: rgba(184, 134, 11, 0.3);
  border-color: rgba(184, 134, 11, 0.6);
  transform: rotate(90deg);
}

.commander-debut-modal-body {
  padding: 24px;
}

.debut-stat-group {
  margin-bottom: 24px;
}

.debut-stat-label {
  font-size: 12px;
  color: rgba(184, 134, 11, 0.8);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-weight: 500;
}

.debut-stat-value {
  font-size: 20px;
  color: #ffffff;
  font-weight: 500;
}

.color-impact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.color-impact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.color-impact-row.positive {
  border-color: rgba(72, 187, 120, 0.3);
  background: rgba(72, 187, 120, 0.05);
}

.color-impact-row.negative {
  border-color: rgba(245, 101, 101, 0.3);
  background: rgba(245, 101, 101, 0.05);
}

.color-impact-row.neutral {
  opacity: 0.6;
}

.color-impact-row .color-circle {
  flex-shrink: 0;
}

.color-name {
  flex: 1;
  font-size: 14px;
  color: #ffffff;
}

.color-change {
  font-size: 16px;
  font-weight: 600;
}

.color-impact-row.positive .color-change {
  color: #48bb78;
}

.color-impact-row.negative .color-change {
  color: #f56565;
}

.color-impact-row.neutral .color-change {
  color: #888;
}

.no-data {
  text-align: center;
  padding: 20px;
  color: #888;
  font-style: italic;
}

/* Badge Ownership Chart */
.badge-ownership-chart-container {
  margin: 20px 0;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(184, 134, 11, 0.2);
  border-radius: 8px;
}

.badge-ownership-chart-container .chart-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(184, 134, 11, 0.9);
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-timeline-items {
  max-height: 400px;
  overflow-y: auto;
  margin-top: 16px;
}

.timeline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid rgba(184, 134, 11, 0.3);
  border-radius: 4px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.timeline-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: rgba(184, 134, 11, 0.6);
}

.timeline-item.milestone {
  border-left-color: #ffd700;
  background: rgba(255, 215, 0, 0.05);
}

.timeline-game {
  font-size: 12px;
  color: #888;
  min-width: 80px;
}

.timeline-transfer {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.timeline-from {
  opacity: 0.7;
}

.timeline-arrow {
  color: #ffd700;
}

.timeline-to {
  font-weight: 600;
}

.timeline-count {
  font-size: 12px;
  color: #888;
  min-width: 40px;
  text-align: right;
}

.timeline-truncated {
  text-align: center;
  padding: 12px;
  color: #888;
  font-size: 12px;
  font-style: italic;
}

.timeline-stats {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: #888;
}

.no-timeline {
  text-align: center;
  padding: 40px;
  color: #888;
  font-style: italic;
}

/* Simplified history (for All page badge modals) */
.simplified-history {
  padding: 16px 0;
}

/* Player counts styling for achievement badges */
.player-counts {
  padding: 10px;
}

.counts-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(184, 134, 11, 1);
  margin-bottom: 12px;
  text-align: center;
}

.counts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.count-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(184, 134, 11, 0.1);
  transition: all 0.2s ease;
}

.count-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(184, 134, 11, 0.3);
}

.count-item.rank-1 {
  border-color: rgba(255, 215, 0, 0.4);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.count-item.rank-2 {
  border-color: rgba(192, 192, 192, 0.4);
  box-shadow: 0 0 10px rgba(192, 192, 192, 0.2);
}

.count-item.rank-3 {
  border-color: rgba(205, 127, 50, 0.4);
  box-shadow: 0 0 10px rgba(205, 127, 50, 0.2);
}

.count-player {
  font-size: 14px;
  font-weight: 500;
}

.count-value {
  font-size: 16px;
  font-weight: 700;
  color: rgba(184, 134, 11, 1);
}

.counts-total {
  text-align: center;
  font-size: 12px;
  color: #888;
  padding-top: 12px;
  border-top: 1px solid rgba(184, 134, 11, 0.1);
}

.no-counts {
  text-align: center;
  color: #888;
  font-size: 13px;
  padding: 20px;
}

.history-title {
  color: rgba(184, 134, 11, 1);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(184, 134, 11, 0.2);
}

.history-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
  font-size: 13px;
}

.history-game {
  color: #888;
  min-width: 80px;
  font-weight: 500;
}

.history-from {
  font-weight: 500;
}

.history-arrow {
  color: #ffd700;
}

.history-to {
  font-weight: 600;
}

.history-truncated {
  text-align: center;
  padding: 12px;
  color: #666;
  font-size: 12px;
  font-style: italic;
  margin-top: 8px;
}
