/* The Journey — DRMA Progress Tracker */

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

:root {
    --bg: #0f1115;
    --surface: #16181f;
    --surface-2: #1e2028;
    --border: #2a2c35;
    --text: #f4f1ec;
    --text-dim: #9a9aaa;
    --accent: #e6b65c;
    --accent-glow: #e6b65c30;
    --gold: #e6b65c;
    --gold-light: #f0cc7a;
    --green: #4ecdc4;
    --green-glow: #4ecdc430;
    --radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon { font-size: 28px; }

.brand h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.songs-counter {
    text-align: right;
}

.songs-counter #songs-count {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--gold);
}

.songs-label {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main */
main {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Overall Card */
.overall-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.overall-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.big-stat {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}

.big-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
}

.big-unit {
    font-size: 24px;
    font-weight: 700;
    color: var(--gold);
    margin-left: 2px;
}

.big-label {
    width: 100%;
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.mini-stats {
    display: flex;
    gap: 20px;
}

.mini-stat { text-align: center; }

.mini-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--green);
}

.mini-label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.overall-bar {
    height: 8px;
    background: var(--surface-2);
    border-radius: 4px;
    overflow: hidden;
}

.overall-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 4px;
    transition: width 0.6s ease;
    width: 0%;
}

/* Songs Card */
.songs-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.songs-card h3 {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 4px;
}

.songs-subtitle {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.songs-input-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.songs-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.songs-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.songs-display {
    font-size: 36px;
    font-weight: 800;
    color: var(--gold);
    min-width: 60px;
}

/* Pillars */
.pillars {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.pillar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.pillar-card:hover {
    border-color: var(--gold);
    box-shadow: 0 0 20px var(--accent-glow);
}

.pillar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pillar-number {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pillar-name {
    font-size: 16px;
    font-weight: 600;
}

.pillar-pct {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold);
}

.pillar-bar {
    height: 4px;
    background: var(--surface-2);
    border-radius: 2px;
    overflow: hidden;
}

.pillar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s ease;
}

.pillar-fill.p1 { background: #e74c3c; }
.pillar-fill.p2 { background: #e67e22; }
.pillar-fill.p3 { background: #f1c40f; }
.pillar-fill.p4 { background: #2ecc71; }
.pillar-fill.p5 { background: #3498db; }
.pillar-fill.p6 { background: #9b59b6; }

.pillar-desc {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 6px;
}

/* Check In Button */
.checkin-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--gold), #c49530);
    border: none;
    border-radius: var(--radius);
    color: var(--bg);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
}

.checkin-btn:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.checkin-btn:active { transform: scale(0.99); }

.checkin-btn.checked {
    background: var(--green);
    pointer-events: none;
}

.last-checkin {
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 24px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-header h2 {
    font-size: 18px;
    color: var(--gold);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
}

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

.modal-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-bar {
    flex: 1;
    height: 6px;
    background: var(--surface-2);
    border-radius: 3px;
    overflow: hidden;
}

.modal-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 3px;
    transition: width 0.3s;
}

#modal-progress-text {
    font-size: 14px;
    color: var(--text-dim);
    white-space: nowrap;
}

/* Milestones */
.milestone-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.milestone-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface-2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.milestone-item:hover {
    background: var(--border);
}

.milestone-check {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.2s;
}

.milestone-item.done .milestone-check {
    background: var(--green);
    border-color: var(--green);
    color: var(--bg);
}

.milestone-text {
    font-size: 14px;
    color: var(--text);
}

.milestone-item.done .milestone-text {
    color: var(--text-dim);
    text-decoration: line-through;
}

.hidden { display: none !important; }

/* Footer */
footer {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
}

@media (max-width: 480px) {
    main { padding: 12px; }
    .big-number { font-size: 36px; }
    .mini-stats { gap: 12px; }
}
