:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #3b82f6;
    --atlanta-color: #80000A;
    --arsenal-color: #EF0107;
    --usa-color: #002868;
    --shows-color: #4CAF50;
    --font-family: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

.app-container {
    max-width: 600px;
    /* Mobile focused */
    margin: 0 auto;
    padding: 1rem;
    min-height: 100vh;
}

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

h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Hero Card */
.hero-card {
    background: linear-gradient(135deg, var(--card-bg), #0f172a);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--atlanta-color), var(--arsenal-color), var(--usa-color));
}

.hero-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.timer {
    color: var(--accent-color);
    font-weight: 600;
}

.match-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40%;
    text-align: center;
}

.team img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.team span {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
}

.vs {
    font-weight: 800;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.match-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: var(--accent-color);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: transform 0.2s, filter 0.2s;
}

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

/* Filters */
.filters-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    scrollbar-width: none;
    /* Firefox */
}

.filters-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.filter-chip {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.filter-chip.active {
    background: var(--chip-color, var(--accent-color));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Hero Card Interactivity */
.hero-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.6);
}

.hero-card:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Calendar Overrides */
.fc {
    --fc-border-color: rgba(255, 255, 255, 0.1);
    --fc-page-bg-color: transparent;
    --fc-neutral-bg-color: rgba(255, 255, 255, 0.05);
    --fc-list-event-hover-bg-color: rgba(255, 255, 255, 0.1);
    font-family: var(--font-family);
}

.fc-toolbar-title {
    font-size: 1.2rem !important;
    font-weight: 600;
}

.fc-button {
    background: var(--card-bg) !important;
    border: none !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    text-transform: capitalize;
    padding: 0.4rem 0.8rem !important;
    /* Larger touch target */
}

.fc-button-active {
    background: var(--accent-color) !important;
    color: white !important;
}

.fc-day-today {
    background: rgba(59, 130, 246, 0.1) !important;
}

.fc-daygrid-day {
    transition: background 0.2s;
}

.fc-daygrid-day:hover {
    background: rgba(255, 255, 255, 0.02);
}

.fc-event {
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 2px 4px;
    transition: transform 0.1s;
}

.fc-event:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

/* Fix truncation in month view */
.fc-daygrid-event {
    white-space: normal !important;
    align-items: center;
}

/* Legend */
.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* Footer */
.app-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding-bottom: 2rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    opacity: 1;
    transition: opacity 0.3s;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--card-bg);
    width: 90%;
    max-width: 400px;
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    background: none;
    border: none;
    padding: 0.5rem;
}

.modal-header {
    margin-bottom: 1.5rem;
    padding-right: 1.5rem;
}

.modal-header h2 {
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

.modal-detail {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.streaming-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-top: 1rem;
}

.stream-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.8rem;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.stream-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.secondary-btn {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.8rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
}

/* Utilities */
.hidden {
    display: none !important;
}