/* TrackMyOsu — minimal dark theme */

:root {
    --bg: #1a1a1f;
    --bg-elev: #24242c;
    --bg-card: #2c2c36;
    --border: #3a3a45;
    --text: #e8e8ec;
    --text-dim: #9a9aa6;
    --accent: #ff66aa;
    --accent-hover: #ff85bb;
    --positive: #6cd66c;
    --negative: #ff6464;
    --neutral: #b0b0bc;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

header {
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header .logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
}
header .logo a { color: var(--text); }
header .logo .accent { color: var(--accent); }

header nav {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}
header nav .user-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.9rem;
}
header nav .user-pill img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

main {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

h1, h2, h3 { color: var(--text); margin-top: 0; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.3rem; margin-top: 2rem; }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.15s;
}
.btn:hover { background: var(--accent-hover); color: white; }
.btn:disabled { background: #555; cursor: not-allowed; }
.btn.secondary { background: var(--bg-elev); border: 1px solid var(--border); color: var(--text); }
.btn.secondary:hover { background: var(--border); }
.btn.danger { background: var(--negative); }
.btn.danger:hover { background: #ff8585; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat {
    background: var(--bg-elev);
    border-radius: 6px;
    padding: 1rem;
    text-align: center;
}
.stat .label { font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.stat .value { font-size: 1.5rem; font-weight: 700; margin-top: 0.25rem; }
.stat .delta { font-size: 0.85rem; margin-top: 0.25rem; }
.delta.positive { color: var(--positive); }
.delta.negative { color: var(--negative); }
.delta.neutral { color: var(--neutral); }

.session-list {
    list-style: none;
    padding: 0;
}
.session-list li {
    background: var(--bg-elev);
    border-radius: 6px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.session-list .meta { color: var(--text-dim); font-size: 0.85rem; }
.session-list .delta-pill {
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.85rem;
}
.delta-pill.positive { background: rgba(108, 214, 108, 0.15); color: var(--positive); }
.delta-pill.negative { background: rgba(255, 100, 100, 0.15); color: var(--negative); }
.delta-pill.neutral { background: var(--bg-card); color: var(--neutral); }

.top-plays {
    list-style: none;
    padding: 0;
}
.top-plays li {
    background: var(--bg-elev);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.top-plays .pp { font-weight: 700; color: var(--accent); }

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.profile-header img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
.search-form input[type="text"] {
    flex: 1;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
    font-size: 1rem;
}
.search-form input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
}

.header-search input[type="text"] {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    width: 180px;
}
.header-search input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
}

.muted { color: var(--text-dim); }
.empty { text-align: center; padding: 2rem; color: var(--text-dim); }

footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-dim);
    font-size: 0.85rem;
}
footer a { color: var(--text-dim); text-decoration: underline; }
footer a:hover { color: var(--text); }

.chart-container { position: relative; height: 280px; margin: 1rem 0; }

.legal h2 { margin-top: 1.5rem; font-size: 1.1rem; }
.legal ul { margin: 0.5rem 0; padding-left: 1.5rem; }
.legal li { margin-bottom: 0.3rem; }
.legal p { line-height: 1.6; }
