/* African Music Tracker v1.0.0 — tubidy.africa */

.amt-tracker {
    --amt-bg:          #ffffff;
    --amt-surface:     #f7f7f7;
    --amt-surface2:    #eeeeee;
    --amt-border:      #e0e0e0;
    --amt-border-s:    #c8c8c8;
    --amt-text:        #0b0b0b;
    --amt-text-sec:    #555555;
    --amt-text-muted:  #888888;
    --amt-accent:      #7F77DD;
    --amt-teal:        #1D9E75;
    --amt-coral:       #D85A30;
    --amt-amber:       #BA7517;
    --amt-radius:      8px;
    --amt-shadow:      0 1px 4px rgba(0,0,0,.06);

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size:   14px;
    color:       var(--amt-text);
    background:  var(--amt-bg);
    padding:     20px;
    border:      0.5px solid var(--amt-border);
    border-radius: 14px;
    box-shadow:  var(--amt-shadow);
}

/* Force dark */
.amt-tracker.amt-theme-dark {
    --amt-bg:         #141414;
    --amt-surface:    #1e1e1e;
    --amt-surface2:   #272727;
    --amt-border:     #303030;
    --amt-border-s:   #404040;
    --amt-text:       #f0f0f0;
    --amt-text-sec:   #aaaaaa;
    --amt-text-muted: #666666;
}

/* System dark */
@media (prefers-color-scheme: dark) {
    .amt-tracker.amt-theme-auto {
        --amt-bg:         #141414;
        --amt-surface:    #1e1e1e;
        --amt-surface2:   #272727;
        --amt-border:     #303030;
        --amt-border-s:   #404040;
        --amt-text:       #f0f0f0;
        --amt-text-sec:   #aaaaaa;
        --amt-text-muted: #666666;
    }
}

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

/* Header */
.amt-title { font-size: 18px; font-weight: 500; margin-bottom: 2px; color: var(--amt-text); }
.amt-sub   { font-size: 13px; color: var(--amt-text-muted); margin-bottom: 16px; }
.amt-header { margin-bottom: 4px; }

/* Tabs */
.amt-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--amt-border); margin-bottom: 20px; overflow-x: auto; }
.amt-tab  {
    padding: 8px 16px; font-size: 13px; cursor: pointer;
    border: none; background: none; color: var(--amt-text-sec);
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    white-space: nowrap; font-family: inherit; transition: color .12s;
}
.amt-tab:hover { color: var(--amt-text); }
.amt-tab--on  { color: var(--amt-text); border-bottom-color: var(--amt-text); font-weight: 500; }

/* Panes */
.amt-pane { display: none; }
.amt-pane--on { display: block; }

/* Layout */
.amt-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
@media (max-width: 640px) { .amt-row { grid-template-columns: 1fr; } }

/* Cards */
.amt-card {
    background:    var(--amt-surface);
    border:        0.5px solid var(--amt-border);
    border-radius: var(--amt-radius);
    padding:       16px;
    margin-bottom: 14px;
}
.amt-card-title {
    font-size: 13px; font-weight: 500;
    color: var(--amt-text-sec); margin-bottom: 12px;
}

/* Form elements */
.amt-select, .amt-input {
    width: 100%; padding: 8px 10px;
    border: 0.5px solid var(--amt-border-s);
    border-radius: var(--amt-radius);
    background: var(--amt-bg);
    color: var(--amt-text);
    font-size: 13px; font-family: inherit;
    margin-bottom: 10px;
}
.amt-select:focus, .amt-input:focus {
    outline: none; border-color: var(--amt-accent);
}
.amt-label {
    font-size: 11px; font-weight: 500; letter-spacing: .05em;
    text-transform: uppercase; color: var(--amt-text-muted);
    margin-bottom: 8px;
}

/* Buttons */
.amt-btn {
    padding: 9px 18px; border: 0.5px solid var(--amt-border-s);
    border-radius: var(--amt-radius); background: var(--amt-surface2);
    color: var(--amt-text); font-size: 13px; font-family: inherit;
    cursor: pointer; transition: all .12s;
}
.amt-btn:hover { border-color: var(--amt-accent); }
.amt-btn--primary {
    background: var(--amt-accent); color: #fff;
    border-color: var(--amt-accent);
}
.amt-btn--primary:hover { opacity: .88; }

/* Charts */
.amt-chart-wrap    { position: relative; height: 220px; margin-top: 4px; }
.amt-chart-wrap--sm { position: relative; height: 180px; margin-top: 4px; }

/* Metrics */
.amt-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px,1fr));
    gap: 8px; margin-bottom: 10px;
}
.amt-metric {
    background: var(--amt-surface2); border-radius: var(--amt-radius);
    padding: 10px; text-align: center;
}
.amt-metric-val { font-size: 20px; font-weight: 500; line-height: 1.1; }
.amt-metric-lbl { font-size: 11px; color: var(--amt-text-muted); margin-top: 2px; }

/* Prediction card */
.amt-predict-card {
    background: var(--amt-surface);
    border: 0.5px solid var(--amt-border);
    border-radius: var(--amt-radius);
    padding: 18px;
}
.amt-predict-score { font-size: 44px; font-weight: 500; line-height: 1; }
.amt-predict-label { font-size: 15px; font-weight: 500; margin: 6px 0 2px; }
.amt-predict-desc  { font-size: 13px; color: var(--amt-text-sec); line-height: 1.6; margin-top: 10px; }
.amt-change { font-size: 13px; margin-top: 2px; }
.amt-change--up   { color: var(--amt-teal); }
.amt-change--dn   { color: var(--amt-coral); }
.amt-change--flat { color: var(--amt-text-muted); }

/* Stat rows */
.amt-stat-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 7px 0; border-bottom: 0.5px solid var(--amt-border);
    font-size: 13px;
}
.amt-stat-row:last-child { border-bottom: none; }
.amt-stat-lbl { color: var(--amt-text-sec); }
.amt-trend-up   { color: var(--amt-teal); }
.amt-trend-dn   { color: var(--amt-coral); }
.amt-trend-flat { color: var(--amt-text-muted); }

/* Badges */
.amt-badge {
    display: inline-block; padding: 2px 9px;
    border-radius: 20px; font-size: 11px; font-weight: 500;
    white-space: nowrap;
}
.amt-badge--mega   { background: #EAF3DE; color: #3B6D11; }
.amt-badge--hit    { background: #E1F5EE; color: #0F6E56; }
.amt-badge--mid    { background: #EEEDFE; color: #534AB7; }
.amt-badge--below  { background: #FAEEDA; color: #854F0B; }
.amt-badge--flop   { background: #FAECE7; color: #993C1D; }

/* Songs list */
.amt-songs-list    { display: flex; flex-direction: column; gap: 8px; }
.amt-song-row      {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; background: var(--amt-surface2);
    border-radius: var(--amt-radius);
}
.amt-song-name     { flex: 1; font-size: 13px; }
.amt-song-bar-wrap { width: 100px; height: 5px; background: var(--amt-border); border-radius: 3px; overflow: hidden; }
.amt-song-bar      { height: 100%; border-radius: 3px; }
.amt-song-score    { font-size: 13px; font-weight: 500; min-width: 30px; text-align: right; color: var(--amt-text-sec); }

/* Battle winner */
.amt-winner-box {
    text-align: center; padding: 20px;
    border-radius: var(--amt-radius);
    background: rgba(127,119,221,.07);
    border: 1px solid var(--amt-accent);
    margin-top: 12px;
}
.amt-winner-title  { font-size: 12px; color: var(--amt-text-muted); margin-bottom: 4px; }
.amt-winner-name   { font-size: 20px; font-weight: 500; }
.amt-winner-margin { font-size: 13px; color: var(--amt-accent); margin-top: 4px; }

/* AI box */
.amt-ai-box {
    padding: 14px; border-radius: var(--amt-radius);
    border: 0.5px solid var(--amt-border);
    background: var(--amt-surface);
    min-height: 80px; font-size: 13px; line-height: 1.8;
}
.amt-ai-box--loading { color: var(--amt-text-muted); font-style: italic; }
