/* Basic CSS without PostCSS */
@import url('https://fonts.googleapis.com/css2?family=Russo+One&family=Inter:wght@400;500;600;700&display=swap');

/* Prevent global horizontal scroll while allowing inner carousels to swipe */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* CSS Variables */
:root {
    --color-brand-red: #BB0000;
    --color-accent-white: #f1f5f9;
    --background-blueprint: #1e293b;
    --background-surface: #334155;
    --border-line: #475569;
    --text-primary: #cbd5e1;
    --text-secondary: #94a3b8;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-blueprint);
    color: var(--text-primary);
}

/* Component Styles */
.chip-base {
    transition: transform 100ms ease-out, background-color 200ms ease-in-out;
}

.chip-base:active {
    transform: scale(0.96);
    transition-duration: 50ms;
}

.touch-manipulation {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.font-russo { 
    font-family: 'Russo One', sans-serif; 
}

/* Hide scrollbar for horizontal chip scroller */
.chip-scroller {
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: auto;
    overscroll-behavior-x: contain;
}

.chip-scroller::-webkit-scrollbar { 
    display: none; 
}

/* Responsive behavior */
@media (max-width: 640px) {
    .chip-scroller {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
}

@media (min-width: 641px) {
    .chip-scroller {
        flex-wrap: wrap;
        overflow-x: visible;
    }
}

.card-bg {
    background-color: rgba(45, 55, 72, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(187, 0, 0, 0.3);
}

/* Grid background */
.grid-background {
    background-image:
        linear-gradient(rgba(71, 85, 105, 0.5) 1px, transparent 1px),
        linear-gradient(to right, rgba(71, 85, 105, 0.5) 1px, transparent 1px);
    background-size: 2rem 2rem;
}

/* Chip base + active glow */
.chip-base {
    background: transparent;
    border: 1px solid var(--border-line);
    color: var(--text-secondary);
    transition: all 200ms ease-in-out;
}

.chip-base:hover {
    background: var(--background-surface);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.chip-active-glow {
    color: var(--color-accent-white) !important;
    border-color: var(--color-accent-white) !important;
    background: rgba(255,255,255,0.05) !important;
    text-shadow: 0 0 8px var(--color-brand-red);
}

/* Rating Badge Styles */
.rating-badge {
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid rgba(156, 163, 175, 0.6);
    line-height: 1.25rem;
}

.rating-prime {
    position: relative;
    background: linear-gradient(90deg, #FACC15, #F97316);
    color: #111827;
    border-color: #FCD34D;
    font-weight: 800;
    overflow: visible;
}

.rating-prime::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 9999px;
    background: radial-gradient(closest-side, rgba(250,204,21,0.35), rgba(250,204,21,0));
    transform: scale(0.96);
    opacity: 0.7;
    animation: cheapPulse 2s infinite;
    will-change: transform, opacity;
    pointer-events: none;
}

.rating-solid {
    background-color: #16A34A;
    color: #FFFFFF;
    border-color: #4ADE80;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.rating-lean {
    background-color: #2563EB;
    color: #FFFFFF;
    border-color: #60A5FA;
}

.rating-avoid {
    background-color: #374151;
    color: #9CA3AF;
    border-color: #4B5563;
}

@keyframes cheapPulse {
    0% { transform: scale(0.95); opacity: 0.7; }
    70% { transform: scale(1.05); opacity: 0; }
    100% { transform: scale(0.95); opacity: 0; }
}

/* Filter Button Styles */
.filter-btn {
    background-color: #1f2937;
    border: 1px solid #374151;
    color: #d1d5db;
    transition: all 200ms ease-in-out;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.filter-btn:hover {
    background-color: #374151;
    border-color: #991b1b;
}

.filter-btn.active {
    background-color: #991b1b;
    color: white;
    border-color: #ef4444;
}

.text-scarlet {
    color: #ef4444;
}

/* Toggle Styles */
.toggle-checkbox {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.toggle-label {
    display: flex;
    align-items: center;
    width: 3.5rem;
    height: 2rem;
    border-radius: 9999px;
    background-color: #374151;
    border: 1px solid #4b5563;
    cursor: pointer;
    transition: colors 300ms;
}

.toggle-ball {
    display: block;
    width: 1.5rem;
    height: 1.5rem;
    margin-left: 0.25rem;
    border-radius: 9999px;
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateX(0);
    transition: transform 300ms;
}

.toggle-checkbox:checked + .toggle-label .toggle-ball {
    transform: translateX(100%);
}

.toggle-checkbox:checked + .toggle-label {
    background-color: #991b1b;
    border-color: #ef4444;
}

/* Scrollable Container */
.scrollable-container {
    overflow-x: auto;
    -ms-overflow-style: none;  
    scrollbar-width: none;  
}

.scrollable-container::-webkit-scrollbar {
    display: none;
}

/* Custom scrollbar for analysis content */
.overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

.overflow-y-auto::-webkit-scrollbar-track {
    background: rgba(55, 65, 81, 0.3);
    border-radius: 3px;
}

.overflow-y-auto::-webkit-scrollbar-thumb {
    background: rgba(187, 0, 0, 0.6);
    border-radius: 3px;
}

.overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: rgba(187, 0, 0, 0.8);
}

/* Playbook circular icon */
.playbook-icon {
    width: 36px;
    height: 36px;
    border: 3px solid var(--color-brand-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.playbook-icon::after {
    content: '➤';
    font-size: 20px;
    color: var(--color-brand-red);
    transform: rotate(-45deg) translateX(1px);
    line-height: 1;
    display: block;
}

.logo-text {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-accent-white);
    letter-spacing: .02em;
    font-family: 'Russo One', sans-serif;
    line-height: 1;
}

.logo-text span {
    color: var(--color-brand-red);
    font-style: italic;
}

/* Desktop-only larger logo sizing */
@media (min-width: 768px) {
    .playbook-icon {
        width: 48px;
        height: 48px;
        border-width: 3px;
    }
    .playbook-icon::after {
        font-size: 27px;
    }
    .logo-text {
        font-size: 29px;
    }
}

/* Icon masks for monochrome SVGs */
.icon-mask {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: currentColor;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
}

.icon-cfl { -webkit-mask-image: url('/icons/cfl.svg?v=1757448405212'); mask-image: url('/icons/cfl.svg?v=1757448405212'); }
.icon-cfb { -webkit-mask-image: url('/icons/cfb.svg?v=1757448405212'); mask-image: url('/icons/cfb.svg?v=1757448405212'); }
.icon-nfl { -webkit-mask-image: url('/icons/nfl.svg?v=1757448405212'); mask-image: url('/icons/nfl.svg?v=1757448405212'); }

/* Accent styling for the When dropdown */
.when-dropdown button {
    border-color: rgba(239, 68, 68, 0.6);
    background: linear-gradient(180deg, rgba(31,41,55,0.7), rgba(17,24,39,0.7));
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.2), 0 4px 12px rgba(0,0,0,0.3);
}

.when-dropdown button:hover {
    border-color: rgba(239, 68, 68, 0.85);
    background: linear-gradient(180deg, rgba(55,65,81,0.7), rgba(31,41,55,0.7));
}

.when-dropdown .text-gray-400,
.when-dropdown .text-gray-300 {
    color: #fca5a5;
}

/* Mobile swipeable cards */
@media (max-width: 767px) {
    .cards-snap {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        touch-action: auto;
        overscroll-behavior-x: contain;
        contain: content;
        will-change: scroll-position;
        gap: 12px;
        padding: 8px 12px 14px 12px;
        scroll-behavior: smooth;
        scroll-padding: 12px;
    }
    
    .cards-snap::-webkit-scrollbar {
        display: none;
    }
    
    .card-snap {
        scroll-snap-align: center;
        scroll-margin: 12px;
        flex: 0 0 85%;
        max-width: 85%;
        will-change: transform;
        transform: translateZ(0);
        content-visibility: auto;
        -webkit-tap-highlight-color: transparent;
    }
}