:root {
    --bg: #09070f;
    --bg-elevated: rgba(20, 16, 29, 0.78);
    --bg-soft: rgba(255, 255, 255, 0.06);
    --stroke: rgba(255, 255, 255, 0.1);
    --text: #f7eefe;
    --muted: #b9adc9;
    --rose: #ff5d88;
    --red: #ff6d64;
    --violet: #8d6bff;
    --cyan: #78d7ff;
    --green: #74f2c3;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
    --transition: 240ms ease;
    --content-width: 720px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "DM Sans", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 93, 136, 0.22), transparent 30%),
        radial-gradient(circle at top right, rgba(141, 107, 255, 0.22), transparent 28%),
        linear-gradient(180deg, #120d1b 0%, #09070f 45%, #07060d 100%);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
    border: 0;
}

textarea,
input,
select {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border-radius: 16px;
    padding: 0.95rem 1rem;
    outline: none;
    transition: border-color var(--transition), transform var(--transition), background var(--transition);
}

textarea:focus,
input:focus,
select:focus {
    border-color: rgba(255, 93, 136, 0.45);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.ambient {
    position: fixed;
    inset: auto;
    width: 18rem;
    height: 18rem;
    filter: blur(22px);
    opacity: 0.75;
    pointer-events: none;
    z-index: 0;
}

.ambient-left {
    top: 3rem;
    left: -5rem;
    background: radial-gradient(circle, rgba(255, 93, 136, 0.35), transparent 60%);
    animation: drift 8s ease-in-out infinite alternate;
}

.ambient-right {
    top: 12rem;
    right: -4rem;
    background: radial-gradient(circle, rgba(141, 107, 255, 0.34), transparent 62%);
    animation: drift 9s ease-in-out infinite alternate-reverse;
}

.glass {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.auth-shell,
.app-shell {
    position: relative;
    z-index: 1;
}

.auth-shell {
    width: min(calc(100% - 2rem), 1100px);
    margin: 0 auto;
    padding: 1.25rem 0 2rem;
    display: grid;
    gap: 1rem;
}

.hero-card,
.auth-card,
.card,
.topbar,
.bottom-nav {
    border-radius: var(--radius-lg);
}

.hero-card,
.auth-card,
.card {
    padding: 1.25rem;
    animation: rise 600ms ease both;
}

.hero-card h1,
.topbar h1 {
    margin: 0.2rem 0 0.4rem;
    font-size: clamp(2.4rem, 10vw, 4.5rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.hero-copy,
.muted-copy {
    color: var(--muted);
}

.mini-note {
    font-size: 0.9rem;
    color: #d9bede;
}

.hero-chips,
.info-stack,
.stack-list,
.timeline-list,
.leaderboard-list,
.challenge-grid {
    display: grid;
    gap: 0.85rem;
}

.hero-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 1rem 0;
}

.hero-chips span,
.price-pill,
.badge-line,
.reaction-button,
.reveal-button {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.7rem 0.95rem;
}

.eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    color: #f2aec7;
}

.tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.tab-button,
.primary-button,
.secondary-button,
.icon-button,
.ghost-link,
.status-pill {
    transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.tab-button,
.secondary-button,
.icon-button {
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.tab-button.active,
.tab-button:hover,
.secondary-button:hover,
.icon-button:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.1);
}

.primary-button {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--rose), var(--violet));
    color: white;
    box-shadow: 0 12px 32px rgba(181, 70, 145, 0.35);
}

.primary-button:hover {
    transform: translateY(-2px);
}

.panel {
    display: none;
    gap: 0.9rem;
}

.panel.active,
.mini-form,
.composer-form {
    display: grid;
}

.mini-form,
.composer-form {
    gap: 0.9rem;
}

.status-bar {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    color: var(--muted);
}

.ghost-link {
    color: #ffd3dd;
}

.app-shell {
    width: min(calc(100% - 1rem), var(--content-width));
    margin: 0 auto;
    padding: 0.75rem 0 6rem;
}

.topbar {
    padding: 1rem 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    position: sticky;
    top: 0.75rem;
    z-index: 10;
    margin-bottom: 1rem;
}

.topbar h1 {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
}

.content-grid {
    display: grid;
    gap: 1rem;
}

.single-column {
    grid-template-columns: 1fr;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

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

.highlight-card {
    overflow: hidden;
    position: relative;
}

.highlight-card::after {
    content: "";
    position: absolute;
    inset: auto -10% -25% auto;
    width: 10rem;
    height: 10rem;
    background: radial-gradient(circle, rgba(255, 93, 136, 0.25), transparent 70%);
    pointer-events: none;
}

.mood-ring {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: conic-gradient(var(--rose), var(--violet), var(--cyan), var(--rose));
    position: relative;
    box-shadow: 0 0 24px rgba(255, 93, 136, 0.3);
}

.mood-ring::after {
    content: "";
    position: absolute;
    inset: 11px;
    border-radius: 50%;
    background: rgba(9, 7, 15, 0.95);
}

.mood-ring.large {
    width: 150px;
    height: 150px;
    margin: 0 auto 1rem;
}

.mood-center-card {
    text-align: center;
}

.flame-icon {
    font-size: 1.7rem;
}

.info-stack > div,
.stack-list > article,
.timeline-item,
.leaderboard-item,
.challenge-card,
.feed-item,
.message {
    padding: 1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feed-grid {
    display: grid;
    gap: 1rem;
}

.feed-item img,
.timeline-item img,
.message-media {
    width: 100%;
    border-radius: 20px;
    object-fit: cover;
    max-height: 340px;
}

.blurred {
    filter: blur(26px);
}

.reveal-button {
    color: white;
    width: 100%;
    margin-top: 0.75rem;
}

.message-list {
    display: grid;
    gap: 0.85rem;
}

.message.self {
    border-color: rgba(255, 93, 136, 0.26);
    background: linear-gradient(180deg, rgba(255, 93, 136, 0.16), rgba(255, 255, 255, 0.04));
}

.message-meta,
.feed-meta,
.timeline-meta,
.leaderboard-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
}

.message-actions,
.reaction-row {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.reaction-button {
    color: white;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0.75rem;
    transform: translateX(-50%);
    width: min(calc(100% - 1rem), var(--content-width));
    padding: 0.65rem;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
}

.bottom-nav a {
    padding: 0.7rem 0.4rem;
    border-radius: 16px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--muted);
}

.bottom-nav a.active {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

.challenge-grid,
.leaderboard-list,
.timeline-list {
    grid-template-columns: 1fr;
}

.challenge-card.rose {
    background: linear-gradient(180deg, rgba(255, 93, 136, 0.16), rgba(255, 255, 255, 0.04));
}

.challenge-card.pulse {
    background: linear-gradient(180deg, rgba(120, 215, 255, 0.16), rgba(255, 255, 255, 0.04));
}

.challenge-card.ignite {
    background: linear-gradient(180deg, rgba(255, 109, 100, 0.16), rgba(255, 255, 255, 0.04));
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
}

.leaderboard-item {
    display: grid;
    gap: 0.7rem;
}

.progress-bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--rose), var(--violet));
}

.toast-stack {
    position: fixed;
    right: 1rem;
    top: 1rem;
    display: grid;
    gap: 0.65rem;
    z-index: 30;
}

.toast {
    padding: 0.85rem 1rem;
    border-radius: 18px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(13, 11, 22, 0.94);
    color: var(--text);
    animation: rise 280ms ease;
}

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 1.5rem 1rem;
}

.inline-option,
.file-label {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--muted);
}

.inline-option input[type="checkbox"],
.file-label input[type="file"] {
    width: auto;
}

.disclaimer-card {
    color: #f7cadc;
}

@media (min-width: 760px) {
    .auth-shell {
        min-height: 100vh;
        align-items: center;
        grid-template-columns: 1.1fr 0.9fr;
    }

    .content-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .single-column {
        grid-template-columns: 1fr;
    }

    .feed-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@keyframes drift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(25px, -20px, 0) scale(1.12);
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
