/* ===== Base layout ===== */

:root {
    --bg-main: #050816;
    --bg-card: #0b1020;
    --bg-card-soft: #111827;
    --accent: #fbbf24;
    --accent-soft: rgba(251, 191, 36, 0.2);
    --accent-strong: #facc15;
    --text-main: #e5e7eb;
    --text-soft: #9ca3af;
    --danger: #f97373;
    --success: #4ade80;
    --radius-lg: 18px;
    --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.6);
    --border-subtle: 1px solid rgba(148, 163, 184, 0.25);
    --transition-fast: 0.18s ease-out;
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
                 sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: var(--font-main);
    background:
        radial-gradient(circle at top, #111827 0, #020617 55%, #000 100%);
    color: var(--text-main);
}

/* ===== Header & nav ===== */

.site-header {
    border-bottom: var(--border-subtle);
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 55%),
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.2), transparent 55%),
        #020617;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    position: sticky;
    top: 0;
    z-index: 20;
}

.site-header-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 18px 20px 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

/* LOGO */

.site-logo {
    text-decoration: none;
    color: var(--text-main);
}

.site-logo-text {
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 1rem;
}

/* NAVIGATION */

.site-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    justify-content: flex-end;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.nav-pill {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(6px);
    transition: background var(--transition-fast),
                border-color var(--transition-fast),
                transform var(--transition-fast);
}

.nav-pill:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.nav-pill-active,
.nav-pill.is-active {
    background: radial-gradient(circle at top, var(--accent), var(--accent-strong));
    border-color: transparent;
    color: #111827;
    font-weight: 600;
}

/* ===== Page content ===== */

.page-content {
    max-width: 960px;
    margin: 24px auto 40px;
    padding: 0 20px;
}

/* ===== Cards ===== */

.card {
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95), #020617);
    border-radius: var(--radius-lg);
    padding: 18px 18px 20px;
    margin-bottom: 18px;
    border: var(--border-subtle);
    box-shadow: var(--shadow-soft);
}

.card h2,
.card h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.card h2 {
    font-size: 1.4rem;
}

.card h3 {
    font-size: 1.2rem;
}

/* ===== Buttons ===== */

button,
.btn-secondary {
    font-family: var(--font-main);
    border-radius: 999px;
    border: none;
    cursor: pointer;
    padding: 7px 16px;
    font-size: 0.9rem;
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-main);
    border: 1px solid rgba(148, 163, 184, 0.6);
    transition: background var(--transition-fast),
                border-color var(--transition-fast),
                transform var(--transition-fast),
                box-shadow var(--transition-fast);
}

button:hover,
.btn-secondary:hover {
    background: rgba(30, 64, 175, 0.95);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.7);
}

.button-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* ===== Fursona display ===== */

.fursona-display {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.25), transparent 55%),
                rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.5);
    margin-bottom: 6px;
}

.fursona-icon {
    font-size: 1.2rem;
}

.fursona-name {
    font-weight: 600;
}

.fursona-pronouns {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-left: 4px;
}

.fursona-bio {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 4px;
}

/* ===== Gesture box ===== */

.hint {
    font-size: 0.85rem;
    color: var(--text-soft);
    margin-top: 10px;
}

.gesture-box {
    margin-top: 10px;
    padding: 18px;
    border-radius: 12px;
    border: 1px dashed rgba(148, 163, 184, 0.7);
    background: radial-gradient(circle at top, var(--accent-soft), transparent 60%);
    text-align: center;
    color: var(--text-main);
    cursor: pointer;
    user-select: none;
    transition: background var(--transition-fast),
                border-color var(--transition-fast),
                transform var(--transition-fast),
                box-shadow var(--transition-fast);
}

.gesture-box.is-active {
    background:
        radial-gradient(circle at top, rgba(251, 191, 36, 0.35), transparent 65%),
        rgba(15, 23, 42, 0.95);
    border-color: var(--accent-strong);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.9);
    transform: translateY(-1px);
}

.action-message {
    margin-top: 10px;
    min-height: 1.2em;
    font-size: 0.9rem;
    color: var(--accent-strong);
}

/* ===== Active user list ===== */

.active-list {
    list-style: none;
    padding-left: 0;
    margin: 4px 0 0;
}

.active-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

/* ===== Forms ===== */

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-main);
    font-size: 0.9rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.4);
}

/* ===== Footer ===== */

.site-footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-soft);
    padding: 18px 0 24px;
}

/* ===== Responsive tweaks ===== */

@media (max-width: 640px) {
    .site-header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .site-header-right {
        width: 100%;
        justify-content: space-between;
    }

    .site-nav {
        justify-content: flex-start;
    }

    .header-user-bubble {
        margin-left: auto;
    }

    .card {
        padding: 15px 14px 18px;
    }

    .button-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .button-row form {
        width: 100%;
    }

    .button-row button {
        width: 100%;
        text-align: center;
    }
}

/* ===== Profiles Directory ===== */

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.profile-card {
    background: rgba(8, 19, 40, 0.9);
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.profile-name {
    font-weight: 700;
}

.profile-sub {
    font-size: 0.8rem;
    opacity: 0.8;
}

.profile-bio {
    font-size: 0.85rem;
    margin: 4px 0;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.tag-chip {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.07);
    border: 1px solid rgba(248, 250, 252, 0.12);
}

/* ===== Settings page ===== */

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.settings-section h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.settings-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== Avatar System (v1.7) ===== */

.avatar-img {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid var(--accent-soft);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9);
}

.avatar-img--header {
    width: 36px;
    height: 36px;
}

.avatar-img--profile {
    width: 56px;
    height: 56px;
}

.avatar-placeholder-icon {
    font-size: 1.6rem;
}

/* ===== Header user bubble (final polished version) ===== */

.header-user-bubble {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.header-user-avatar {
    flex: 0 0 auto;
}

.header-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.header-user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.header-user-sub {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* ===== Alert (settings) ===== */

.alert.alert-error {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(127, 29, 29, 0.8);
    border: 1px solid rgba(248, 113, 113, 0.9);
    font-size: 0.85rem;
}
/* ===== Presence dots ===== */

.active-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.active-icon {
    font-size: 1rem;
}

.active-name .presence-label {
    font-size: 0.75rem;
    margin-left: 6px;
    opacity: 0.75;
}

.presence-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    margin-right: 4px;
    background: #4b5563;
}

.presence-online {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.9);
}

.presence-idle {
    background: #eab308;
    box-shadow: 0 0 6px rgba(234, 179, 8, 0.9);
}

.presence-offline {
    background: #ef4444;
    opacity: 0.55;
}

/* Friends list presence */

.friend-presence {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
    margin-bottom: 2px;
}

.friend-presence-label {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Profile card presence */

.profile-presence {
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.profile-presence-label {
    font-size: 0.75rem;
    opacity: 0.8;
}
.notify-bell {
    position: relative;
    font-size: 1.2rem;
    margin-right: 8px;
    text-decoration: none;
}

.notify-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #f97373;
    color: white;
    border-radius: 999px;
    padding: 0 6px;
    font-size: 0.7rem;
}
.notify-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notify-item {
    padding: 10px;
    border-bottom: var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.notify-unread {
    background: rgba(251, 191, 36, 0.18);
}

.notify-msg {
    font-size: 0.9rem;
}

.notify-time {
    font-size: 0.75rem;
    opacity: 0.7;
}
