@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #fbbf24;
    --primary-glow: rgba(251, 191, 36, 0.3);
    --bg-deep: #0a0a0a;
    --panel-bg: rgba(20, 20, 20, 0.95);
    --panel-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-dim: #64748b;
    --success: #22c55e;
    --danger: #ef4444;
    --gold: linear-gradient(135deg, #fde047 0%, #fbbf24 50%, #d97706 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-deep);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* === Dashboard Container === */
.dashboard-container {
    width: 100%;
    max-width: 1200px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 2rem 3rem;
}

/* === Header === */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.user-tag {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--panel-bg);
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    border: 1px solid var(--panel-border);
}

.avatar {
    width: 32px;
    height: 32px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.nav-group {
    display: flex;
    gap: 1rem;
}

/* === Buttons === */
.btn {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.85rem 1.75rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

.btn-primary {
    background: var(--gold);
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px var(--primary-glow);
}

.btn-nav {
    background: var(--panel-bg);
    color: var(--text-main);
    border: 1px solid var(--panel-border);
}

.btn-nav:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    width: 100%;
    margin-top: 1rem;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

/* === Score Hero === */
.score-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.score-hero::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--primary-glow);
    filter: blur(120px);
    z-index: 0;
}

.score-hero .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: var(--text-dim);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.score-main {
    font-size: clamp(6rem, 15vw, 12rem);
    font-weight: 800;
    background: var(--gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.score-hero .quote {
    color: var(--text-dim);
    font-size: 1rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

/* === FAB === */
.fab-container {
    position: fixed;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.btn-fab {
    padding: 1.25rem 3rem;
    font-size: 1.1rem;
    border-radius: 100px;
    box-shadow: 0 15px 50px var(--primary-glow);
}

/* === Modal System === */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 28px;
    padding: 2.5rem;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active .modal-card {
    transform: scale(1) translateY(0);
}

.modal-small {
    max-width: 400px;
}

.modal-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* === Activity List === */
.activity-list {
    max-height: 50vh;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.activity-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    padding: 1rem 1.25rem;
    border-radius: 14px;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: translateX(5px);
}

.points-pill {
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
}

.pill-plus {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.pill-minus {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* === Logs Table === */
.logs-container {
    max-height: 40vh;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
}

.logs-table th {
    text-align: left;
    padding: 0.75rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--primary);
    border-bottom: 1px solid var(--panel-border);
}

.logs-table td {
    padding: 0.75rem;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.变动-plus {
    color: var(--success);
    font-weight: 600;
}

.变动-minus {
    color: var(--danger);
    font-weight: 600;
}

/* === Input === */
.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    padding: 1rem;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* === Toast === */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: white;
    color: #000;
    padding: 1rem 2rem;
    border-radius: 100px;
    font-weight: 700;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* === Login Page Styles === */
.glass-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 28px;
    padding: 3rem;
    width: 90%;
    max-width: 420px;
}

.glass-card h1 {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-align: center;
    margin-bottom: 0.5rem;
}

.subtitle {
    text-align: center;
    color: var(--text-dim);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.glass-card .btn {
    width: 100%;
}

.error-msg {
    color: var(--danger);
    font-size: 0.9rem;
    background: rgba(244, 63, 94, 0.1);
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(244, 63, 94, 0.2);
    margin: 1.5rem 0;
}

/* === System Notice === */
.system-notice {
    margin-top: 2rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    /* Pill shape */
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.6;
    text-align: center;
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    75% {
        transform: translateX(8px);
    }
}

.shake {
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

/* === Leaderboard Table === */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th {
    text-align: left;
    padding: 0.75rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--primary);
    border-bottom: 1px solid var(--panel-border);
}

.leaderboard-table td {
    padding: 1rem 0.75rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--panel-border);
    border-radius: 10px;
}