* {
    box-sizing: border-box;
}

:root {
    --bg: #0b1020;
    --bg-soft: rgba(20, 28, 48, 0.78);
    --card: rgba(17, 24, 39, 0.78);
    --card-border: rgba(255, 255, 255, 0.08);
    --text: #f8fafc;
    --muted: #b6c2d1;
    --muted-soft: #8ea0b7;
    --primary: #7c9cff;
    --primary-hover: #93adff;
    --success: #6ee7b7;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(124, 156, 255, 0.16), transparent 30%),
        radial-gradient(circle at bottom right, rgba(110, 231, 183, 0.10), transparent 25%),
        linear-gradient(180deg, #09101d 0%, #0b1220 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.background-glow {
    position: fixed;
    border-radius: 999px;
    filter: blur(120px);
    opacity: 0.22;
    pointer-events: none;
    z-index: 0;
}

.background-glow-1 {
    width: 280px;
    height: 280px;
    background: #7c9cff;
    top: -60px;
    left: -60px;
}

.background-glow-2 {
    width: 320px;
    height: 320px;
    background: #67e8f9;
    right: -120px;
    bottom: -100px;
}

.container {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero {
    padding: 64px 0 28px;
}

.hero-wall {
    padding-bottom: 20px;
}

.hero-content {
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(124, 156, 255, 0.14);
    border: 1px solid rgba(124, 156, 255, 0.20);
    color: #dbe5ff;
    font-size: 0.92rem;
    margin-bottom: 18px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    width: min(680px, 100%);
    margin: 16px auto 0;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.7;
}

.top-nav {
    display: inline-flex;
    gap: 10px;
    margin-top: 26px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 999px;
}

.nav-link {
    text-decoration: none;
    color: #d8e4ff;
    padding: 10px 18px;
    border-radius: 999px;
    transition: background 0.18s ease, transform 0.18s ease;
}

.nav-link:hover {
    background: rgba(124, 156, 255, 0.12);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary), #6fa8ff);
    color: white;
}

.main-layout,
.wall-layout {
    padding-bottom: 56px;
}

.main-layout {
    display: grid;
    gap: 28px;
}

.card {
    background: var(--bg-soft);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
    padding: 28px;
}

.post-form-card {
    animation: fadeUp 0.55s ease;
}

.section-heading h2,
.feed-topbar h2 {
    margin: 0;
    font-size: 1.6rem;
    letter-spacing: -0.02em;
}

.section-heading p,
.feed-topbar p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.post-form {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.field-group {
    display: grid;
    gap: 10px;
}

label {
    font-weight: 600;
    font-size: 0.98rem;
    color: #edf3ff;
}

label span {
    color: var(--muted-soft);
    font-weight: 500;
}

input[type="text"],
textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(8, 13, 24, 0.72);
    color: white;
    border-radius: var(--radius-md);
    padding: 15px 16px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

input[type="text"]::placeholder,
textarea::placeholder {
    color: #7f91a9;
}

input[type="text"]:focus,
textarea:focus {
    border-color: rgba(124, 156, 255, 0.6);
    background: rgba(10, 16, 28, 0.92);
    transform: translateY(-1px);
}

textarea {
    resize: vertical;
    min-height: 170px;
    line-height: 1.65;
}

.char-counter {
    text-align: right;
    color: var(--muted-soft);
    font-size: 0.88rem;
}

.checkbox-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-weight: 500;
    color: var(--muted);
    line-height: 1.55;
}

.checkbox-row input {
    margin-top: 4px;
    accent-color: var(--primary);
}

.turnstile-wrapper {
    padding-top: 4px;
}

.primary-button {
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), #6fa8ff);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    padding: 14px 22px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    box-shadow: 0 14px 30px rgba(100, 130, 255, 0.25);
}

.primary-button:hover {
    transform: translateY(-1px);
    opacity: 0.98;
}

.status-message {
    margin: 18px 4px 0;
    min-height: 24px;
    color: #bcd4ff;
    font-weight: 500;
    line-height: 1.5;
}

.feed-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.board-topbar {
    background: var(--bg-soft);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
    padding: 22px 24px;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #d9e8ff;
    font-size: 0.95rem;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(124, 156, 255, 0.10);
    border: 1px solid rgba(124, 156, 255, 0.18);
}

.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--success);
    box-shadow: 0 0 0 0 rgba(110, 231, 183, 0.6);
    animation: pulse 1.8s infinite;
}

.masonry-board {
    column-count: 4;
    column-gap: 18px;
}

.post {
    break-inside: avoid;
    margin-bottom: 18px;
    background: rgba(10, 16, 29, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 18px 18px 16px;
    transition: transform 0.18s ease, border-color 0.18s ease;
    animation: fadeUp 0.35s ease;
}

.post:hover {
    transform: translateY(-2px);
    border-color: rgba(124, 156, 255, 0.18);
}

.post h3 {
    margin: 0 0 10px;
    font-size: 1.08rem;
    line-height: 1.4;
}

.post p {
    margin: 0;
    color: #eef3fb;
    white-space: pre-wrap;
    line-height: 1.72;
    word-break: break-word;
}

.post small {
    display: block;
    margin-top: 14px;
    color: var(--muted-soft);
    font-size: 0.84rem;
}

.empty-message {
    margin: 0;
    padding: 22px 18px;
    text-align: center;
    color: var(--muted);
    background: rgba(8, 13, 24, 0.54);
    border: 1px dashed rgba(255, 255, 255, 0.09);
    border-radius: 18px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(110, 231, 183, 0.55);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(110, 231, 183, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(110, 231, 183, 0);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .masonry-board {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .hero {
        padding-top: 44px;
    }

    .card,
    .board-topbar {
        padding: 20px;
        border-radius: 20px;
    }

    .feed-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .live-indicator {
        align-self: flex-start;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .masonry-board {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .container {
        width: min(100%, calc(100% - 20px));
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .primary-button {
        width: 100%;
    }

    .top-nav {
        width: 100%;
        justify-content: center;
    }

    .masonry-board {
        column-count: 1;
    }
}