:root {
    --bg-main: #0B0E14;
    --bg-sidebar: rgba(15, 23, 42, 0.6);
    --bg-card: rgba(20, 27, 45, 0.7);
    --bg-card-hover: rgba(30, 41, 59, 0.9);
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --accent-color: #3B82F6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --accent-purple: #8B5CF6;
    --border-color: rgba(255, 255, 255, 0.08);
    --card-radius: 20px;
    --transition-speed: 0.3s;
}

* {
    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: 280px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    z-index: 10;
}

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

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

.logo-image {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.highlight {
    color: var(--accent-color);
}

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

.primary-btn {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-purple));
    color: #fff;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.full-width {
    width: 100%;
}

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

.lang-switcher {
    width: 100%;
}

.lang-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

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

.lang-select option {
    background-color: #111827;
    color: #F8FAFC;
}

.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: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.topbar h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -1px;
}

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

.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-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(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: all var(--transition-speed);
}

.bento-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

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

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

.card-player-name {
    font-size: 1.2rem;
    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: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 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;
}

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

.card-time {
    font-weight: 700;
    color: var(--accent-color);
}

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

.card-footer {
    display: flex;
    justify-content: flex-end;
}

.countdown {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.countdown.live {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    animation: pulse-red 2s infinite;
}

/* Remove button */
.remove-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    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;
}

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

.bento-modal {
    background: #111827;
    width: 90%;
    max-width: 450px;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.1);
    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 rgba(255,255,255,0.05);
}

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

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

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

.modern-select {
    width: 100%;
    background-color: rgba(255,255,255,0.03);
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    margin-bottom: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

/* Fix for white text on white background in select dropdowns */
.modern-select option {
    background-color: #111827;
    color: #F8FAFC;
}

.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: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 12px;
    gap: 1rem;
}

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

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

.modern-squad-item:hover {
    background: rgba(255,255,255,0.05);
}

.modern-track-btn {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.modern-track-btn:hover {
    background: var(--accent-color);
    transform: scale(1.05);
}

/* 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(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 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 */
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .sidebar-header { margin-bottom: 0; }
    .sidebar-footer { display: none; }
    .sidebar-actions { flex-grow: 0; }
    .topbar { padding: 1.5rem; }
    .dashboard-scroll-area { padding: 0 1.5rem 1.5rem 1.5rem; }
    .hero-match-details { flex-direction: column; gap: 1.5rem; }
}
