@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
    --bg: #0d0c10;
    --bg-2: #15121b;
    --surface: #1c1822;
    --surface-2: #25212d;
    --surface-3: #2e2936;
    --text: #f4f0e9;
    --muted: #b8b0a7;
    --accent: #d1a26f;
    --accent-2: #f1d4a1;
    --accent-3: #9ccbc1;
    --danger: #e26a6a;
    --warning: #d8aa4f;
    --stroke: rgba(255, 255, 255, 0.08);
    --shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
    --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.35);
    --radius: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    height: 100%;
}

/* --- Premium text selection --- */
::selection {
    background: rgba(209, 162, 111, 0.3);
    color: var(--text);
}

/* --- Custom scrollbar (webkit) --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.14);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

body {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    color: var(--text);
    background:
        radial-gradient(900px circle at 15% 15%, rgba(209, 162, 111, 0.16), transparent 60%),
        radial-gradient(700px circle at 85% 10%, rgba(241, 212, 161, 0.14), transparent 60%),
        radial-gradient(900px circle at 70% 80%, rgba(74, 64, 88, 0.45), transparent 60%),
        linear-gradient(135deg, #0c0a10 0%, #17121e 45%, #0c0a10 100%);
    background-attachment: fixed;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(120deg, rgba(255, 255, 255, 0.05) 0, rgba(255, 255, 255, 0.02) 100%),
        radial-gradient(1000px circle at 10% 90%, rgba(156, 203, 193, 0.08), transparent 60%);
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

h1, h2, h3 {
    font-family: 'Fraunces', serif;
    letter-spacing: 0.3px;
    margin: 0 0 12px 0;
}

p {
    margin: 0 0 12px 0;
    color: var(--muted);
}

.page,
.page-main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.container-xl {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.page-content {
    padding: 32px 0 64px;
}

.page-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: end;
    margin-bottom: 28px;
}

.page-title {
    font-size: clamp(1.8rem, 2.6vw, 2.4rem);
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--muted);
    max-width: 520px;
}

.eyebrow {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
}

.page-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 18px 0;
    background: rgba(13, 11, 15, 0.8);
    border-bottom: 1px solid var(--stroke);
    backdrop-filter: blur(16px);
}

.navbar-brand {
    font-size: 1.6rem;
    color: var(--text);
}

.nav-link {
    color: var(--muted);
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header-flex > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    gap: 24px;
    margin-bottom: 36px;
}

.hero-card {
    background: linear-gradient(145deg, rgba(36, 30, 40, 0.96), rgba(22, 18, 27, 0.9));
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-soft);
}

.hero-card .title {
    font-size: 2.2rem;
}

.hero-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    background: rgba(209, 162, 111, 0.18);
    border: 1px solid rgba(209, 162, 111, 0.35);
    color: var(--accent-2);
}

.btn-with-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
    background: rgba(226, 106, 106, 0.25);
    border: 1px solid rgba(226, 106, 106, 0.55);
    color: #ffd3d3;
}

.btn-badge.is-hidden {
    display: none;
}

.row-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

#mittenList {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.card {
    background: linear-gradient(160deg, rgba(31, 27, 36, 0.96), rgba(22, 18, 26, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    animation: rise 0.6s ease;
}

#mittenList .card {
    position: relative;
    overflow: hidden;
    min-height: 280px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#mittenList .card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(200, 159, 107, 0.25), transparent 55%);
    opacity: 0.6;
}

#mittenList .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

#mittenList .card-body {
    position: relative;
    z-index: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 6px 0 8px;
}

#mittenList .card-title {
    font-size: 1.2rem;
    color: var(--text);
}

#mittenList .card-text {
    color: var(--muted);
}

#mittenList .card-img-bottom {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-top: auto;
}

.comment-preview {
    display: grid;
    gap: 4px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--stroke);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.85rem;
    color: var(--muted);
}

.comment-preview.is-active {
    border-style: solid;
    background: rgba(200, 159, 107, 0.12);
}

.comment-preview .comment-count {
    font-weight: 600;
    color: var(--text);
}

.comment-preview.is-empty .comment-count {
    color: var(--muted);
}

.comment-preview .comment-last {
    color: var(--muted);
}

.comment-preview .comment-snippet {
    color: var(--text);
    line-height: 1.4;
    max-height: 2.8em;
    overflow: hidden;
}

.comment-preview .comment-label {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.7rem;
    color: var(--muted);
}

.reaction-slot {
    margin-top: 6px;
}

.reaction-bar--mini {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.reaction-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text);
    border-radius: 999px;
    padding: 6px 10px;
    cursor: pointer;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    font-family: inherit;
    font-size: 0.8rem;
}

.reaction-pill.is-active {
    border-color: rgba(200, 159, 107, 0.6);
    box-shadow: 0 0 0 1px rgba(200, 159, 107, 0.25);
}

.reaction-pill .reaction-count {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 2px 6px;
    font-size: 0.75rem;
}


.comment-modal {
    width: min(640px, 94%);
}

.comment-list {
    display: grid;
    gap: 12px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 6px;
    margin: 12px 0 16px;
}

.comment-item {
    background: var(--surface-2);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--muted);
}

.comment-author {
    color: var(--accent-2);
    font-weight: 600;
}

.comment-text {
    margin: 8px 0 0;
    color: var(--text);
}

.comment-empty {
    border: 1px dashed var(--stroke);
    border-radius: var(--radius-sm);
    padding: 12px;
    color: var(--muted);
    text-align: center;
}

.comment-form textarea {
    min-height: 100px;
    margin-top: 6px;
}

.comment-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 12px;
}

.btn {
    border: 1px solid transparent;
    padding: 10px 18px;
    font-size: 0.95rem;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #241b15;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border: 1px solid var(--stroke);
}

.btn-danger {
    background: rgba(225, 98, 98, 0.2);
    color: #ffb3b3;
    border: 1px solid rgba(225, 98, 98, 0.4);
}

.btn-warning {
    background: rgba(214, 161, 74, 0.2);
    color: #f6d39b;
    border: 1px solid rgba(214, 161, 74, 0.5);
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    color: var(--text);
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(209, 162, 111, 0.6);
    box-shadow: 0 0 0 2px rgba(209, 162, 111, 0.18);
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.card input,
.card select,
.card textarea {
    margin: 6px 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.table th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(6, 5, 8, 0.7);
    backdrop-filter: blur(6px);
}

.modal-content {
    background-color: var(--surface);
    margin: 6% auto;
    padding: 28px;
    border: 1px solid var(--stroke);
    width: min(520px, 90%);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.closeCreate, .closeEdit, .close, .closeComment {
    color: var(--muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 48px;
    align-items: center;
    padding: 56px 8vw;
}

.auth-card,
.auth-aside {
    background: rgba(28, 23, 32, 0.92);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.auth-card {
    width: min(520px, 100%);
    justify-self: center;
}

.auth-title {
    font-size: 2.1rem;
    margin-bottom: 6px;
}

.auth-visual {
    position: relative;
    padding: 32px;
    border-radius: calc(var(--radius) + 6px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(500px circle at 20% 20%, rgba(225, 195, 142, 0.22), transparent 55%),
        radial-gradient(500px circle at 80% 10%, rgba(200, 159, 107, 0.2), transparent 60%),
        linear-gradient(150deg, rgba(18, 15, 20, 0.9), rgba(24, 20, 26, 0.9));
    overflow: hidden;
    min-height: 560px;
    display: flex;
    align-items: flex-end;
}

.auth-visual::before {
    content: '';
    position: absolute;
    inset: -30%;
    background:
        radial-gradient(closest-side, rgba(200, 159, 107, 0.18), transparent 70%),
        radial-gradient(closest-side, rgba(225, 195, 142, 0.12), transparent 70%);
    opacity: 0.7;
    animation: drift 18s ease-in-out infinite;
}

.auth-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(120deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    mix-blend-mode: soft-light;
    opacity: 0.5;
    pointer-events: none;
}

.visual-frame {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.visual-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-2);
}

.visual-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1.1;
    margin: 0;
}

.visual-subtitle {
    font-size: 1rem;
    color: var(--muted);
    margin: 0;
    max-width: 420px;
}

.visual-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.info-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.info-links a {
    font-size: 0.9rem;
    color: var(--accent-2);
    border-bottom: 1px solid rgba(200, 159, 107, 0.4);
}

.notice {
    background: rgba(209, 162, 111, 0.12);
    border: 1px solid rgba(209, 162, 111, 0.3);
    color: var(--accent-2);
    padding: 12px 16px;
    border-radius: 12px;
}

.tagline {
    font-size: 1rem;
    color: var(--muted);
}

.auth-header {
    display: flex;
    gap: 16px;
    align-items: center;
}

.auth-logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(150deg, rgba(209, 162, 111, 0.45), rgba(241, 212, 161, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-2);
    font-size: 0.95rem;
}

.auth-eyebrow {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 6px;
}

.auth-switch {
    margin-top: 22px;
    display: inline-flex;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.04);
}

.tab-btn {
    border: none;
    background: transparent;
    color: var(--muted);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    font-family: inherit;
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn.is-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #221812;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.grid-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
    align-items: center;
}

.btn-ghost {
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    color: var(--text);
}

.section-title {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.admin-card {
    overflow-x: auto;
}


.auth-section {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-card input {
    margin-top: 0;
}

.auth-hint {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 4px 0 6px;
    line-height: 1.4;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.suggestion-form {
    display: grid;
    gap: 16px;
}

.suggestion-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.suggestion-form textarea {
    min-height: 110px;
}

.field-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    margin-bottom: 2px;
    display: block;
}

.auth-section .field + .field {
    margin-top: 10px;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 6px 8px;
    min-height: 48px;
}

.field > input:focus,
.input-group:focus-within {
    border-color: rgba(209, 162, 111, 0.6);
    box-shadow: 0 0 0 2px rgba(209, 162, 111, 0.14);
}

.input-group input {
    background: transparent;
    border: none;
    padding: 10px 10px;
    margin: 0;
    flex: 1;
    min-width: 0;
}

.field > input,
.field > select,
.field > textarea {
    margin-top: 2px;
}

.input-group input:focus {
    outline: none;
}

.input-action {
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    cursor: pointer;
}

.field-note {
    font-size: 0.8rem;
    color: var(--warning);
}

.remember-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.2;
}

.checkbox input {
    width: auto;
    margin: 0;
}

.remember-row .field-note {
    color: var(--muted);
    margin-top: 2px;
}

.aside-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
    color: var(--muted);
    font-size: 0.9rem;
}

.aside-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.aside-list li::before {
    content: "-";
    color: var(--accent-2);
}

.login-meta {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    color: var(--muted);
    font-size: 0.9rem;
}

.auth-section .notice {
    margin-top: 6px;
}

.auth-footer {
    margin-top: 24px;
    display: grid;
    gap: 16px;
}

.stagger-item {
    animation: fadeUp 0.6s ease both;
}

.stagger .stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger .stagger-item:nth-child(2) { animation-delay: 0.12s; }
.stagger .stagger-item:nth-child(3) { animation-delay: 0.18s; }
.stagger .stagger-item:nth-child(4) { animation-delay: 0.24s; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes drift {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(10px, -12px, 0); }
}

.btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.auth-card.is-shaking {
    animation: shake 0.4s ease;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-4px); }
    100% { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .page-particles,
    .page-grain { display: none !important; }
    [data-reveal] { opacity: 1; transform: none; }
    .page-header { animation: none; }
    .profile-section { animation: none; }
    html { scroll-behavior: auto; }
}

select[multiple] {
    min-height: 140px;
}


.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 18px 0;
    background: rgba(12, 10, 16, 0.82);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px);
}

.topbar-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(209, 162, 111, 0.45), rgba(241, 212, 161, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-2);
    font-size: 1.1rem;
}

.brand-title {
    font-family: 'Fraunces', serif;
    font-size: 1.25rem;
}

.brand-sub {
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
}

.nav-pill {
    display: flex;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    justify-content: center;
    flex-wrap: wrap;
}

.nav-link {
    padding: 8px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.nav-link.is-active {
    color: #201610;
    background: linear-gradient(130deg, var(--accent), var(--accent-2));
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.topbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.topbar-status {
    background: rgba(200, 159, 107, 0.18);
    border: 1px solid rgba(200, 159, 107, 0.35);
    color: var(--accent-2);
}

.topbar-auth,
.topbar-user {
    display: flex;
    gap: 12px;
    align-items: center;
}

.is-hidden {
    display: none !important;
}

.chip {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--stroke);
    font-size: 0.85rem;
    color: var(--text);
}

@media (max-width: 900px) {
    .auth-layout {
        grid-template-columns: 1fr;
        padding: 32px 6vw;
    }
    .hero {
        grid-template-columns: 1fr;
    }
    .page-header {
        grid-template-columns: 1fr;
    }
    .page-actions {
        justify-content: flex-start;
    }
}


pre {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--stroke);
    padding: 12px 16px;
    border-radius: 12px;
    overflow-x: auto;
    color: var(--text);
}

code {
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    color: var(--accent-2);
}

.question,
.hints,
.attempts,
.result,
.loading {
    margin: 10px 0;
    color: var(--muted);
}

.result {
    color: var(--accent-2);
    font-weight: 600;
}

.fullscreen-message {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 4, 8, 0.85);
    color: var(--text);
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    z-index: 1000;
    text-align: center;
    pointer-events: none;
}

.suggestions {
    margin-top: 16px;
}

.suggestion-list {
    margin: 8px 0 0 0;
    padding: 0;
    color: var(--muted);
    list-style: none;
    display: grid;
    gap: 10px;
}

.suggestion-list li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.suggestion-link {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--stroke);
    color: var(--text);
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
}

.suggestion-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.suggestion-age {
    color: var(--muted);
}


strong {
    color: var(--text);
}

.table select {
    width: 160px;
}


@media (max-width: 600px) {
    .header-flex {
        flex-direction: column;
        align-items: flex-start;
    }
    .header-flex > div {
        width: 100%;
        justify-content: space-between;
    }
    .navbar-brand {
        font-size: 1.3rem;
    }
}


/* Password toggle eye icon */
.password-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.eye-icon {
    width: 20px;
    height: 20px;
    color: var(--muted);
    transition: color 0.2s ease;
}

.password-toggle:hover .eye-icon {
    color: var(--text);
}

/* Profile page */
.profile-section {
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(160deg, rgba(31, 27, 36, 0.96), rgba(22, 18, 26, 0.94));
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.profile-section-title {
    font-family: 'Fraunces', serif;
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--text);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 1px;
    background: linear-gradient(150deg, rgba(209, 162, 111, 0.45), rgba(241, 212, 161, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-2);
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-family: 'Fraunces', serif;
    font-size: 1.6rem;
    margin: 0 0 4px;
}

.profile-role {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(209, 162, 111, 0.18);
    border: 1px solid rgba(209, 162, 111, 0.35);
    color: var(--accent-2);
}

.profile-stats-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.profile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-sm);
    min-width: 100px;
}

.profile-stat-value {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    color: var(--accent-2);
    line-height: 1;
}

.profile-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 400px;
}

.profile-form .input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 6px 8px;
    min-height: 48px;
}

.profile-form .input-group input {
    background: transparent;
    border: none;
    padding: 10px 10px;
    margin: 0;
    flex: 1;
    min-width: 0;
}

.profile-form .input-group input:focus {
    outline: none;
}

.profile-form .input-group:focus-within {
    border-color: rgba(209, 162, 111, 0.6);
    box-shadow: 0 0 0 2px rgba(209, 162, 111, 0.14);
}

/* Topbar username clickable */
.topbar-username-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--stroke);
    font-size: 0.85rem;
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
}

.topbar-username-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(209, 162, 111, 0.4);
}

/* ═══════════════════════════════════════════════════════
   AWWWARDS-TIER ENHANCEMENTS
   Grain, ambient orbs, scroll reveal, enhanced depth,
   footer, micro-interactions
   ═══════════════════════════════════════════════════════ */

/* --- Grain texture overlay (subtle organic warmth) --- */
.page-grain {
    position: fixed;
    inset: 0;
    z-index: 9000;
    pointer-events: none;
    opacity: 0.03;
    mix-blend-mode: overlay;
}

.page-grain svg {
    width: 100%;
    height: 100%;
}

/* --- Floating particles (subtle, fewer than home) --- */
.page-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.page-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(241, 212, 161, 0.2);
    border-radius: 50%;
    animation: page-float-up linear infinite;
}

.page-particle:nth-child(1) { left: 12%; animation-duration: 16s; animation-delay: 0s; }
.page-particle:nth-child(2) { left: 35%; animation-duration: 20s; animation-delay: 3s; width: 1.5px; height: 1.5px; }
.page-particle:nth-child(3) { left: 55%; animation-duration: 14s; animation-delay: 6s; }
.page-particle:nth-child(4) { left: 75%; animation-duration: 22s; animation-delay: 2s; width: 3px; height: 3px; opacity: 0.15; }
.page-particle:nth-child(5) { left: 90%; animation-duration: 18s; animation-delay: 8s; width: 1.5px; height: 1.5px; }

@keyframes page-float-up {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    8% {
        opacity: 0.6;
        transform: translateY(90vh) scale(1);
    }
    85% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-5vh) scale(0.4);
        opacity: 0;
    }
}

/* --- Ambient background tint (subtle depth) --- */
.page::before,
.page-main::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(800px ellipse at 15% 20%, rgba(209, 162, 111, 0.05) 0%, transparent 55%),
        radial-gradient(600px ellipse at 85% 15%, rgba(156, 203, 193, 0.03) 0%, transparent 50%),
        radial-gradient(900px ellipse at 60% 80%, rgba(74, 64, 88, 0.08) 0%, transparent 55%);
}

/* --- Enhanced topbar (glassmorphism) --- */
.topbar {
    background: rgba(12, 10, 16, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s, box-shadow 0.3s;
}

/* --- Scroll-driven reveal for content --- */
[data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Page header entrance --- */
.page-header {
    animation: page-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

@keyframes page-enter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Card mouse-follow glow (set --mouse-x/--mouse-y via JS) --- */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        500px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(209, 162, 111, 0.04),
        transparent 55%
    );
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    z-index: 0;
}

.card:hover::before {
    opacity: 1;
}

.card {
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.4s,
                box-shadow 0.4s;
}

.card:hover {
    border-color: rgba(209, 162, 111, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

/* --- Enhanced hero cards --- */
.hero-card {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.3s,
                box-shadow 0.3s;
}

.hero-card:hover {
    transform: translateY(-2px);
    border-color: rgba(209, 162, 111, 0.1);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

/* --- Button hover --- */
.btn-primary {
    transition: transform 0.2s ease, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(209, 162, 111, 0.18);
}

/* --- Page footer (matches home footer style) --- */
.page-footer {
    position: relative;
    z-index: 2;
    padding: 32px 0;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.page-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-footer-brand {
    font-family: 'Fraunces', serif;
    font-size: 0.9rem;
    color: var(--muted);
}

.page-footer-links {
    display: flex;
    gap: 20px;
}

.page-footer-link {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    transition: color 0.2s;
}

.page-footer-link:hover {
    color: var(--accent-2);
}

/* --- Smoother badge animations --- */
.badge {
    transition: transform 0.2s, box-shadow 0.2s;
}

.badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* --- Table row hover enhancement --- */
.table tbody tr {
    transition: background 0.2s;
}

.table tbody tr:hover {
    background: rgba(209, 162, 111, 0.03);
}

/* --- Profile page polish --- */
.profile-section {
    animation: card-rise 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.profile-section:nth-child(2) { animation-delay: 0.04s; }
.profile-section:nth-child(3) { animation-delay: 0.08s; }
.profile-section:nth-child(4) { animation-delay: 0.12s; }
.profile-section:nth-child(5) { animation-delay: 0.16s; }
.profile-section:nth-child(6) { animation-delay: 0.2s; }
.profile-section:nth-child(7) { animation-delay: 0.24s; }

@keyframes card-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Input focus glow (premium feel) --- */
input:focus,
select:focus,
textarea:focus {
    border-color: rgba(209, 162, 111, 0.5);
    box-shadow: 0 0 0 3px rgba(209, 162, 111, 0.1), 0 0 20px rgba(209, 162, 111, 0.05);
}

/* --- Nav link active glow --- */
.nav-link.is-active {
    box-shadow: 0 4px 16px rgba(209, 162, 111, 0.12);
}

/* --- Chip shine effect --- */
.chip {
    transition: background 0.2s, border-color 0.2s;
}

/* --- Responsive --- */
@media (max-width: 980px) {
    .topbar-inner {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }
    .topbar-actions {
        justify-content: flex-start;
    }
    .nav-pill {
        justify-content: flex-start;
    }
    .page-footer-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

