/* MLB The Show — Diamond Dynasty Companion Theme */

:root {
    --navy: #0a1628;
    --navy-light: #12203d;
    --navy-lighter: #1a2d52;
    --diamond-blue: #0078d4;
    --diamond-gold: #ffd700;
    --text-primary: #f0f0f0;
    --text-secondary: #94a3b8;
    --tier-common: #808080;
    --tier-bronze: #cd7f32;
    --tier-silver: #c0c0c0;
    --tier-gold: #ffd700;
    --tier-diamond: #00bfff;
}

/* Scrollbar styling */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* Header */
.header-bar {
    background: linear-gradient(180deg, #0e1e38 0%, var(--navy) 100%);
}

.diamond-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--diamond-blue), #005a9e);
    transform: rotate(45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    box-shadow: 0 0 12px rgba(0, 120, 212, 0.4);
}

.diamond-icon span {
    transform: rotate(-45deg);
}

/* Support / BMAC button */
.support-btn {
    background: linear-gradient(135deg, #ffdd00, #f5a623);
    color: #1a1a1a;
    font-weight: 700;
    border: none;
    cursor: pointer;
}
.support-btn:hover {
    background: linear-gradient(135deg, #f5a623, #ffdd00);
    box-shadow: 0 0 10px rgba(255, 221, 0, 0.35);
}

/* Tab Navigation */
.tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 6px 6px 0 0;
    border: 1px solid transparent;
    border-bottom: none;
    white-space: nowrap;
    transition: all 0.15s ease;
    cursor: pointer;
    background: transparent;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--navy-light);
}

.tab-btn.active {
    color: var(--diamond-blue);
    background: var(--navy-light);
    border-color: var(--navy-lighter);
    border-bottom-color: var(--navy-light);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Card components */
.dd-card {
    background: var(--navy-light);
    border: 1px solid var(--navy-lighter);
    border-radius: 10px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.dd-card:hover {
    border-color: var(--diamond-blue);
    box-shadow: 0 4px 20px rgba(0, 120, 212, 0.15);
    transform: translateY(-1px);
}

/* Player card style */
.player-card {
    background: linear-gradient(145deg, var(--navy-light), var(--navy-lighter));
    border: 2px solid var(--navy-lighter);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

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

.player-card.tier-common { border-top: 3px solid var(--tier-common); }
.player-card.tier-bronze { border-top: 3px solid var(--tier-bronze); }
.player-card.tier-silver { border-top: 3px solid var(--tier-silver); }
.player-card.tier-gold { border-top: 3px solid var(--tier-gold); }
.player-card.tier-diamond { border-top: 3px solid var(--tier-diamond); }

/* Tier badges */
.tier-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tier-badge.common { background: rgba(128,128,128,0.2); color: var(--tier-common); border: 1px solid var(--tier-common); }
.tier-badge.bronze { background: rgba(205,127,50,0.15); color: var(--tier-bronze); border: 1px solid var(--tier-bronze); }
.tier-badge.silver { background: rgba(192,192,192,0.15); color: var(--tier-silver); border: 1px solid var(--tier-silver); }
.tier-badge.gold { background: rgba(255,215,0,0.12); color: var(--tier-gold); border: 1px solid var(--tier-gold); }
.tier-badge.diamond { background: rgba(0,191,255,0.12); color: var(--tier-diamond); border: 1px solid var(--tier-diamond); }

/* Overall rating circle */
.ovr-badge {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    flex-shrink: 0;
}

.ovr-badge.common { background: linear-gradient(135deg, #555, #888); color: #fff; }
.ovr-badge.bronze { background: linear-gradient(135deg, #8B5E34, #D4944A); color: #fff; }
.ovr-badge.silver { background: linear-gradient(135deg, #8a8a8a, #d0d0d0); color: #1a1a1a; }
.ovr-badge.gold { background: linear-gradient(135deg, #c9a100, #ffe34d); color: #1a1a1a; }
.ovr-badge.diamond { background: linear-gradient(135deg, #0066b8, #00bfff); color: #fff; box-shadow: 0 0 10px rgba(0, 191, 255, 0.35); }

/* Stat bars */
.stat-bar-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.6875rem;
    color: var(--text-secondary);
    width: 50px;
    text-align: right;
    flex-shrink: 0;
}

.stat-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.stat-value {
    font-size: 0.75rem;
    font-weight: 600;
    width: 28px;
    text-align: right;
    flex-shrink: 0;
}

/* Stat bar color levels */
.stat-fill-low { background: linear-gradient(90deg, #ef4444, #f97316); }
.stat-fill-mid { background: linear-gradient(90deg, #f59e0b, #eab308); }
.stat-fill-good { background: linear-gradient(90deg, #22c55e, #16a34a); }
.stat-fill-elite { background: linear-gradient(90deg, var(--diamond-blue), #38bdf8); }

/* Filter bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--navy-light);
    border: 1px solid var(--navy-lighter);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.filter-bar select,
.filter-bar input[type="text"] {
    background: var(--navy);
    border: 1px solid var(--navy-lighter);
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s;
}

.filter-bar select:focus,
.filter-bar input[type="text"]:focus {
    border-color: var(--diamond-blue);
}

.filter-bar select option {
    background: var(--navy);
}

/* Quirk tags */
.quirk-tag {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: rgba(0, 120, 212, 0.12);
    border: 1px solid rgba(0, 120, 212, 0.25);
    border-radius: 9999px;
    font-size: 0.6875rem;
    color: var(--diamond-blue);
    margin: 0.125rem;
}

/* Risk level badges */
.risk-low { color: #22c55e; }
.risk-medium { color: #f59e0b; }
.risk-high { color: #ef4444; }
.risk-none { color: #94a3b8; }

/* Difficulty indicators */
.difficulty-bar {
    display: flex;
    gap: 2px;
}

.difficulty-pip {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: rgba(255,255,255,0.1);
}

.difficulty-pip.filled.easy { background: #22c55e; }
.difficulty-pip.filled.medium { background: #f59e0b; }
.difficulty-pip.filled.hard { background: #ef4444; }

/* Expand/collapse panels */
.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.expandable-content.expanded {
    max-height: 2000px;
}

/* Roster table */
.roster-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.8125rem;
}

.roster-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--navy-lighter);
}

.roster-table td {
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.roster-table tr:hover td {
    background: rgba(0, 120, 212, 0.05);
}

/* Tip cards */
.tip-card {
    background: var(--navy-light);
    border: 1px solid var(--navy-lighter);
    border-radius: 10px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.tip-card .tip-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 0;
}

.tip-card.expanded .tip-content {
    max-height: 500px;
    margin-top: 0.75rem;
}

/* Section headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-header .accent-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--diamond-blue), transparent);
}

/* Loading spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--diamond-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Grid layouts */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.card-grid-sm {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

/* Stubs display */
.stubs-display {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--diamond-gold);
    font-weight: 700;
}

.stubs-display::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background: var(--diamond-gold);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Category tags */
.category-tag {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 9999px;
    font-size: 0.6875rem;
    color: var(--diamond-gold);
}

/* Ad footer */
.ad-footer {
    background: var(--navy-light);
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
    .filter-bar {
        flex-direction: column;
    }
    .global-search {
        display: none;
    }
    .support-btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Series badges */
.series-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.series-live { background: rgba(34,197,94,0.15); color: #22c55e; }
.series-legend { background: rgba(168,85,247,0.15); color: #a855f7; }
.series-flashback { background: rgba(251,146,60,0.15); color: #fb923c; }
.series-awards { background: rgba(255,215,0,0.12); color: var(--diamond-gold); }
.series-milestone { background: rgba(56,189,248,0.15); color: #38bdf8; }
.series-signature { background: rgba(244,63,94,0.15); color: #f43f5e; }
.series-finest { background: rgba(217,70,239,0.15); color: #d946ef; }
.series-future { background: rgba(20,184,166,0.15); color: #14b8a6; }
.series-topps { background: rgba(239,68,68,0.15); color: #ef4444; }
.series-monthly { background: rgba(99,102,241,0.15); color: #6366f1; }
.series-postseason { background: rgba(249,115,22,0.15); color: #f97316; }
.series-allstar { background: rgba(234,179,8,0.15); color: #eab308; }
.series-default { background: rgba(148,163,184,0.15); color: #94a3b8; }
