:root, [data-theme="dark"] {
    --bg-main: #101115;
    --bg-sidebar: #16181e;
    --bg-card: #1c1f26;
    --bg-card-hover: #232732;
    --bg-surface-subtle: rgba(255, 255, 255, 0.04);
    --text-primary: #f3f4f6;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-color: #00d66c; /* FotMob live green */
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-glow: rgba(0, 214, 108, 0.35);
    --border-color: rgba(255, 255, 255, 0.08);
    --card-border: #282c37;
    --card-radius: 18px;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    --card-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.5);
    --match-row-bg: #13151b;
    --modal-bg: #181a22;
    --modal-overlay: rgba(0, 0, 0, 0.75);
    --input-bg: #14161c;
    --input-border: #2a2e3a;
    --stat-badge-bg: rgba(255, 255, 255, 0.04);
    --stat-badge-border: rgba(255, 255, 255, 0.08);
    --hero-bg-gradient: radial-gradient(circle at 50% 0%, rgba(0, 214, 108, 0.12) 0%, transparent 70%);
    --transition-speed: 0.25s;
}

[data-theme="light"] {
    --bg-main: #f3f4f7;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-surface-subtle: #f1f3f7;
    --text-primary: #111827;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --accent-color: #00b85d;
    --accent-blue: #2563eb;
    --accent-purple: #7c3aed;
    --accent-glow: rgba(0, 184, 93, 0.25);
    --border-color: #e5e7eb;
    --card-border: #e2e8f0;
    --card-radius: 18px;
    --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.08);
    --match-row-bg: #f8fafc;
    --modal-bg: #ffffff;
    --modal-overlay: rgba(15, 23, 42, 0.55);
    --input-bg: #f8fafc;
    --input-border: #d1d5db;
    --stat-badge-bg: #f1f5f9;
    --stat-badge-border: #e2e8f0;
    --hero-bg-gradient: radial-gradient(circle at 50% 0%, rgba(0, 184, 93, 0.08) 0%, transparent 70%);
    --transition-speed: 0.25s;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
    background-attachment: fixed;
    overflow: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.app-layout {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 290px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.25rem;
    z-index: 10;
    transition: background var(--transition-speed), border-color var(--transition-speed);
}

.sidebar-header {
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: transparent;
    text-decoration: none;
    cursor: pointer;
}

.main-logo-image {
    width: 100%;
    max-width: 265px;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform var(--transition-speed), filter var(--transition-speed);
}

.main-logo-image:hover {
    transform: scale(1.04);
}

.sidebar-actions {
    flex-grow: 1;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent-color), #059669);
    color: #ffffff;
    border: none;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 214, 108, 0.25);
}

[data-theme="dark"] .primary-btn {
    color: #0b0e14;
    font-weight: 800;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 214, 108, 0.4);
    filter: brightness(1.08);
}

.full-width {
    width: 100%;
}

.clear-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}

.clear-all-btn:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: #ef4444;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.clear-all-btn:active {
    transform: translateY(0);
}

.sidebar-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lang-switcher {
    width: 100%;
}

.lang-select {
    width: 100%;
    background: var(--bg-surface-subtle);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, background var(--transition-speed);
}

.lang-select:focus {
    border-color: var(--accent-color);
}

.lang-select option {
    background-color: var(--modal-bg);
    color: var(--text-primary);
}

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

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10B981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10B981;
    animation: pulse-green 2s infinite;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    padding: 1.75rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-sidebar);
    transition: background var(--transition-speed), border-color var(--transition-speed);
}

.topbar h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed);
    font-family: inherit;
}

.theme-toggle-btn:hover {
    border-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.theme-icon {
    font-size: 1rem;
    line-height: 1;
}

[data-theme="dark"] .sun-icon { display: inline-block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: inline-block; }

.dashboard-scroll-area {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0 3rem 3rem 3rem;
}

/* Skeletons */
.skeleton-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, rgba(255,255,255,0.05) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite linear;
    border-radius: var(--card-radius);
}

.skeleton-hero {
    height: 300px;
    width: 100%;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.skeleton-card {
    height: 200px;
}

.skeleton-list-item {
    height: 60px;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 6rem 0;
    color: var(--text-secondary);
    animation: fadeIn 0.5s ease;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Bento Layout */
.bento-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: fadeInUp 0.6s ease-out backwards;
}

/* Hero Section */
.hero-card {
    position: relative;
    background: var(--bg-card);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hero-bg-glow {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    opacity: 0.3;
    pointer-events: none;
}

.hero-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 1;
}

.hero-player-info {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.hero-player-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
}

.hero-player-name {
    font-size: 2rem;
    font-weight: 800;
}

.hero-team-name {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
}

.hero-stats-bar {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.4rem 0.85rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.card-stats-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 0.45rem 0.75rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.stat-pill strong {
    color: var(--text-primary);
    font-weight: 700;
}

.stat-pill.pts-pill strong {
    color: var(--accent-color);
}

.stat-pill.rank-pill {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 6px;
    padding: 0.15rem 0.45rem;
    font-size: 0.8rem;
}

.stat-pill.rank-pill strong {
    color: #f59e0b;
    font-weight: 800;
}

.stat-divider {
    color: var(--border-color);
    font-size: 0.8rem;
}

.record-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.15rem 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.record-badge span.w-val { color: #10B981; font-weight: 700; }
.record-badge span.d-val { color: #F59E0B; font-weight: 700; }
.record-badge span.l-val { color: #EF4444; font-weight: 700; }

.hero-badge {
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-match-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    padding: 2rem;
    z-index: 1;
}

.hero-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.hero-team-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.hero-team-abbr {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
}

.hero-vs-section {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.hero-time {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1;
}

.hero-date {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

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

.bento-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--card-radius);
    border: 1px solid var(--card-border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed);
}

.bento-card:hover {
    transform: translateY(-3px);
    background: var(--bg-card-hover);
    border-color: var(--accent-color);
    box-shadow: var(--card-shadow-hover);
}

.card-player-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.card-player-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
    background: #ffffff;
}

.card-player-name {
    font-size: 1.15rem;
    font-weight: 700;
}

.card-league-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.card-match-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--match-row-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.9rem 1rem;
}

.card-match-teams {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    flex: 1;
}

.vs-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
}

.card-time-box {
    text-align: right;
}

.card-time {
    font-weight: 800;
    color: var(--accent-color);
    font-feature-settings: 'tnum';
    font-size: 1rem;
}

.card-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.countdown {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-surface-subtle);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.countdown.live {
    color: #ffffff;
    background: #ef4444;
    border-color: #dc2626;
    animation: pulse-red 2s infinite;
    font-weight: 800;
}

/* Remove button */
.remove-btn {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s, color 0.2s;
    z-index: 10;
}

.bento-card:hover .remove-btn, .hero-card:hover .remove-btn {
    opacity: 1;
}

.remove-btn:hover {
    color: #ef4444;
}

/* Drag and Drop Styling */
.hero-card,
.bento-card {
    cursor: grab;
    user-select: none;
    transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.hero-card:active,
.bento-card:active {
    cursor: grabbing;
}

.drag-handle {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 7px;
    opacity: 0.95;
    cursor: grab;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.drag-handle svg {
    display: block;
}

.hero-card .drag-handle {
    top: 1.25rem;
    left: 1.25rem;
    width: 32px;
    height: 32px;
}

.bento-card:hover .drag-handle,
.hero-card:hover .drag-handle {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.drag-handle:hover {
    opacity: 1 !important;
    color: var(--accent-color) !important;
    background: rgba(0, 214, 108, 0.2) !important;
    border-color: var(--accent-color) !important;
    transform: scale(1.12);
    box-shadow: 0 0 12px rgba(0, 214, 108, 0.4) !important;
}

.drag-handle:active {
    cursor: grabbing;
    transform: scale(0.95);
}

/* Card is actively being dragged */
.hero-card.is-dragging,
.bento-card.is-dragging {
    opacity: 0.4 !important;
    transform: scale(0.96) !important;
    border: 2px dashed var(--accent-color) !important;
    box-shadow: 0 10px 30px rgba(0, 214, 108, 0.2) !important;
}

/* Hovering over a card as drop target */
.hero-card.drag-target-over,
.bento-card.drag-target-over {
    border: 2px solid var(--accent-color) !important;
    transform: translateY(-4px) scale(1.02) !important;
    box-shadow: 0 12px 35px var(--accent-glow) !important;
    background: var(--bg-card-hover) !important;
}

/* Interactive elements inside cards should never trigger card drag */
.remove-btn,
.view-sched-btn,
button,
a {
    cursor: pointer !important;
}

/* Floating Badge Logo (Bottom Right - Fixed on Scroll) */
.floating-badge-logo {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    z-index: 999;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 2px;
    border: 2px solid var(--accent-color);
}

.floating-badge-logo:hover {
    transform: scale(1.12) translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 214, 108, 0.45);
}

.floating-badge-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    display: block;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-overlay);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.25s ease;
}

.bento-modal {
    background: var(--modal-bg);
    color: var(--text-primary);
    width: 90%;
    max-width: 460px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.75rem 2rem;
    overflow-y: auto;
}

.modern-select {
    width: 100%;
    background-color: var(--input-bg);
    color: var(--text-primary);
    border: 1px solid var(--input-border);
    padding: 0.9rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    margin-bottom: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.modern-select option {
    background-color: var(--modal-bg);
    color: var(--text-primary);
}

.modern-select:focus {
    border-color: var(--accent-color);
}

.modern-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.modern-squad-item {
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-color);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    gap: 1rem;
}

.modern-squad-item .squad-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #ffffff;
}

.modern-squad-item .squad-info {
    flex-grow: 1;
}

.modern-squad-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-color);
}

.modern-track-btn {
    background: var(--accent-color);
    color: #ffffff;
    border: none;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.2s;
    font-family: inherit;
}

[data-theme="dark"] .modern-track-btn {
    color: #000000;
}

.modern-track-btn:hover {
    transform: scale(1.04);
    filter: brightness(1.1);
}

/* Animations */
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(0, 214, 108, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(0, 214, 108, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 214, 108, 0); }
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.hidden {
    display: none !important;
}

/* Responsive Mobile Optimization */
@media (max-width: 768px) {
    /* Layout */
    .app-layout {
        flex-direction: column;
        min-height: 100vh;
        width: 100%;
        overflow-x: hidden;
    }

    /* Sidebar transforms into a sleek, compact Mobile Header */
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.75rem;
        background: var(--bg-sidebar);
        position: sticky;
        top: 0;
        z-index: 100;
        backdrop-filter: blur(20px);
    }

    .sidebar-header {
        margin-bottom: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .main-logo-image {
        max-width: 155px;
        height: auto;
    }

    /* 2x2 Clean Action Grid on Mobile */
    .sidebar-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem !important;
        width: 100%;
    }

    .primary-btn {
        padding: 0.55rem 0.65rem;
        font-size: 0.8rem;
        border-radius: 9px;
        gap: 0.35rem;
        white-space: nowrap;
    }

    .primary-btn svg {
        width: 15px;
        height: 15px;
    }

    .clear-all-btn {
        padding: 0.55rem 0.65rem;
        font-size: 0.8rem;
        border-radius: 9px;
        gap: 0.35rem;
        white-space: nowrap;
    }

    .clear-all-btn svg {
        width: 15px;
        height: 15px;
    }

    .sidebar-footer {
        display: flex;
        justify-content: flex-end;
        padding-top: 0;
        border-top: none;
        width: 100%;
    }

    .lang-switcher {
        width: auto;
    }

    .lang-select {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    /* Topbar */
    .topbar {
        padding: 0.85rem 1rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        border-bottom: 1px solid var(--border-color);
    }

    .topbar h1 {
        font-size: 1.25rem;
        letter-spacing: -0.5px;
    }

    .topbar .subtitle {
        font-size: 0.75rem;
    }

    .topbar-actions {
        display: flex;
        gap: 0.4rem;
        align-items: center;
    }

    .theme-toggle-btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
        border-radius: 8px;
        gap: 0.3rem;
    }

    /* Dashboard Container & Grid */
    .dashboard-scroll-area {
        padding: 0.85rem;
    }

    .bento-container {
        gap: 1rem;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    /* Hero Card (Featured Match) Mobile Overrides */
    .hero-card {
        padding: 1.25rem 1rem;
        border-radius: 16px;
        gap: 1rem;
    }

    .hero-header {
        margin-top: 0.25rem;
        gap: 0.5rem;
    }

    .hero-player-info {
        gap: 0.75rem;
    }

    .hero-player-img {
        width: 52px;
        height: 52px;
        border-width: 2px;
    }

    .hero-player-name {
        font-size: 1.2rem;
        line-height: 1.2;
    }

    .hero-team-name {
        font-size: 0.82rem;
    }

    .hero-stats-bar {
        padding: 0.25rem 0.6rem;
        font-size: 0.75rem;
        gap: 0.45rem;
        margin-top: 0.35rem;
        border-radius: 8px;
    }

    .hero-badge {
        font-size: 0.68rem;
        padding: 0.25rem 0.5rem;
        letter-spacing: 0.5px;
    }

    .hero-match-details {
        padding: 1rem 0.75rem;
        border-radius: 12px;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        gap: 0.5rem;
    }

    .hero-team {
        gap: 0.4rem;
    }

    .hero-team-logo {
        width: 44px;
        height: 44px;
    }

    .hero-team-abbr {
        font-size: 0.82rem;
    }

    .hero-vs-section {
        gap: 0.25rem;
    }

    .hero-time {
        font-size: 1.35rem;
    }

    .hero-date {
        font-size: 0.72rem;
    }

    .hero-countdown {
        font-size: 0.72rem;
        padding: 0.2rem 0.5rem;
    }

    .hero-vs-section .view-sched-btn {
        margin-top: 0.4rem !important;
        font-size: 0.72rem !important;
        padding: 0.3rem 0.6rem !important;
    }

    /* Bento Cards Mobile Overrides */
    .bento-card {
        padding: 1rem;
        border-radius: 14px;
        gap: 0.85rem;
    }

    .card-player-row {
        gap: 0.75rem;
        margin-top: 0.25rem;
    }

    .card-player-img {
        width: 42px;
        height: 42px;
        border-width: 2px;
    }

    .card-player-name {
        font-size: 1.05rem;
        line-height: 1.2;
    }

    .card-league-name {
        font-size: 0.78rem;
    }

    .card-stats-bar {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
        gap: 0.45rem;
        border-radius: 8px;
    }

    .card-match-row {
        padding: 0.65rem 0.75rem;
        border-radius: 10px;
    }

    .card-match-teams {
        font-size: 0.85rem;
        gap: 0.35rem;
    }

    .vs-text {
        font-size: 0.68rem;
    }

    .card-time {
        font-size: 0.88rem;
    }

    .card-date {
        font-size: 0.7rem;
    }

    .card-footer {
        padding-top: 0.15rem;
    }

    .view-sched-btn {
        font-size: 0.76rem !important;
    }

    .countdown {
        font-size: 0.72rem;
        padding: 0.2rem 0.55rem;
    }

    /* Drag Handle on Mobile */
    .drag-handle {
        top: 0.6rem;
        left: 0.6rem;
        width: 24px;
        height: 24px;
        border-radius: 6px;
    }

    .drag-handle svg {
        width: 14px;
        height: 14px;
    }

    .hero-card .drag-handle {
        top: 0.75rem;
        left: 0.75rem;
        width: 26px;
        height: 26px;
    }

    .remove-btn {
        top: 0.6rem;
        right: 0.6rem;
        font-size: 1.2rem;
        opacity: 0.85; /* Always visible on mobile touchscreens */
    }

    .hero-card .remove-btn {
        top: 0.75rem;
        right: 0.75rem;
    }

    /* Modals on Mobile */
    .modal-content.bento-modal {
        width: 95% !important;
        max-width: 95% !important;
        padding: 1.2rem !important;
        border-radius: 16px !important;
        margin: 1rem auto !important;
    }

    .modal-header h2 {
        font-size: 1.15rem !important;
    }

    .squad-item {
        padding: 0.6rem 0.75rem !important;
        border-radius: 10px !important;
        gap: 0.6rem !important;
    }

    .squad-img {
        width: 38px !important;
        height: 38px !important;
    }

    .squad-name {
        font-size: 0.92rem !important;
    }

    .squad-nat {
        font-size: 0.76rem !important;
    }

    .modern-track-btn {
        padding: 0.38rem 0.75rem !important;
        font-size: 0.78rem !important;
        border-radius: 7px !important;
    }

    /* Floating Badge Logo */
    .floating-badge-logo {
        bottom: 0.85rem;
        right: 0.85rem;
        width: 46px;
        height: 46px;
    }
}
