:root {
    --bg: #0b100d;
    --surface: #121a15;
    --surface-2: #18221b;
    --text: #f3f7f4;
    --muted: #9eaaa2;
    --green: #45c46b;
    --green-dark: #26964a;
    --border: #26332b;
    --danger: #e76a6a;
    --max: 1100px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(69,196,107,.10), transparent 30rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
    height: 72px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: rgba(11,16,13,.92);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
}

.brand {
    color: var(--text);
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    gap: 9px;
    align-items: center;
}
.brand:hover { text-decoration: none; }
.brand-leaf { font-size: 1.5rem; }

nav { display: flex; gap: 20px; align-items: center; }
nav a { color: var(--muted); font-weight: 600; }
nav a:hover { color: var(--text); text-decoration: none; }

.nav-button, .button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    padding: 12px 18px;
    border: 1px solid var(--border);
    font-weight: 700;
    cursor: pointer;
    font-size: .95rem;
    text-decoration: none;
}
.nav-button, .button.primary {
    background: var(--green);
    color: #071008;
    border-color: var(--green);
}
.nav-button:hover, .button.primary:hover {
    background: #63d783;
    text-decoration: none;
}
.button.secondary {
    background: transparent;
    color: var(--text);
}
.button.secondary:hover { background: var(--surface-2); text-decoration: none; }
.button.full { width: 100%; }

.page {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    min-height: calc(100vh - 150px);
    padding: 56px 0;
}

.hero {
    text-align: center;
    max-width: 760px;
    margin: 50px auto 80px;
}
.age-badge {
    display: inline-block;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
}
.hero h1 {
    margin: 20px 0 14px;
    font-size: clamp(2.7rem, 7vw, 5.5rem);
    line-height: .98;
    letter-spacing: -.06em;
}
.hero h1 span { color: var(--green); }
.hero-text {
    color: var(--muted);
    font-size: 1.15rem;
    line-height: 1.7;
    max-width: 650px;
    margin: auto;
}
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
}
.small-note { color: var(--muted); font-size: .85rem; margin-top: 18px; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.feature-card, .coming-soon, .profile-card, .auth-card {
    border: 1px solid var(--border);
    background: rgba(18,26,21,.86);
    border-radius: 18px;
}
.feature-card {
    padding: 28px;
}
.feature-card > div { font-size: 2rem; }
.feature-card h2 { margin-bottom: 8px; }
.feature-card p, .coming-soon p { color: var(--muted); line-height: 1.6; }

.auth-card {
    max-width: 480px;
    margin: 20px auto;
    padding: 34px;
}
.auth-icon { font-size: 2rem; }
.auth-card h1 { margin: 10px 0 4px; }
.muted { color: var(--muted); }

form { margin-top: 24px; }
label {
    display: block;
    margin: 17px 0 7px;
    font-weight: 700;
    font-size: .9rem;
}
input {
    width: 100%;
    padding: 13px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #0d140f;
    color: var(--text);
    outline: none;
    font: inherit;
}
input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(69,196,107,.12);
}
.checkbox-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-weight: 500;
}
.checkbox-row input { width: auto; margin-top: 3px; }
.auth-switch { text-align: center; color: var(--muted); margin-top: 22px; }

.alert {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
}
.alert.error {
    color: #ffd0d0;
    border-color: rgba(231,106,106,.4);
    background: rgba(231,106,106,.08);
}
.alert ul { margin-bottom: 0; }

.dashboard-header { margin-bottom: 25px; }
.dashboard-header h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin: 14px 0 8px; }

.coming-soon {
    padding: 60px 30px;
    text-align: center;
}
.big-icon { font-size: 4rem; }
.coming-soon h2 { font-size: 2rem; }
.coming-soon p { max-width: 650px; margin: auto; }

.roadmap-mini {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}
.roadmap-mini span {
    padding: 9px 12px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: .85rem;
}
.roadmap-mini .done { color: var(--green); }

.profile-card {
    max-width: 650px;
    margin: 20px auto;
    padding: 40px;
    text-align: center;
}
.avatar {
    width: 96px;
    height: 96px;
    margin: auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-2);
    font-size: 2.7rem;
    border: 1px solid var(--border);
}
.profile-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin: 28px 0;
}
.profile-stats div { display: flex; flex-direction: column; gap: 3px; }
.profile-stats strong { font-size: 1.3rem; }
.profile-stats span { color: var(--muted); font-size: .85rem; }

.site-footer {
    border-top: 1px solid var(--border);
    padding: 28px;
    text-align: center;
    color: var(--muted);
    font-size: .85rem;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin: 12px 0;
}

@media (max-width: 700px) {
    .site-header { padding: 0 16px; }
    nav { gap: 10px; }
    nav a:not(.nav-button) { display: none; }
    .page { width: min(100% - 24px, var(--max)); padding-top: 35px; }
    .feature-grid { grid-template-columns: 1fr; }
    .hero { margin-top: 25px; }
    .hero-actions { flex-direction: column; }
    .auth-card { padding: 25px 20px; }
}


/* LeafSocial V1.1 — Posts */
.post-composer {
    border: 1px solid var(--border);
    background: rgba(18,26,21,.86);
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 28px;
}
.post-composer form { margin-top: 0; }
.post-composer label { margin-top: 0; }
textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #0d140f;
    color: var(--text);
    outline: none;
    font: inherit;
    line-height: 1.5;
}
textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(69,196,107,.12);
}
.composer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 12px;
}
.character-note { color: var(--muted); font-size: .8rem; }

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.section-title h2 { margin: 0; }
.section-title span { color: var(--muted); font-size: .85rem; }

.post-card {
    border: 1px solid var(--border);
    background: rgba(18,26,21,.86);
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 14px;
}
.post-top {
    display: flex;
    align-items: center;
    gap: 11px;
}
.post-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border);
}
.post-time {
    color: var(--muted);
    font-size: .76rem;
    margin-top: 2px;
}
.post-content {
    margin-top: 18px;
    line-height: 1.65;
    white-space: normal;
    overflow-wrap: anywhere;
}
.empty-feed {
    border: 1px solid var(--border);
    background: rgba(18,26,21,.86);
    border-radius: 18px;
    padding: 50px 25px;
    text-align: center;
}
.empty-feed p { color: var(--muted); }

@media (max-width: 600px) {
    .composer-bottom { align-items: stretch; flex-direction: column; }
}


/* LeafSocial V1.2 — Likes */
.post-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
    padding-top: 14px;
}
.like-form { margin: 0; }
.like-button {
    border: 0;
    background: transparent;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 9px;
    border-radius: 9px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}
.like-button:hover { background: var(--surface-2); color: var(--text); }
.like-button.liked { color: #ff7885; }
.comment-placeholder {
    color: var(--muted);
    font-size: .85rem;
}


/* LeafSocial V1.3 — Comments */
.comment-count {
    color: var(--muted);
    font-size: .85rem;
}
.comments-section {
    border-top: 1px solid var(--border);
    margin-top: 15px;
    padding-top: 12px;
}
.comment {
    display: flex;
    gap: 10px;
    padding: 9px 0;
}
.comment-avatar {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: .9rem;
}
.comment-body {
    min-width: 0;
    background: var(--surface-2);
    border-radius: 12px;
    padding: 9px 12px;
}
.comment-time {
    color: var(--muted);
    font-size: .72rem;
    margin-left: 7px;
}
.comment-text {
    margin-top: 4px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.comment-form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.comment-form input {
    flex: 1;
}
.comment-form .button {
    flex: 0 0 auto;
    padding: 10px 14px;
}
@media (max-width: 600px) {
    .comment-form { flex-direction: column; }
    .comment-form .button { width: 100%; }
}


/* LeafSocial V1.4 — Friends */
.alert.success {
    color: #c9f7d5;
    border-color: rgba(69,196,107,.4);
    background: rgba(69,196,107,.08);
    margin-bottom: 20px;
}
.friends-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.friends-panel, .search-card, .person-row {
    border: 1px solid var(--border);
    background: rgba(18,26,21,.86);
    border-radius: 18px;
}
.friends-panel { padding: 22px; }
.friend-row, .person-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.friend-row:last-child { border-bottom: 0; }
.friend-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.friend-info span {
    color: var(--muted);
    font-size: .82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.friend-buttons {
    display: flex;
    gap: 6px;
}
.friend-buttons form, .friend-row > form { margin: 0; }
.small-button {
    padding: 8px 11px;
    font-size: .78rem;
}
.friend-empty {
    padding: 28px 8px;
    color: var(--muted);
    text-align: center;
}
.search-card {
    padding: 20px;
    margin-bottom: 18px;
}
.people-search {
    display: flex;
    gap: 10px;
    margin: 0;
}
.people-search input { flex: 1; }
.person-row {
    padding: 16px 18px;
    margin-bottom: 10px;
}
.relationship-label {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}
@media (max-width: 800px) {
    .friends-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .people-search { flex-direction: column; }
    .friend-row, .person-row { align-items: flex-start; }
    .friend-buttons { flex-direction: column; }
}
