/* =====================
   MAIN APP LAYOUT
   ===================== */
#main-app {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: absolute;
    inset: 0;
    z-index: 10;
}

/* =====================
   TOP NAV PILL
   ===================== */
.top-nav {
    flex-shrink: 0;
    padding: 12px 16px 8px;
    background: transparent;
    z-index: 50;
    position: relative;
}

.nav-pill {
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--r-pill);
    padding: 3px;
    gap: 2px;
    background: #18181B;
    backdrop-filter: blur(20px) saturate(190%);
    -webkit-backdrop-filter: blur(20px) saturate(190%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.nav-separator {
    display: none;
}

.nav-tab {
    flex: 1;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--r-pill);
    padding: 8px 10px;
    font-family: var(--font-ui);
    font-size: 13.5px;
    font-weight: 500;
    color: #FFFFFF;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    position: relative;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing: -0.01em;
    outline: none;
}

.nav-tab svg {
    stroke: #FFFFFF;
    transition: stroke 0.2s ease;
}

.nav-tab.active {
    background: #FFFFFF !important;
    color: #18181B !important;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.nav-tab.active svg {
    stroke: #18181B !important;
}

/* Avatar tab and settings tab */
#tab-board {
    flex: 0 0 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2.5px solid transparent;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#tab-board.active {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: #FFFFFF !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25) !important;
}

#tab-board.active .nav-avatar-ring {
    transform: scale(1);
}

#btn-settings {
    flex: 0 0 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
}

#btn-settings svg {
    stroke: #FFFFFF;
}

#btn-settings.active {
    background: #FFFFFF !important;
    color: #18181B !important;
}

#btn-settings.active svg {
    stroke: #18181B !important;
}

.nav-avatar-ring {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}

.visitor-wall-header {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 8px;
    padding: 14px 16px 4px;
    background: var(--bg);
    z-index: 50;
}

.visitor-back-btn {
    width: 38px;
    height: 38px;
    border: 1.5px solid var(--nav-pill-border);
    border-radius: 50%;
    background: white;
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.visitor-wall-label {
    color: var(--text-primary);
    font-family: var(--font-serif);
    font-size: 1.55rem;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.visitor-follow-btn {
    min-width: 68px;
    height: 28px;
    padding: 0 10px;
    border: 1.5px solid #7c3aed;
    border-radius: 999px;
    background: #7c3aed;
    color: white;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}

.board-user-row .visitor-follow-btn {
    margin-left: auto;
    align-self: center;
    flex-shrink: 0;
}

.visitor-follow-btn.is-following {
    background: white;
    color: #7c3aed;
    border-color: #7c3aed;
}

#tab-board.active .nav-avatar-ring {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.nav-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.nav-avatar-initial {
    font-size: 1rem;
    font-weight: 700;
    color: white;
}

.inbox-badge {
    background: #e8453c;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    margin-left: 2px;
}

/* =====================
   SCREENS CONTAINER
   ===================== */
.screens-wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.main-screen {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: screenIn 0.2s ease;
    display: flex;
    flex-direction: column;
}

@keyframes screenIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

