@import url("https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Mono:wght@300;400;500&display=swap");

:root {
    /* === CORE SURFACES === */
    --bg: #0b0d0c;
    --bg-1: #121513;
    --bg-2: #171b19;
    --bg-3: #1f2522;
    --surface: #141917;
    --border: #27302b;
    --border-2: #34403a;

    /* === TEXT === */
    --text: #e6f1ea;
    --text-2: #9fb3a7;
    --text-3: #5f6f66;

    /* === PRIMARY (Sports Neon Green - tuned) === */
    --accent: #7dff2a; /* core: high-energy lime (less yellow than before) */
    --accent-light: #a2ff5a; /* hover / highlight */
    --accent-dim: #5ec21f; /* pressed / controlled */
    --accent-deep: #3f8f14; /* rare usage (active states / depth) */

    --accent-bg: rgba(125, 255, 42, 0.08);
    --accent-bg-strong: rgba(125, 255, 42, 0.16);

    /* === SYSTEM COLORS === */
    --green: #39e079; /* success (separate from accent) */
    --green-bg: rgba(57, 224, 121, 0.1);

    --red: #ff4d4f;
    --red-bg: rgba(255, 77, 79, 0.1);

    --blue: #4da3ff;
    --amber: #ffb020;

    /* === ENERGY SUPPORT (used sparingly) === */
    --neon-edge: #cfff4a; /* edge glow / highlight accents */
    --toxic-shadow: rgba(125, 255, 42, 0.25);

    /* === LAYOUT === */
    --topbar-h: 52px;
    --statsbar-h: 72px;
    --friends-w: 48px;

    /* === SHAPE LANGUAGE === */
    --radius: 4px; /* sharper = more “hardware / strength” */
    --radius-lg: 8px;

    /* === TYPOGRAPHY === */
    --font-display: "Syne", sans-serif;
    --font-mono: "DM Mono", monospace;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html,
body {
    height: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
button {
    font-family: var(--font-mono);
    cursor: pointer;
    border: none;
    background: 0 0;
    color: inherit;
}
input,
select,
textarea {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text);
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    padding: 8px 10px;
    width: 100%;
    outline: 0;
    transition: border-color 0.15s;
}
input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-bg);
}
input[readonly] {
    color: var(--text-2);
    cursor: default;
}
select option {
    background: var(--bg-2);
}
label {
    display: block;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 5px;
}
textarea {
    resize: vertical;
    min-height: 72px;
}
a {
    color: var(--accent);
    text-decoration: none;
}
.hidden {
    display: none !important;
}
.field-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1em;
}
.field-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.flex-1 {
    flex: 1;
}
.flex-2 {
    flex: 2;
}
.btn-primary,
.btn-secondary,
.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 9px 18px;
    border-radius: var(--radius);
    transition: background 0.15s;
}
.btn-primary {
    background: var(--accent);
    color: #000;
    font-weight: 500;
    letter-spacing: 0.04em;
    transition:
        background 0.15s,
        transform 0.1s;
}
.btn-primary:hover {
    background: #d8ff20;
}
.btn-primary:active {
    transform: scale(0.97);
}
.btn-secondary {
    background: var(--bg-3);
    color: var(--text-2);
    border: 1px solid var(--border-2);
    transition:
        background 0.15s,
        color 0.15s;
}
.btn-secondary:hover {
    background: var(--bg-2);
    color: var(--text);
}
.btn-danger {
    background: var(--red) !important;
    color: #fff !important;
    font-weight: 500;
    letter-spacing: 0.04em;
    border: none;
    cursor: pointer;
}
.btn-danger:hover {
    background: #f55;
    transform: scale(0.98);
}
.btn-danger:active {
    transform: scale(0.97);
}
.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
.btn-sm {
    padding: 6px 12px;
    font-size: 11px;
}
.auth-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    z-index: 1000;
}

.auth-screen {
    flex-direction: column;
    margin-bottom: 8em;
}

.auth-logo img {
    width: 100%;
}
.auth-card {
    width: min(400px, calc(100vw - 32px));
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}
.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}
.auth-logo i {
    font-size: 40px;
    color: var(--accent);
    display: block;
    margin-bottom: 10px;
}
.auth-logo h1 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}
.auth-logo p {
    font-size: 11px;
    color: var(--text-3);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 4px;
}
.auth-tabs,
.admin-tabs {
    display: flex;
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 22px;
}
.auth-tab,
.admin-tab {
    flex: 1;
    padding: 8px;
    font-size: 11px;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-3);
    background: 0 0;
    transition:
        background 0.15s,
        color 0.15s;
}
.admin-tab {
    border-right: 1px solid var(--border);
}
.admin-tab:last-child {
    border-right: none;
}
.auth-tab.active,
.admin-tab.active {
    background: var(--accent);
    color: #000;
    font-weight: 500;
}
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.auth-form button[type="submit"] {
    width: 100%;
    justify-content: center;
}
.auth-error,
.modal-error {
    background: var(--red-bg);
    border: 1px solid var(--red);
    border-radius: var(--radius);
    padding: 8px 12px;
    color: var(--red);
    font-size: 12px;
    margin-bottom: 12px;
}
.app {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--topbar-h);
    background: var(--bg-1);
    border-bottom: 1px solid var(--border);
    padding: 0 8px;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    gap: 1em;
}
.topbar button {
    aspect-ratio: 1/1;
}
.topbar-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.01em;
    flex: 100;
}
.topbar-title i {
    color: var(--accent);
    font-size: 18px;
}
.topbar-title:hover {
    cursor: pointer;
    color: var(--accent);
}
.topbar-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-2);
    transition:
        background 0.15s,
        color 0.15s;
}
.topbar-btn:hover {
    background: var(--bg-3);
    color: var(--text);
}
.topbar-btn--accent {
    color: var(--accent);
}
.topbar-btn--accent:hover {
    background: var(--accent-bg);
}
.stats-bar,
.stats-center {
    display: flex;
    align-items: center;
    height: var(--statsbar-h);
    background: var(--bg-1);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    flex-shrink: 0;
    scrollbar-width: none;
}
.stats-bar {
    gap: 0;
}
.stats-center {
    gap: 0;
    margin: 0 auto;
    max-width: 640px;
    padding-left: 48px;
}
.stats-bar::-webkit-scrollbar,
.friends-panel::-webkit-scrollbar {
    display: none;
}
.stats-center .stat-chip:first-child {
    border-left: 1px solid var(--border);
}
.stat-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    padding: 0 14px;
    border-right: 1px solid var(--border);
    height: 100%;
    gap: 1px;
}
.stat-chip i {
    font-size: 13px;
    color: var(--text-3);
}
.stat-chip .stat-label {
    font-size: 9px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-3);
}
.stat-chip .stat-value {
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
}
.stat-chip .stat-value.positive {
    color: var(--red);
}
.stat-chip .stat-value.negative {
    color: var(--green);
}
.main-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}
.friends-panel {
    width: var(--friends-w);
    background: var(--bg-1);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    gap: 6px;
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
    scrollbar-width: none;
}
.friend-slot {
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    position: relative;
    cursor: pointer;
    transition:
        background 0.15s,
        transform 0.1s;
    flex-shrink: 0;
}
.friend-slot--add {
    background: var(--bg-3);
    color: var(--accent);
    border: 1px dashed var(--border-2);
    font-size: 13px;
}
.friend-slot--add:hover {
    background: var(--accent-bg);
    border-color: var(--accent);
}
.friend-slot--user {
    background: var(--bg-3);
    color: var(--text-2);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    border: 1px solid var(--border);
    text-transform: uppercase;
}
.friend-slot--user:hover {
    background: var(--bg-2);
    color: var(--text);
}
.friend-slot--user.active {
    background: var(--accent-bg);
    border-color: var(--accent);
    color: var(--accent);
}
.friends-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
}
.feed-panel {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 640px;
    margin: 0 auto;
}
.feed-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.feed-filter-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: var(--radius);
    border: 1px solid var(--border-2);
    color: var(--text-2);
    background: var(--bg-2);
    transition: all 0.15s;
}
.feed-filter-btn.active {
    background: var(--accent-bg);
    border-color: var(--accent);
    color: var(--accent);
}
.feed-filter-name {
    font-size: 11px;
    color: var(--text-2);
    padding: 4px 10px;
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
}
.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.2s;
    margin-bottom: 1em;
}
.post-card:hover {
    border-color: var(--border-2);
}
.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}
.post-user {
    display: flex;
    align-items: center;
    gap: 8px;
}
.post-avatar {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--accent);
    flex-shrink: 0;
}
.post-username {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
}
.post-time {
    font-size: 10px;
    color: var(--text-3);
    letter-spacing: 0.04em;
}
.post-body {
    padding: 12px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.post-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    color: var(--text-2);
}
.post-pill i {
    color: var(--text-3);
    font-size: 12px;
}
.post-pill--accent {
    background: var(--accent-bg);
    border-color: var(--accent);
    color: var(--accent);
}
.post-pill--green {
    background: var(--green-bg);
    border-color: var(--green);
    color: var(--green);
}
.post-pill--red {
    background: var(--red-bg);
    border-color: var(--red);
    color: var(--red);
}
.post-note {
    width: 100%;
    font-size: 12px;
    color: var(--text-2);
    border-top: 1px solid var(--border);
    padding: 10px 14px;
    line-height: 1.6;
}
.post-note i {
    margin-right: 5px;
    color: var(--text-3);
}
.post-meal-items {
    width: 100%;
    border-top: 1px solid var(--border);
    padding: 8px 14px;
}
.meal-item-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-2);
    padding: 2px 0;
}
.meal-item-row span:last-child {
    color: var(--text-3);
}
.post-skeleton {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    height: 80px;
    position: relative;
    overflow: hidden;
}
.post-skeleton::after,
.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 25%,
        var(--bg-2) 50%,
        transparent 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
.skeleton {
    background: var(--bg-3);
    border-radius: 3px;
    color: transparent !important;
    position: relative;
    overflow: hidden;
    min-width: 40px;
}
.feed-skeleton {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 8px 0 16px;
}
.feed-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    color: var(--text-3);
}
.feed-empty i {
    font-size: 40px;
}
.feed-empty p {
    font-size: 12px;
    text-align: center;
}
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 50;
    backdrop-filter: blur(2px);
}
.drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: var(--bg-1);
    border-right: 1px solid var(--border-2);
    z-index: 51;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.25s var(--ease);
}
.drawer.open {
    transform: translateX(0);
}
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}
.drawer-header span {
    font-family: var(--font-display);
    font-size: 14px;
}
.drawer-close,
.modal-close {
    width: 30px;
    height: 30px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    font-size: 16px;
    transition: background 0.15s;
}
.drawer-close:hover,
.modal-close:hover {
    background: var(--bg-3);
    color: var(--text);
}
.drawer-menu {
    list-style: none;
    padding: 10px 8px;
    flex: 1;
    overflow-y: auto;
}
.drawer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-2);
    transition:
        background 0.15s,
        color 0.15s;
    text-align: left;
}
.drawer-item:hover {
    background: var(--bg-2);
    color: var(--text);
}
.drawer-item i {
    font-size: 16px;
}
.drawer-item--danger {
    color: var(--red) !important;
}
.drawer-item--danger:hover {
    background: var(--red-bg) !important;
}
.drawer-divider {
    border-top: 1px solid var(--border);
    margin: 8px 0;
}
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100;
    backdrop-filter: blur(3px);
}
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(420px, calc(100vw - 24px));
    max-height: 90dvh;
    background: var(--bg-1);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    z-index: 101;
    display: flex;
    flex-direction: column;
    box-shadow: 0 32px 100px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}
.modal--wide {
    width: min(580px, calc(100vw - 24px));
}
.modal--fullscreen {
    width: 90vw;
    max-width: 900px;
    height: 85vh;
    max-height: 85vh;
    z-index: 10000;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.modal-header h2 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-header h2 i {
    color: var(--accent);
}
.modal-body {
    padding: 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    position: relative;
}
.modal--fullscreen .modal-body {
    overflow-y: auto;
    flex: 1;
    z-index: 10000;
}
.modal-footer {
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
}
.post-section-row {
    display: flex;
    gap: 16px;
}
.post-section {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.post-section-title {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 6px;
}
.meal-items-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.meal-item-tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 5px 9px;
    font-size: 11px;
}
.meal-item-tag button {
    color: var(--text-3);
    font-size: 14px;
    transition: color 0.15s;
    line-height: 1;
}
.meal-item-tag button:hover {
    color: var(--red);
}
.lb-controls {
    margin-bottom: 0;
}
.lb-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lb-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    transition: border-color 0.15s;
}
.lb-row:hover {
    border-color: var(--border-2);
}
.lb-row.rank-1 {
    border-color: var(--accent);
    background: var(--accent-bg);
}
.lb-row.rank-2 {
    border-color: #888;
}
.lb-row.rank-3 {
    border-color: var(--amber);
}
.lb-rank {
    width: 22px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 14px;
    color: var(--text-3);
    text-align: center;
}
.lb-row.rank-1 .lb-rank {
    color: var(--accent);
}
.lb-row.rank-2 .lb-rank {
    color: #bbb;
}
.lb-row.rank-3 .lb-rank {
    color: var(--amber);
}
.lb-name {
    flex: 1;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
}
.lb-score {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
}
.lb-meta {
    font-size: 10px;
    color: var(--text-3);
}
.admin-tabs {
    margin-bottom: 0;
}
.admin-tab-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.admin-add-form {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.admin-table {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.admin-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    font-size: 12px;
}
.admin-row-name {
    flex: 1;
}
.admin-row-meta {
    color: var(--text-3);
    font-size: 11px;
    white-space: nowrap;
}
.admin-row-actions {
    display: flex;
    gap: 5px;
}
.admin-btn {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-3);
    transition:
        background 0.15s,
        color 0.15s;
}
.admin-btn:hover {
    background: var(--bg-3);
    color: var(--text);
}
.admin-btn--danger:hover {
    background: var(--red-bg);
    color: var(--red);
}
.admin-edit-input {
    flex: 2;
    padding: 4px 7px;
    font-size: 12px;
}
.admin-meta-input {
    width: 80px;
    padding: 4px 7px;
    font-size: 12px;
}
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
::-webkit-scrollbar-track {
    background: 0 0;
}
::-webkit-scrollbar-thumb {
    background: var(--border-2);
    border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-3);
}
.suggestion-input-wrapper {
    position: relative;
    width: 100%;
}
.suggestion-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    margin-top: 4px;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.suggestion-dropdown.visible {
    display: block;
}
.suggestion-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border);
}
.suggestion-item:last-child {
    border-bottom: none;
}
.suggestion-item:hover {
    background: var(--bg-3);
}
.suggestion-content {
    flex: 1;
    font-size: 12px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.suggestion-meta {
    font-size: 10px;
    color: var(--text-3);
}
.suggestion-star {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    transition: all 0.15s;
    background: 0 0;
    cursor: pointer;
}
.suggestion-star:hover {
    background: var(--bg-3);
    color: var(--amber);
}
.suggestion-star.favorited {
    color: var(--amber);
}
.suggestion-star.favorited:hover {
    color: var(--text-3);
}
.suggestion-empty {
    padding: 12px;
    text-align: center;
    color: var(--text-3);
    font-size: 12px;
}
.markdown-body {
    font-family: var(--font-mono);
    line-height: 1.7;
    color: var(--text-2);
}
.markdown-body h1 {
    font-family: var(--font-display);
    font-size: 28px;
    margin: 24px 0 16px;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}
.markdown-body h2 {
    font-family: var(--font-display);
    font-size: 20px;
    margin: 20px 0 12px;
    color: var(--text);
}
.markdown-body h3 {
    font-family: var(--font-display);
    font-size: 16px;
    margin: 16px 0 10px;
    color: var(--text);
}
.markdown-body p {
    margin: 12px 0;
}
.markdown-body ul,
.markdown-body ol {
    margin: 12px 0 12px 24px;
}
.markdown-body li {
    margin: 6px 0;
}
.markdown-body code {
    background: var(--bg-2);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
}
.markdown-body pre {
    background: var(--bg-2);
    padding: 12px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 16px 0;
}
.markdown-body pre code {
    background: 0 0;
    padding: 0;
}
.markdown-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}
.markdown-body a {
    color: var(--accent);
    text-decoration: underline;
}
.markdown-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-3);
}
.auth-terms {
    margin: 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}
.auth-terms input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}
.auth-terms label {
    margin: 0;
    cursor: pointer;
    text-transform: none;
    letter-spacing: normal;
    font-size: 11px;
}
.auth-terms a {
    color: var(--accent);
    text-decoration: underline;
    cursor: pointer;
}
.auth-terms a:hover {
    color: var(--accent-dim);
}
.password-wrapper {
    position: relative;
    width: 100%;
}
.password-wrapper input {
    padding-right: 40px;
}
.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: 0 0;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}
.password-toggle:hover {
    color: var(--accent);
}
.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}
.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}
.remember-me label {
    margin: 0;
    cursor: pointer;
    text-transform: none;
    letter-spacing: normal;
    font-size: 12px;
}
.user-id-bar {
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    margin-bottom: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    transition: all 0.15s;
}
.user-id-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: hidden;
    position: relative;
}
.user-id-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.user-id-label i {
    font-size: 12px;
}
.user-id-value {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-2);
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
    padding: 2px 0;
    flex: 1;
    min-width: 0;
}
.user-id-value::-webkit-scrollbar {
    height: 3px;
}
.user-id-value::-webkit-scrollbar-track {
    background: var(--bg-3);
    border-radius: 3px;
}
.user-id-value::-webkit-scrollbar-thumb {
    background: var(--border-2);
    border-radius: 3px;
}
.user-id-value::-webkit-scrollbar-thumb:hover {
    background: var(--text-3);
}
.user-id-value:hover {
    scroll-behavior: smooth;
    scrollbar-width: thin;
}
.copy-id-btn {
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    padding: 4px 8px;
    font-size: 12px;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    position: relative;
}
.copy-id-btn:hover {
    background: var(--accent-bg);
    border-color: var(--accent);
    color: var(--accent);
}
.copy-id-btn:active {
    transform: scale(0.97);
}
.copy-id-btn.copied {
    background: var(--green-bg);
    border-color: var(--green);
    color: var(--green);
}
.copy-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-3);
    color: var(--text);
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    margin-bottom: 8px;
    border: 1px solid var(--border-2);
}
.copy-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 4px;
    border-style: solid;
    border-color: var(--bg-3) transparent transparent;
}
.copy-id-btn:hover .copy-tooltip {
    opacity: 1;
}
.reg-code-feedback {
    font-size: 10px;
    margin-top: 4px;
    padding: 4px 8px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 6px;
}
.reg-code-feedback.valid {
    color: var(--green);
    background: var(--green-bg);
}
.reg-code-feedback.invalid {
    color: var(--red);
    background: var(--red-bg);
}
.reg-code-feedback.hidden {
    display: none;
}
#reg-code {
    padding-right: 35px;
}
.pwa-install-container {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-2);
    text-align: center;
    position: fixed;
    bottom: 1em;
    left: 0;
    right: 0;
}
.pwa-install-btn {
    width: 225px;
    background-color: transparent;
    border: none;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    margin: 0 auto;
}
.pwa-install-btn:hover {
    background: 0 0;
    border-color: transparent;
    color: var(--accent);
}
.pwa-install-btn i {
    font-size: 16px;
}
.pwa-install-btn.ready {
    animation: pulse 1.5s ease-in-out 2;
    border-color: var(--accent);
    background: var(--accent-bg);
    color: var(--accent);
}
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}
.settings-section {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.settings-section--danger {
    border-color: var(--red);
    background: var(--red-bg);
}
.settings-section-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}
.settings-section--danger .settings-section-title {
    color: var(--red);
}
.settings-warning {
    font-size: 12px;
    color: var(--red);
    background: var(--red-bg);
    padding: 10px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    border-left: 3px solid var(--red);
}
.settings-checkbox {
    margin: 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.settings-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}
.settings-checkbox label {
    margin: 0;
    cursor: pointer;
    text-transform: none;
    letter-spacing: normal;
    font-size: 12px;
    color: var(--text-2);
}
.settings-error {
    margin-top: 12px;
    padding: 8px 12px;
    background: var(--red-bg);
    border: 1px solid var(--red);
    border-radius: var(--radius);
    color: var(--red);
    font-size: 12px;
}
.settings-success {
    margin-top: 12px;
    padding: 8px 12px;
    background: var(--green-bg);
    border: 1px solid var(--green);
    border-radius: var(--radius);
    color: var(--green);
    font-size: 12px;
}
.settings-divider {
    height: 1px;
    background: var(--border);
    margin: 24px 0;
}
@media (max-width: 480px) {
    .stat-chip {
        min-width: 70px;
        padding: 0 8px;
    }
    .stat-chip .stat-label {
        font-size: 8px;
    }
    .topbar-title span {
        display: none;
    }
    .feed-panel {
        padding: 8px;
    }
    .user-id-bar {
        padding: 6px 10px;
    }
    .user-id-label {
        font-size: 10px;
    }
    .user-id-label i {
        font-size: 11px;
    }
    .user-id-value {
        font-size: 10px;
    }
    .copy-id-btn {
        padding: 3px 6px;
        font-size: 11px;
    }
    .copy-tooltip {
        font-size: 9px;
        padding: 3px 6px;
    }
}
/* ─────────────────────────────────────────────
   THEME SELECTION
───────────────────────────────────────────── */
.theme-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0;
    padding: 12px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.theme-preview-colors {
    display: flex;
    gap: 8px;
}

.theme-color-preview {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
    transition: transform 0.2s;
}

.theme-color-preview:hover {
    transform: scale(1.1);
}

.theme-preview-text {
    font-size: 11px;
    color: var(--text-3);
    font-style: italic;
}

#settings-theme-select {
    cursor: pointer;
}

#settings-apply-theme-btn {
    margin-top: 8px;
    width: 100%;
}
/* Theme preview transition */
#theme-preview-temp {
    transition: all 0.3s ease;
}

.theme-preview-colors {
    transition: all 0.2s;
}

/* Optional: Add loading state for theme switching */
body.theme-switching {
    opacity: 0.8;
    transition: opacity 0.2s;
}
.drawer-theme-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--text-3);
    padding: 4px 8px;
    background: var(--bg-2);
    border-radius: var(--radius);
}

.drawer-theme-indicator i {
    font-size: 10px;
}

/* Step Tracker */
.steps-display {
    text-align: center;
    margin: 1rem 0;
}
.step-number {
    font-size: 4rem;
    font-family: var(--font-display);
    color: var(--accent);
    line-height: 1;
}
.step-unit {
    font-size: 1.2rem;
    color: var(--text-3);
    margin-left: 0.25rem;
}
.steps-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

/* Timer */
.timer-number {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 500;
    background: var(--bg-2);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-2);
    letter-spacing: 0.1em;
}
.timer-controls {
    margin-top: 1rem;
}

/* Additional spacing for buttons */
.topbar-btn {
    transition: all 0.2s;
}
.topbar-btn:hover {
    transform: translateY(-1px);
}
