@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #050505;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.06);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent: #60a5fa;
    --accent-glow: rgba(96, 165, 250, 0.4);
    --danger: #f87171;
    --danger-glow: rgba(248, 113, 113, 0.3);
    --warning: #fbbf24;
    --success: #34d399;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    padding-bottom: 90px;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Ambient Background Glows */
body::before, body::after {
    content: '';
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.4;
    animation: drift 20s infinite alternate;
}
body::before { top: -100px; left: -100px; background: rgba(99, 102, 241, 0.5); }
body::after { bottom: 100px; right: -100px; background: rgba(168, 85, 247, 0.4); animation-delay: -10s; }

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.2); }
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
}

header h1 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #fff, #a1a1aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.status-indicator {
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--card-border);
}

.status-indicator.connected { color: var(--success); border-color: rgba(52, 211, 153, 0.2); }
.status-indicator.disconnected { color: var(--danger); }

/* Tabs */
.tab-content {
    display: none;
    padding: 20px 24px;
    flex-direction: column;
    gap: 24px;
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active { display: flex; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Premium Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: visible;
}

.card h2 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.card h2 i { color: var(--text-primary); }

/* Beautiful Music Player */
.music-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.music-cover {
    width: 200px;
    height: 200px;
    border-radius: 20px;
    background: #111;
    background-size: cover;
    background-position: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}
.music-info { text-align: center; width: 100%; }
.music-title { font-size: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.music-artist { font-size: 14px; color: var(--text-secondary); }

/* Player Controls */
.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}
.btn-play {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--text-primary);
    color: #000;
    border: none;
    font-size: 24px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
    transition: transform 0.2s;
}
.btn-play:active { transform: scale(0.9); }
.btn-skip {
    background: transparent; border: none; color: var(--text-primary); font-size: 24px;
    width: 48px; height: 48px; border-radius: 50%; cursor: pointer; transition: background 0.2s;
}
.btn-skip:active { background: rgba(255,255,255,0.1); }

/* Buttons */
.btn {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex; justify-content: center; align-items: center; gap: 8px;
}
.btn:active { background: rgba(255, 255, 255, 0.1); transform: scale(0.98); }
.btn.primary { background: var(--accent); color: #000; font-weight: 600; border: none; box-shadow: 0 4px 15px var(--accent-glow); }
.btn.danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); border-color: rgba(239, 68, 68, 0.3); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* Lists */
.styled-list { list-style: none; padding: 0; margin: 0; }
.styled-list li {
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.03);
    margin-bottom: 8px;
    display: flex; justify-content: space-between; align-items: center;
    transition: background 0.2s;
}
.styled-list li.clickable:active { background: rgba(255,255,255,0.08); }
.list-item-title { font-weight: 500; font-size: 15px; }
.list-item-sub { font-size: 12px; color: var(--text-secondary); }

/* Navigation */
.bottom-nav {
    position: fixed;
    bottom: 20px; left: 24px; right: 24px;
    height: 70px;
    background: rgba(20, 20, 25, 0.8);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--card-border);
    border-radius: 35px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    z-index: 100;
}
.nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    color: var(--text-secondary); cursor: pointer; transition: all 0.3s;
    width: 50px; position: relative;
}
.nav-item.active { color: var(--text-primary); transform: translateY(-3px); }
.nav-item i { font-size: 20px; }
.nav-item span { font-size: 10px; font-weight: 500; opacity: 0; transition: opacity 0.3s; position: absolute; bottom: -15px; }
.nav-item.active span { opacity: 1; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }

/* Equalizer */
.equalizer, .equalizer-mini {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}
.equalizer { height: 100%; width: 100%; }
.equalizer-mini { height: 20px; align-items: flex-end; }
.equalizer .bar, .equalizer-mini .bar { background: var(--accent); border-radius: 3px; animation: eq 1.5s ease-in-out infinite; }
.equalizer .bar { width: 6px; height: 10px; }
.equalizer-mini .bar { width: 4px; height: 5px; }

.equalizer .bar:nth-child(2), .equalizer-mini .bar:nth-child(2) { animation-delay: 0.2s; }
.equalizer .bar:nth-child(3), .equalizer-mini .bar:nth-child(3) { animation-delay: 0.4s; }
.equalizer .bar:nth-child(4) { animation-delay: 0.6s; }
@keyframes eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }

/* WC Cards and Modal */
.match-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 12px;
    transition: background 0.2s;
}
.match-card:hover { background: rgba(255,255,255,0.1); }
.match-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.match-teams .team { display: flex; justify-content: space-between; font-weight: 500; margin: 4px 0; font-size: 14px;}
.match-teams .score { font-weight: bold; }

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 1000;
    display: flex; justify-content: center; align-items: flex-end;
    backdrop-filter: blur(5px);
}
.modal-content {
    background: #1e1e24; width: 100%; max-height: 80vh;
    border-radius: 20px 20px 0 0; padding: 20px;
    display: flex; flex-direction: column;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.modal-header h3 { margin: 0; }
.close-btn { background: none; border: none; color: white; font-size: 20px; cursor: pointer; }
.modal-body { overflow-y: auto; flex: 1; }

.group-table { background: rgba(255,255,255,0.02); border-radius: 12px; padding: 10px; margin-bottom: 15px; }
.group-table h4 { margin: 0 0 10px 0; text-align: center; }
.group-table table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: center; }
.group-table th { color: var(--text-secondary); padding-bottom: 5px; }
.group-table td { padding: 4px 0; border-top: 1px solid rgba(255,255,255,0.05); }
.group-table td:first-child { text-align: left; }
.stats-table td { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }

/* Custom Dropdown */
.custom-dropdown { position: relative; width: 100%; margin-top: 10px; }
.dropdown-header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; cursor: pointer; transition: all 0.2s; }
.dropdown-header:hover { background: rgba(255, 255, 255, 0.08); }
.dropdown-list { position: absolute; bottom: calc(100% + 5px); left: 0; width: 100%; background: var(--bg-dark); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; max-height: 200px; overflow-y: auto; z-index: 1000; list-style: none; padding: 5px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.dropdown-list li { padding: 10px 15px; border-radius: 8px; cursor: pointer; transition: background 0.2s; font-size: 14px; }
.dropdown-list li:hover { background: rgba(255, 255, 255, 0.1); color: var(--accent); }
