* {
    box-sizing: border-box;
}

:root {
    --bg: #0c1117;
    --panel-border: rgba(141, 181, 214, 0.18);
    --text: #e8edf3;
    --muted: #99a8b8;
    --accent: #1db954;
    --accent-strong: #22d462;
    --danger: #c84f4f;
    --danger-strong: #de6666;
    --warning-bg: rgba(201, 157, 56, 0.14);
    --warning-border: rgba(224, 176, 70, 0.42);
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
}

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(29, 185, 84, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(87, 125, 164, 0.14), transparent 32%),
        linear-gradient(180deg, #091017 0%, #0d141d 52%, #101923 100%);
    padding: 24px;
}

.container {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.lfm-shell {
    background: rgba(10, 14, 20, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 28px;
    backdrop-filter: blur(16px);
}

.auth-panel,
.panel-card {
    background: linear-gradient(180deg, rgba(23, 31, 42, 0.98), rgba(16, 23, 33, 0.98));
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.auth-panel {
    padding: 30px;
}

.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 24px;
    align-items: center;
}

.hero-art img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.26);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.panel-card {
    padding: 22px;
}

.panel-title-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 18px;
}

.panel-kicker,
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.74rem;
    color: #7ab7d8;
    margin: 0;
}

h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
    margin: 8px 0 12px;
}

h2 {
    font-size: 1.2rem;
    margin: 0;
}

.intro-copy,
.field-help,
.session-status,
.limit-counter {
    color: var(--muted);
    line-height: 1.5;
}

.field-label {
    display: block;
    font-size: 0.9rem;
    color: #bfd0df;
    margin-bottom: 8px;
}

.app-select {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(191, 208, 223, 0.2);
    background: rgba(7, 11, 16, 0.74);
    color: var(--text);
    padding: 14px 16px;
    font-size: 0.96rem;
    outline: none;
    margin-bottom: 10px;
}

.app-select:focus {
    border-color: rgba(29, 185, 84, 0.56);
    box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.14);
}

.account-list-wrap {
    margin: 16px 0;
}

.account-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    gap: 8px;
}

.account-list li {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #d9e3ed;
}

.button-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.compact-row {
    margin-top: 10px;
}

.hero-actions {
    margin: 18px 0 10px;
}

.spotify-button {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 13px 20px;
    font-size: 0.94rem;
    font-weight: 700;
    text-decoration: none;
    color: #031008;
    background: linear-gradient(180deg, var(--accent-strong), var(--accent));
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    box-shadow: 0 12px 24px rgba(29, 185, 84, 0.24);
}

.spotify-button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.spotify-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.secondary-button,
.nav-button {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

.danger-button {
    color: #fff3f3;
    background: linear-gradient(180deg, var(--danger-strong), var(--danger));
    box-shadow: 0 12px 24px rgba(200, 79, 79, 0.22);
}

.text-button {
    appearance: none;
    border: 0;
    background: transparent;
    color: #9ec4dd;
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
    text-decoration: underline;
}

.timer-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.timer-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    padding: 22px;
    margin: 14px 0;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(29, 185, 84, 0.15), rgba(122, 183, 216, 0.08));
    border: 1px solid rgba(29, 185, 84, 0.26);
}

#timerDisplay {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1;
}

#timerUnit {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #b2c6d8;
}

.alert-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 12px;
}

.alert-box.warning {
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    color: #ffd998;
}

.hidden {
    display: none !important;
}

@media (max-width: 1024px) {
    .hero-layout,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
    }

    .header-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    body {
        padding: 12px;
    }

    .lfm-shell {
        padding: 16px;
        border-radius: 18px;
    }

    .auth-panel,
    .panel-card {
        padding: 18px;
    }

    .button-row,
    .header-actions {
        flex-direction: column;
    }

    .spotify-button,
    .nav-button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}
