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

body {
    font-family: 'Inter', sans-serif;
    background-color: #0b0e14;
    color: white;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.team-card {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    background-color: var(--primary-color, #222);
    position: relative;
    z-index: 10;
}

.team-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

/* Dynamic Glow Effect */
.team-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, var(--secondary-color), transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.team-card:hover::before {
    opacity: 0.25;
}

/* Glass highlight */
.team-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.team-card:hover::after {
    opacity: 1;
}

.team-card.nope-team {
    background-color: #161616 !important;
    filter: grayscale(0.9);
    opacity: 0.6;
}

.nope-team .team-label {
    color: rgba(255, 255, 255, 0.7) !important;
    /* Force light gray for visibility when grayscaled */
}

.team-card.nope-team:hover {
    background-color: var(--primary-color) !important;
    filter: grayscale(0);
    opacity: 1;
}

.nope-team:hover .team-label {
    color: var(--secondary-color) !important;
    /* Restore secondary color on hover */
}

.status-text {
    font-size: clamp(3rem, 7vw, 4.5rem);
    line-height: 0.85;
    letter-spacing: -0.05em;
    transition: all 0.5s ease;
}

.team-card:hover .status-text {
    text-shadow: 0 0 15px var(--secondary-color);
}

.asterisk-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0b0e14;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

/* Custom Range Slider (Dark Mode Default) */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    height: 4px;
    outline: none;
}

/* Light Mode Overrides for Slider */
.theme-light input[type=range] {
    background: rgba(0, 0, 0, 0.08);
}

/* Thumb Styles */
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

.theme-light input[type=range]::-webkit-slider-thumb {
    background: #020617;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Firefox Support */
input[type=range]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.theme-light input[type=range]::-moz-range-thumb {
    background: #020617;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.theme-light input[type=range]::-webkit-slider-thumb:hover {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

/* Detail View Overrides (Always use bright slider since team backgrounds are colored) */
#detail-view input[type=range] {
    background: rgba(255, 255, 255, 0.2);
}

#detail-view input[type=range]::-webkit-slider-thumb {
    background: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

#detail-view input[type=range]::-moz-range-thumb {
    background: white;
}

.hidden {
    display: none !important;
}

#detail-view {
    color: white;
}

/* History Styles */
.result-square {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    transition: transform 0.2s;
    cursor: help;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    overflow: hidden;
    position: relative;
}

.result-square:hover {
    transform: scale(1.2);
    z-index: 50; /* Higher than dh-slash */
}

/* Doubleheader Overlap */
.dh-group {
    display: flex;
    position: relative;
    align-items: center;
    gap: 0;
}

.dh-group .result-square {
    position: relative;
}

.dh-group .result-square:first-child {
    z-index: 10;
    clip-path: inset(0 10% 0 0); /* Crop right 10% */
    margin-right: -2.4px; /* Move left by the crop amount to touch */
}

.dh-group .result-square:last-child {
    z-index: 5;
    clip-path: inset(0 0 0 10%); /* Crop left 10% */
    margin-left: -2.4px; /* Move right by the crop amount to touch */
}

.result-square:hover {
    transform: scale(1.3);
    z-index: 100 !important;
    clip-path: none !important;
    border-radius: 4px !important;
    margin: 0 !important;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.result-w {
    background-color: #22c55e;
}

/* green-500 */
.result-l {
    background-color: #ef4444;
}

.result-p {
    background-color: #475569;
    /* slate-600 */
}

.storm-mark {
    font-size: 14px;
    opacity: 0.8;
    pointer-events: none;
}

/* red-500 */

.away-mark {
    font-size: 24px;
    font-weight: 900;
    opacity: 0.3;
    transform: translateY(-2px);
    /* Lift it into optical center */
    pointer-events: none;
    line-height: 1;
}

.result-w .away-mark {
    color: #14532d;
}

/* green-900 */
.result-l .away-mark {
    color: #7f1d1d;
}

/* red-900 */

#trend-container {
    width: 100%;
    max-width: 500px;
    height: 120px;
    position: relative;
    margin-top: 0.5rem;
    opacity: 0.8;
    transition: opacity 0.5s;
}

#trend-container:hover {
    opacity: 1;
}

.trend-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 9999;
    white-space: nowrap;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.08em;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-accent {
    position: fixed;
    width: 25vw;
    height: 25vw;
    background-color: var(--secondary-color);
    opacity: 1;
    z-index: -1;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.2s;
    pointer-events: none;
}

#accent-tl {
    top: 0;
    left: 0;
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

#accent-br {
    bottom: 0;
    right: 0;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

#detail-team {
    color: var(--secondary-color);
}