html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html,
body {
    min-height: 100%;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #101014;
    color: #ffffff;
}

/* =========================
   AUTH PAGES
========================= */

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #1b1b23;
    border: 1px solid #2e2e3a;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

    .auth-card h1 {
        margin: 0 0 8px;
        font-size: 32px;
        font-weight: 700;
    }

.auth-subtitle {
    margin: 0 0 24px;
    color: #b7b7c7;
    font-size: 15px;
}

.auth-card label {
    display: block;
    margin: 16px 0 6px;
    color: #d7d7e5;
    font-size: 14px;
    font-weight: 600;
}

.auth-card input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #3b3b4a;
    background: #111118;
    color: #ffffff;
    border-radius: 12px;
    padding: 13px 14px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s ease;
}

    .auth-card input:focus {
        border-color: #ffcc33;
    }

.auth-card button {
    width: 100%;
    border: 0;
    border-radius: 12px;
    background: #ffcc33;
    color: #111111;
    padding: 14px 16px;
    margin-top: 22px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

    .auth-card button:hover {
        opacity: 0.9;
    }

.auth-link {
    text-align: center;
    color: #b7b7c7;
    margin: 20px 0 0;
    font-size: 14px;
}

    .auth-link a {
        color: #ffcc33;
        text-decoration: none;
        font-weight: 700;
    }

        .auth-link a:hover {
            text-decoration: underline;
        }

.auth-logo {
    width: 180px;
    max-width: 100%;
    display: block;
    margin: 0 auto 20px auto;
    border-radius: 50%;
}

.auth-card {
    text-align: center;
}

    .auth-card form {
        text-align: left;
    }

.validation-summary,
.field-validation {
    color: #ff6b6b;
    font-size: 14px;
}

.field-validation {
    display: block;
    margin-top: 5px;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 576px) {
    .auth-card {
        padding: 22px;
        border-radius: 14px;
    }

        .auth-card h1 {
            font-size: 28px;
        }

        .auth-card button {
            font-size: 16px;
        }
}

/* =========================
   DASHBOARD
========================= */

.dashboard-shell {
    padding: 24px;
    max-width: 1000px;
    margin: auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

    .dashboard-header h1 {
        margin: 0;
    }

.logout-btn {
    border: 0;
    background: #ffcc33;
    color: #111;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
}

.welcome-card {
    background: #1b1b23;
    border: 1px solid #2e2e3a;
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 24px;
}

.dashboard-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.dashboard-card {
    background: #1b1b23;
    border: 1px solid #2e2e3a;
    border-radius: 18px;
    padding: 24px;
    text-decoration: none;
    color: white;
    transition: transform .15s ease;
}

    .dashboard-card:hover {
        transform: translateY(-3px);
    }

    .dashboard-card h3 {
        margin: 12px 0 10px;
    }

.emoji {
    font-size: 42px;
}

/* =========================
   VOTING
========================= */

.vote-shell {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.vote-card {
    width: 100%;
    max-width: 550px;
    background: #1b1b23;
    border: 1px solid #2e2e3a;
    border-radius: 20px;
    padding: 30px;
}

    .vote-card h1 {
        margin: 0;
        font-size: 34px;
    }

    .vote-card h2 {
        color: #b7b7c7;
        font-weight: 400;
        margin-top: 10px;
    }

.vote-subtitle {
    color: #b7b7c7;
}

.vote-status {
    margin-bottom: 16px;
    font-weight: 700;
}

.vote-counts {
    display: flex;
    gap: 20px;
    margin: 28px 0;
}

.vote-count {
    flex: 1;
    text-align: center;
    border-radius: 16px;
    padding: 20px;
    font-size: 28px;
    font-weight: 700;
}

.thumbs-up {
    background: #1d3324;
}

.thumbs-down {
    background: #3d1f1f;
}

.vote-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 18px;
}

    .vote-buttons form {
        flex: 1;
    }

.vote-btn-up,
.vote-btn-down,
.close-vote-btn {
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 16px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.vote-btn-up {
    background: #38d66b;
}

.vote-btn-down {
    background: #ff6b6b;
}

.close-vote-btn {
    background: #ffcc33;
    color: #111;
}

.vote-result {
    margin-top: 24px;
    font-size: 24px;
    text-align: center;
}
.vote-note {
    margin-top: 18px;
    color: #b7b7c7;
    text-align: center;
    font-size: 14px;
}

.vote-error {
    background: #3d1f1f;
    color: #ffb3b3;
    border: 1px solid #8f3a3a;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 18px;
    text-align: center;
}

.results-list {
    display: grid;
    gap: 14px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: #1b1b23;
    border: 1px solid #2e2e3a;
    border-radius: 16px;
    padding: 18px;
    color: #ffffff;
    text-decoration: none;
}

    .result-row strong {
        display: block;
        font-size: 18px;
    }

    .result-row span {
        display: block;
        color: #b7b7c7;
        margin-top: 4px;
    }

.result-votes {
    white-space: nowrap;
    font-weight: 700;
}
/* =========================
   APP LAYOUT / BOTTOM NAV
========================= */

.app-main {
    min-height: 100vh;
    padding-bottom: 92px;
}

.bottom-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 1000;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    background: rgba(27, 27, 35, 0.96);
    border: 1px solid #2e2e3a;
    border-radius: 22px;
    padding: 8px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
}

.bottom-nav-item {
    color: #b7b7c7;
    text-decoration: none;
    text-align: center;
    border-radius: 16px;
    padding: 8px 4px;
    font-weight: 700;
}

    .bottom-nav-item span {
        display: block;
        font-size: 22px;
        line-height: 22px;
    }

    .bottom-nav-item small {
        display: block;
        margin-top: 4px;
        font-size: 11px;
    }

    .bottom-nav-item:hover {
        background: #262633;
        color: #ffffff;
    }

.bottom-nav-primary {
    background: #ffcc33;
    color: #111111;
}

    .bottom-nav-primary:hover {
        background: #ffcc33;
        color: #111111;
    }

@media (min-width: 800px) {
    .bottom-nav {
        max-width: 640px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
}

.your-vote-box {
    background: #262633;
    border: 1px solid #3b3b4a;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 20px;
    text-align: center;
    color: #d7d7e5;
}

    .your-vote-box strong {
        display: block;
        margin-top: 6px;
        color: #ffcc33;
        font-size: 20px;
    }

.selected-vote {
    outline: 3px solid #ffcc33;
    box-shadow: 0 0 20px rgba(255, 204, 51, 0.35);
}

.vote-toast {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 106px;
    z-index: 2000;
    background: #ffcc33;
    color: #111111;
    border-radius: 18px;
    padding: 16px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
    text-align: center;
}

    .vote-toast strong {
        display: block;
        margin-top: 4px;
        font-size: 18px;
    }

    .vote-toast span {
        display: block;
        margin-top: 3px;
        font-size: 13px;
    }
.detect-song-btn {
    width: 100%;
    border: 0;
    border-radius: 14px;
    background: #ffcc33;
    color: #111111;
    padding: 16px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    margin: 18px 0 10px;
}

    .detect-song-btn:disabled {
        opacity: 0.65;
        cursor: not-allowed;
    }

.detect-status {
    min-height: 24px;
    color: #ffcc33;
    text-align: center;
    font-weight: 700;
    margin-bottom: 14px;
}

.detected-song-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #262633;
    border: 1px solid #3b3b4a;
    border-radius: 16px;
    padding: 14px;
    margin: 14px 0 18px;
}

    .detected-song-preview img {
        width: 74px;
        height: 74px;
        border-radius: 12px;
        object-fit: cover;
    }

    .detected-song-preview strong,
    .detected-song-preview span,
    .detected-song-preview small {
        display: block;
    }

    .detected-song-preview strong {
        font-size: 18px;
    }

    .detected-song-preview span {
        color: #d7d7e5;
        margin-top: 3px;
    }

    .detected-song-preview small {
        color: #b7b7c7;
        margin-top: 5px;
    }
.form-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #3b3b4a;
    background: #111118;
    color: #ffffff;
    border-radius: 12px;
    padding: 13px 14px;
    font-size: 16px;
    outline: none;
}

    .form-input:focus {
        border-color: #ffcc33;
    }

.start-voting-btn {
    width: 100%;
    border: 0;
    border-radius: 14px;
    background: #ffcc33;
    color: #111111;
    padding: 16px;
    margin-top: 22px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
}

.detected-song-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #262633;
    border: 1px solid #3b3b4a;
    border-radius: 16px;
    padding: 14px;
    margin: 14px 0 18px;
}

    .detected-song-preview img {
        width: 74px;
        height: 74px;
        border-radius: 12px;
        object-fit: cover;
    }

    .detected-song-preview strong,
    .detected-song-preview span,
    .detected-song-preview small {
        display: block;
    }

    .detected-song-preview strong {
        font-size: 18px;
    }

    .detected-song-preview span {
        color: #d7d7e5;
        margin-top: 3px;
    }

    .detected-song-preview small {
        color: #b7b7c7;
        margin-top: 5px;
    }
.current-song-display {
    display: flex;
    gap: 18px;
    align-items: center;
    margin: 20px 0;
}

.current-song-artwork {
    width: 120px;
    height: 120px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.current-song-info h1 {
    margin: 0;
}

.current-song-info h2 {
    margin: 8px 0;
}

.current-song-info p {
    margin: 6px 0;
    color: #d7d7e5;
}

.current-song-info small {
    color: #b7b7c7;
}

.song-preview-audio {
    width: 100%;
    margin: 12px 0 16px;
}

.song-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.song-link-btn {
    flex: 1;
    min-width: 110px;
    text-align: center;
    background: #262633;
    border: 1px solid #3b3b4a;
    color: #ffffff;
    text-decoration: none;
    border-radius: 12px;
    padding: 12px;
    font-weight: 800;
}

    .song-link-btn:hover {
        background: #ffcc33;
        color: #111111;
    }

@media (max-width: 576px) {
    .current-song-display {
        align-items: flex-start;
    }

    .current-song-artwork {
        width: 92px;
        height: 92px;
        border-radius: 14px;
    }

    .current-song-info h1 {
        font-size: 26px;
    }
}
.result-row {
    display: flex;
    align-items: center;
}

.result-artwork,
.result-artwork-placeholder {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    flex: 0 0 auto;
    object-fit: cover;
    margin-right: 14px;
}

.result-artwork-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #262633;
    font-size: 24px;
}

.result-main {
    flex: 1;
    min-width: 0;
}

    .result-main strong,
    .result-main span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.home-current-vote {
    display: grid;
    gap: 8px;
}

.home-vote-artwork {
    width: 90px;
    height: 90px;
    border-radius: 16px;
    object-fit: cover;
    margin-bottom: 8px;
}
.voter-box {
    background: #262633;
    border: 1px solid #3b3b4a;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
}

    .voter-box h3 {
        margin: 0 0 12px;
        font-size: 18px;
    }

.voter-list {
    display: grid;
    gap: 10px;
}

.voter-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid #3b3b4a;
}

    .voter-row:first-child {
        border-top: 0;
    }

    .voter-row span {
        font-weight: 700;
    }

.voter-up {
    color: #38d66b;
}

.voter-down {
    color: #ff6b6b;
}
.voter-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.voter-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #ffcc33;
    color: #111111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex: 0 0 auto;
}

.voter-left span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.started-by {
    display: block;
    margin-top: 8px;
    color: #ffcc33;
    font-weight: 700;
}
.login-loading {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #ffcc33;
    font-weight: 600;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #ffcc33;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}