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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #09090b;
    color: #e4e4e7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    letter-spacing: -0.01em;
}

/* Navigation */
.navbar {
    background-color: rgba(15, 15, 18, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-icon {
    font-size: 1.5rem;
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-links a {
    color: #a1a1aa;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-links a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.08);
}

.nav-links a.active {
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.nav-icon {
    font-size: 1.1rem;
}

.logout-link {
    margin-left: 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 1rem !important;
}

.logout-link:hover {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
}

/* Main container */
.container {
    flex: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #fafafa;
    letter-spacing: -0.02em;
}

h2 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

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

.page-header h1 {
    margin-bottom: 0;
}

.export-btn {
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.export-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* Schedule sections */
.schedule-section {
    margin-bottom: 3rem;
}

.date-header {
    font-size: 1rem;
    font-weight: 600;
    color: #a1a1aa;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Match cards - new layout */
.matches-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.match-card {
    display: grid;
    grid-template-columns: 160px 1fr auto;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(145deg, #18181b 0%, #141416 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    align-items: center;
    transition: all 0.25s ease;
}

.match-card:hover {
    background: linear-gradient(145deg, #1f1f23 0%, #1a1a1d 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.match-card.live {
    border-left: 3px solid #22c55e;
    background: linear-gradient(145deg, #0f1f12 0%, #0d1a10 100%);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.1);
}

.match-card.final {
    opacity: 0.65;
}

.match-card.final:hover {
    opacity: 0.85;
}

/* Match info - left side */
.match-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.match-time {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fafafa;
}

.match-league {
    font-size: 0.8rem;
    font-weight: 500;
    color: #22c55e;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    margin-right: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.live-indicator::before {
    content: '';
    width: 6px;
    height: 6px;
    background-color: #000;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.final-indicator {
    background-color: #52525b;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-detail {
    font-size: 0.8rem;
    font-weight: 500;
    color: #22c55e;
}

/* Match teams - center */
.match-teams {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.team-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.team-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
}

.team-logo-placeholder {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #27272a 0%, #1f1f22 100%);
    border-radius: 6px;
}

.team-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #e4e4e7;
    flex: 1;
}

.team-score {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fafafa;
    min-width: 32px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Broadcast - right side */
.match-broadcast {
    font-size: 0.75rem;
    font-weight: 500;
    color: #71717a;
    text-align: right;
    max-width: 100px;
    padding: 0.35rem 0.6rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

/* No games message */
.no-games {
    color: #71717a;
    font-style: normal;
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(145deg, #18181b 0%, #141416 100%);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: #52525b;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background-color: rgba(0, 0, 0, 0.3);
}

/* Settings page */
.settings-section {
    margin-bottom: 3rem;
}

.settings-section h2 {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.settings-description {
    color: #888;
    margin-bottom: 1.5rem;
}

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

.league-toggle {
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
}

.league-toggle.enabled {
    background-color: #1a2a1a;
    border: 1px solid #22c55e;
}

.toggle-btn {
    width: 100%;
    padding: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #e0e0e0;
    text-align: left;
}

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

.toggle-btn .league-name {
    font-weight: 500;
}

.toggle-btn .league-code {
    font-size: 0.75rem;
    color: #666;
    margin-left: 0.5rem;
}

.toggle-btn .toggle-status {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background-color: #333;
    color: #888;
}

.league-toggle.enabled .toggle-status {
    background-color: #22c55e;
    color: #000;
}

.league-row {
    display: flex;
    flex-direction: column;
}

.toggle-form {
    width: 100%;
}

.priority-form,
.league-settings-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-top: 1px solid #333;
    flex-wrap: wrap;
}

.priority-label,
.setting-label {
    font-size: 0.75rem;
    color: #666;
}

.priority-input {
    width: 60px;
    padding: 0.25rem 0.5rem;
    background-color: #0a0a0a;
    border: 1px solid #333;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 0.875rem;
    text-align: center;
}

.short-name-input {
    width: 70px;
    padding: 0.25rem 0.5rem;
    background-color: #0a0a0a;
    border: 1px solid #333;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 0.875rem;
    text-align: center;
    text-transform: uppercase;
}

.priority-input:focus,
.short-name-input:focus {
    outline: none;
    border-color: #2563eb;
}

.priority-btn {
    padding: 0.25rem 0.75rem;
    background-color: #333;
    color: #e0e0e0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
}

.priority-btn:hover {
    background-color: #444;
}

.sync-form {
    margin-bottom: 0.5rem;
}

.sync-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.sync-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

.add-league-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(145deg, #18181b 0%, #141416 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #a1a1aa;
}

.form-group input {
    padding: 0.75rem 1rem;
    background-color: #09090b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e4e4e7;
    font-size: 0.95rem;
    font-family: inherit;
    min-width: 200px;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.add-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.help-text {
    background-color: #1a1a1a;
    padding: 1.5rem;
    border-radius: 8px;
}

.help-text h3 {
    font-size: 1rem;
    color: #888;
    margin-bottom: 1rem;
}

.help-text ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.help-text li {
    font-size: 0.875rem;
    color: #666;
}

.help-text code {
    background-color: #333;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    color: #2563eb;
    font-family: monospace;
}

/* Alert Messages */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-error {
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
    color: #fecaca;
    border: 1px solid #dc2626;
}

.alert-success {
    background: linear-gradient(135deg, #166534 0%, #14532d 100%);
    color: #bbf7d0;
    border: 1px solid #22c55e;
}

/* User Management */
.user-card {
    background: linear-gradient(145deg, #18181b 0%, #141416 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.user-card.self {
    border-color: rgba(37, 99, 235, 0.3);
}

.user-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #e4e4e7;
    margin-bottom: 1rem;
}

.user-form .form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.user-form .form-group {
    flex: 1;
    min-width: 150px;
}

.user-form .form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #a1a1aa;
    margin-bottom: 0.5rem;
}

.user-form .form-group input[type="text"],
.user-form .form-group input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #09090b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e4e4e7;
    font-size: 0.95rem;
    font-family: inherit;
}

.user-form .form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.checkbox-group {
    display: flex;
    align-items: center;
    min-width: auto !important;
    flex: 0 !important;
}

.checkbox-group label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    white-space: nowrap;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
}

.save-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s ease;
}

.save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.user-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    background-color: #09090b;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.username {
    font-weight: 500;
    color: #e4e4e7;
}

.admin-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #fff;
    border-radius: 4px;
    text-transform: uppercase;
}

.you-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border-radius: 4px;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.inline-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.small-input {
    padding: 0.5rem 0.75rem;
    background-color: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #e4e4e7;
    font-size: 0.85rem;
    font-family: inherit;
    width: 130px;
}

.small-input:focus {
    outline: none;
    border-color: #2563eb;
}

.small-btn {
    padding: 0.5rem 0.875rem;
    background: linear-gradient(135deg, #3f3f46 0%, #27272a 100%);
    color: #e4e4e7;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s ease;
}

.small-btn:hover {
    background: linear-gradient(135deg, #52525b 0%, #3f3f46 100%);
}

.delete-btn {
    padding: 0.5rem 0.875rem;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* US Sports Page */
.us-sports-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.us-sports-header h1 {
    margin-bottom: 0;
}

.settings-icon {
    color: #666;
    font-size: 1.5rem;
    text-decoration: none;
}

.settings-icon:hover {
    color: #fff;
}

.league-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.league-tab {
    padding: 0.7rem 1.25rem;
    background: linear-gradient(145deg, #1f1f23 0%, #18181b 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #a1a1aa;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.league-tab:hover {
    background: linear-gradient(145deg, #27272a 0%, #1f1f23 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.league-tab.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.tab-icon {
    font-size: 1.1rem;
}

.date-filter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    padding: 1rem 1.25rem;
    background: linear-gradient(145deg, #18181b 0%, #141416 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.date-filter label {
    color: #a1a1aa;
    font-size: 0.85rem;
    font-weight: 500;
}

.date-icon {
    color: #71717a;
    font-size: 1.1rem;
}

.date-input {
    padding: 0.6rem 0.875rem;
    background-color: #09090b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e4e4e7;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.date-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.filter-btn {
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, #3f3f46 0%, #27272a 100%);
    color: #e4e4e7;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: linear-gradient(135deg, #52525b 0%, #3f3f46 100%);
    transform: translateY(-1px);
}

.schedule-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.schedule-icon {
    color: #22c55e;
    font-size: 1.1rem;
}

.schedule-title {
    color: #22c55e;
    font-weight: 600;
    font-size: 0.95rem;
    flex: 1;
}

/* US Sports Card */
.us-sports-card {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.75rem 1.25rem;
    padding: 1.25rem 1.5rem;
}

.us-match-info {
    grid-row: 1 / 2;
}

.match-time-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.match-time-main {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fafafa;
}

.match-date {
    font-size: 0.8rem;
    font-weight: 500;
    color: #71717a;
}

.match-time-badge {
    display: inline-block;
    background: linear-gradient(135deg, #1e3a5f 0%, #172554 100%);
    color: #60a5fa;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    margin-top: 0.35rem;
    width: fit-content;
}

.us-match-teams {
    grid-row: 1 / 2;
}

.match-venue {
    grid-row: 1 / 2;
    font-size: 0.8rem;
    font-weight: 500;
    color: #71717a;
    text-align: right;
    align-self: center;
    max-width: 150px;
}

.match-summary {
    grid-column: 1 / -1;
    grid-row: 2 / 3;
    font-size: 0.8rem;
    font-weight: 500;
    color: #22c55e;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 0.5rem;
}

/* Media Links for Posters/Thumbnails */
.match-media-links {
    grid-column: 1 / -1;
    grid-row: 3 / 4;
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.media-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.875rem;
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    color: #f3f4f6;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    font-family: inherit;
}

.media-link:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.25);
}

.media-link:active {
    transform: translateY(0);
}

.media-icon {
    font-size: 1rem;
}

.poster-link {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    color: #fff;
    border-color: rgba(167, 139, 250, 0.3);
}

.poster-link:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.thumbnail-link {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    border-color: rgba(52, 211, 153, 0.3);
}

.thumbnail-link:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Copied state */
.media-link.copied {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    color: #fff !important;
    border-color: rgba(34, 197, 94, 0.5) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .match-card {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .match-info {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .match-broadcast {
        text-align: left;
        max-width: none;
    }

    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .add-league-form {
        flex-direction: column;
    }

    .form-group input {
        min-width: 100%;
    }

    .us-sports-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
    }

    .us-match-info {
        grid-row: 1 / 2;
    }

    .us-match-teams {
        grid-row: 2 / 3;
    }

    .match-venue {
        grid-row: 3 / 4;
        text-align: left;
    }

    .match-summary {
        grid-column: 1;
        grid-row: 4 / 5;
    }

    .match-media-links {
        grid-column: 1;
        grid-row: 5 / 6;
    }

    .league-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }

    .league-tab {
        flex-shrink: 0;
    }
}

/* Poster Generator Page */
.poster-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.poster-header h1 {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-mode-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.mode-tab {
    padding: 0.7rem 1.25rem;
    background: linear-gradient(145deg, #1f1f23 0%, #18181b 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #a1a1aa;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.mode-tab:hover {
    background: linear-gradient(145deg, #27272a 0%, #1f1f23 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.12);
}

.mode-tab.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.poster-form {
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(145deg, #18181b 0%, #141416 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-select {
    padding: 0.75rem 1rem;
    background-color: #09090b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e4e4e7;
    font-size: 0.95rem;
    font-family: inherit;
    min-width: 150px;
    transition: all 0.2s ease;
}

.form-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.generate-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.generate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.generate-btn:disabled {
    background: #27272a;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.loading-state {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 3rem;
    justify-content: center;
    color: #a1a1aa;
    font-weight: 500;
}

.loading-state.hidden {
    display: none;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(37, 99, 235, 0.2);
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.results-section {
    margin-top: 2rem;
}

.results-section.hidden {
    display: none;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1.5rem;
}

.matchup-count {
    font-size: 1.1rem;
    font-weight: 600;
    color: #22c55e;
}

.download-zip-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.download-zip-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

.matchups-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.matchup-card {
    background: linear-gradient(145deg, #18181b 0%, #141416 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.matchup-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.matchup-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fafafa;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.status-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-badge.new {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #000;
}

.status-badge.existing {
    background: linear-gradient(135deg, #3f3f46 0%, #27272a 100%);
    color: #a1a1aa;
}

.matchup-card.skipped {
    opacity: 0.75;
}

.poster-previews {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.preview-item h4 {
    font-size: 0.8rem;
    font-weight: 500;
    color: #71717a;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.preview-item img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.preview-item img:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.mode-content {
    display: none;
}

.mode-content.active {
    display: block;
}

.coming-soon {
    color: #71717a;
    font-style: normal;
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(145deg, #18181b 0%, #141416 100%);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

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

    .form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .form-group {
        width: 100%;
    }

    .form-select {
        width: 100%;
    }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(145deg, #18181b 0%, #0f0f11 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

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

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fafafa;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #71717a;
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

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

.modal-search {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #09090b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e4e4e7;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.modal-body {
    padding: 1rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.leagues-browse-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.league-browse-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    background-color: #09090b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.league-browse-item:hover {
    background-color: #1f1f23;
    border-color: #2563eb;
    transform: translateX(4px);
}

.browse-league-name {
    font-weight: 500;
    color: #e4e4e7;
}

.browse-league-code {
    font-size: 0.8rem;
    color: #71717a;
    font-family: monospace;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .modal-content {
        max-height: 90vh;
    }

    .league-browse-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* =============================================================================
   EPG Manager Styles
   ============================================================================= */

/* Override container width for EPG page */
.container:has(.epg-container) {
    max-width: 1200px;
}

.epg-header {
    margin-bottom: 1.5rem;
}

.epg-header h1 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.epg-subtitle {
    color: #71717a;
    font-size: 0.9rem;
    margin: 0;
}

.epg-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
}

.epg-input-panel,
.epg-output-panel {
    background: linear-gradient(145deg, #18181b 0%, #141416 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.5rem;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.panel-icon {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    padding: 0.5rem;
    border-radius: 10px;
}

.panel-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fafafa;
    margin: 0;
}

.panel-subtitle {
    font-size: 0.85rem;
    color: #71717a;
    margin: 0.15rem 0 0;
}

/* EPG Category Tabs */
.epg-category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.epg-tab {
    padding: 0.6rem 1rem;
    background: linear-gradient(145deg, #1f1f23 0%, #18181b 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #a1a1aa;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.epg-tab:hover {
    background: linear-gradient(145deg, #27272a 0%, #1f1f23 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.12);
}

.epg-tab.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.tab-icon {
    font-size: 1rem;
}

/* Category Info */
.category-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.category-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fafafa;
}

.channel-info {
    font-size: 0.8rem;
    color: #71717a;
}

/* EPG Textarea */
.epg-textarea {
    width: 100%;
    min-height: 280px;
    padding: 1rem;
    background-color: #09090b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e4e4e7;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.85rem;
    resize: vertical;
    line-height: 1.6;
    transition: all 0.2s ease;
}

.epg-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.epg-textarea::placeholder {
    color: #52525b;
}

/* EPG Actions */
.epg-actions {
    display: flex;
    gap: 0.75rem;
    margin: 1.25rem 0;
}

.filter-btn {
    padding: 0.75rem 1.25rem;
    background: linear-gradient(145deg, #27272a 0%, #1f1f23 100%);
    color: #e4e4e7;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: linear-gradient(145deg, #3f3f46 0%, #27272a 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
}

.small-btn {
    padding: 0.75rem 1rem;
    background: transparent;
    color: #71717a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.small-btn:hover {
    color: #e4e4e7;
    border-color: rgba(255, 255, 255, 0.15);
    background-color: rgba(255, 255, 255, 0.05);
}

/* EPG Guidelines */
.epg-guidelines {
    background-color: #09090b;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.guidelines-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.guidelines-header:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.guidelines-icon {
    color: #2563eb;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.guidelines-header h4 {
    font-size: 0.85rem;
    font-weight: 500;
    color: #a1a1aa;
    margin: 0;
}

.guidelines-content {
    display: none;
    padding: 0 1rem 1rem;
}

.guidelines-content.expanded {
    display: block;
}

.guideline-item {
    display: none;
}

.guideline-item.active {
    display: block;
}

.guideline-item code {
    display: block;
    background-color: #1f1f23;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #22c55e;
    margin-bottom: 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
}

.help-text {
    font-size: 0.8rem;
    color: #71717a;
    margin: 0.35rem 0;
}

/* EPG Export Section */
.epg-export-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.export-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.export-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.875rem 1rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.xml-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.xml-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.json-btn {
    background: linear-gradient(145deg, #27272a 0%, #1f1f23 100%);
    color: #e4e4e7;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.json-btn:hover {
    background: linear-gradient(145deg, #3f3f46 0%, #27272a 100%);
    color: #fff;
    transform: translateY(-1px);
}

.delete-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.5);
}

/* EPG Summary Section */
.epg-summary-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #fafafa;
    margin-bottom: 1rem;
}

.summary-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0.75rem;
    background-color: #09090b;
    border-radius: 6px;
}

.stat-label {
    color: #71717a;
    font-size: 0.85rem;
}

.stat-value {
    color: #e4e4e7;
    font-weight: 600;
    font-size: 0.9rem;
}

.stat-value.highlight {
    color: #22c55e;
}

.stat-value.small {
    font-size: 0.8rem;
    font-weight: 500;
}

.category-counts-header {
    font-size: 0.9rem;
    font-weight: 500;
    color: #a1a1aa;
    margin-bottom: 0.75rem;
}

.category-counts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-counts li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.category-counts li:last-child {
    border-bottom: none;
}

.cat-name {
    color: #a1a1aa;
    font-size: 0.85rem;
    font-weight: 500;
}

.cat-count {
    color: #52525b;
    font-weight: 600;
    font-size: 0.9rem;
}

.cat-count.has-events {
    color: #22c55e;
}

/* EPG Modal */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.epg-modal {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.preview-info {
    color: #a1a1aa;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preview-line {
    display: flex;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    background-color: #09090b;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.8rem;
}

.line-num {
    color: #52525b;
    min-width: 2rem;
    text-align: right;
}

.line-text {
    color: #e4e4e7;
    word-break: break-all;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(9, 9, 11, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-overlay.hidden {
    display: none;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #a1a1aa;
    font-weight: 500;
}

/* EPG Responsive */
@media (max-width: 900px) {
    .epg-container {
        grid-template-columns: 1fr;
    }

    .epg-output-panel {
        order: -1;
    }

    .export-buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .epg-category-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .epg-tab {
        flex-shrink: 0;
    }

    .epg-actions {
        flex-wrap: wrap;
    }

    .epg-actions .generate-btn {
        width: 100%;
    }
}
