﻿:root {
    --bg: #fff;
    --panel: #f7f9f9;
    --border: #e6ecf0;
    --muted: #536471;
    --text: #0f1419;
    --accent: #1d9bf0
}

* {
    box-sizing: border-box
}

html, body {
    height: 100%
}

body {
    margin: 0;
    font: 14px/1.45 ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
    color: var(--text);
    background: var(--bg)
}

.app {
    max-width: 1040px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 90px minmax(0,1fr) 90px;
    min-height: 100svh
}

@media(max-width:1200px) {
    .app {
        grid-template-columns: 90px minmax(0,1fr) 90px
    }

    .nav .label {
        display: none
    }
}

@media(max-width:980px) {
    .app {
        grid-template-columns: 90px minmax(0,1fr) 90px
    }

   /* .right {
        display: none
    }*/
}

@media(max-width:720px) {
    .app {
        grid-template-columns: 0fr;
    }

    .center {
        padding-bottom: 72px
    }
}

/* LEFT NAV */
.nav {
    padding: 8px 12px;
    position: sticky;
    top: 0;
    height: 100svh
}

    .nav .stack {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 6px
    }

    .nav a, .nav button {
        appearance: none;
        border: 0;
        background: transparent;
        color: inherit;
        display: flex;
        gap: 12px;
        align-items: center;
        padding: 12px 14px;
        border-radius: 999px;
        text-decoration: none;
        font-size: 18px
    }

        .nav a:hover, .nav button:hover {
            background: #e8f5fe
        }

    .nav .brand {
        width: 50px;
        height: 50px;
        display: grid;
        place-items: center;
        border-radius: 999px
    }

.compose {
    margin-top: 8px;
    padding: 14px 18px !important;
    background: var(--accent);
    color: #fff !important;
    border-radius: 999px;
    font-weight: 700;
    justify-content: center
}

@media(max-width:720px) {
   .nav {
        position: fixed;
        top: 0;
        left: 0;
        background: #fff;
        border-top: 1px solid var(--border);
        z-index: 30;
        padding: 0;
        width: 90px;
        height: 100vh;
    }

        .nav .stack {
            flex-direction: row;
            justify-content: space-evenly;
            align-items: center;
            height: 100%;
            padding: 0
        }

        .nav .brand, .nav .compose {
            display: none
        }
  /* .nav {
        display: none
    }*/
}
@media(max-width:600px) {

    .right {
        display: none
    }
}

    /* CENTER PROFILE */
    .center {
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
        min-height: 0
    }

    .profile-header {
        border-bottom: 1px solid var(--border);
        background: var(--panel)
    }

    .cover {
        width: 100%;
        background: #cfd9de;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        padding: 1rem;
        aspect-ratio: 16/9;
        object-fit: cover;
        max-height: 50svh;
    }

    .avatar-wrap {
        display: flex;
        justify-content: space-between;
        align-items: end;
        padding: 0 16px;
        transform: translateY(-50%)
    }

    .avatar {
        width: 140px;
        height: 140px;
        border-radius: 50%;
        border: 4px solid var(--bg);
        background: #ddd;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        aspect-ratio: 1/1;
        object-fit: cover;
    }

    .actions {
        display: flex;
        gap: 8px
    }

    .btn {
        background: transparent;
        border: 1px solid var(--border);
        color: var(--text);
        padding: 8px 14px;
        border-radius: 999px;
        font-weight: 600
    }

        .btn:hover {
            background: #f5f8fa
        }

        .btn.primary {
            background: #0f1419;
            color: #fff;
            border-color: #0f1419
        }

    .bio {
        padding: 0 16px 12px 16px;
        margin-top: -56px
    }

    .display {
        font-weight: 800;
        font-size: 22px
    }

    .handle {
        color: var(--muted)
    }

    .meta {
        display: flex;
        gap: 16px;
        color: var(--muted);
        margin: 8px 0;
        font-size: 13px
    }

    .counts {
        display: flex;
        gap: 18px;
        margin: 8px 0
    }

        .counts b {
            color: #0f1419
        }

    .tabs {
        display: flex;
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 20
    }

    .tab {
        padding: 14px 18px;
        white-space: nowrap;
        border-bottom: 2px solid transparent;
        color: var(--muted);
        font-weight: 700
    }

        .tab.active {
            color: var(--text);
            border-color: var(--accent)
        }

    /* TWEETS */
    .tweet {
        display: grid;
        grid-template-columns: 56px 1fr;
        gap: 10px;
        padding: 20px 16px;
        border-bottom: 1px solid var(--border)
    }

        .tweet .avatar {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: #ddd
        }

        .tweet .head {
            display: flex;
            align-items: center;
            gap: 6px
        }

    .name {
        font-weight: 700
    }

    .tweet .handle {
        font-size: 13px;
        color: var(--muted)
    }

    .tweet .dot::before {
        content: "·";
        padding: 0 4px;
        color: var(--muted)
    }

    .tweet .text {
        margin: 6px 0 10px
    }



    .bar {
        display: flex;
        gap: 16px;
        color: var(--muted);
        margin-top: 6px
    }

        .bar button {
            appearance: none;
            background: transparent;
            border: 0;
            color: inherit;
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 8px;
            border-radius: 999px
        }

            .bar button:hover {
                background: #e8f5fe
            }

        .bar img {
            width: 18px;
            height: 18px
        }

    /* RIGHT SIDEBAR */
    .right {
        padding: 8px 16px
    }

        .right .search-wrap {
            position: sticky;
            top: 8px;
            z-index: 25;
            padding-bottom: 10px;
            background: linear-gradient(#fff 70%,rgba(255,255,255,0))
        }

    .searchbar {
        display: flex;
        align-items: center;
        gap: 8px;
        border: 1px solid var(--border);
        background: #f5f8fa;
        border-radius: 999px;
        padding: 8px 12px
    }

        .searchbar:focus-within {
            border-color: #c8e1fb;
            box-shadow: 0 0 0 3px rgba(29,155,240,.15);
            background: #fff
        }

        .searchbar img {
            width: 18px;
            height: 18px;
            opacity: .75
        }

        .searchbar input {
            border: 0;
            outline: 0;
            background: transparent;
            color: var(--text);
            width: 100%
        }

        .searchbar button.clear {
            appearance: none;
            border: 0;
            background: transparent;
            border-radius: 999px;
            width: 24px;
            height: 24px;
            display: none;
            place-items: center;
            cursor: pointer
        }

        .searchbar input:not(:placeholder-shown) ~ .clear {
            display: grid
        }

        .searchbar kbd {
            margin-left: auto;
            font-size: 11px;
            color: #667;
            border: 1px solid var(--border);
            padding: 2px 6px;
            border-radius: 6px;
            background: #fff;
            display: none
        }

    @media(min-width:980px) {
        .searchbar kbd {
            display: inline-block
        }
    }

    .widget {
        background: #f5f8fa;
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 12px;
        margin: 10px 0
    }

        .widget h3 {
            margin: 0 0 10px;
            font-size: 18px
        }

    .suggest {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 0
    }

        .suggest .avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: #ddd
        }

        .suggest .info {
            flex: 1
        }

        .suggest .name {
            font-weight: 700
        }

        .suggest .handle {
            color: var(--muted);
            font-size: 13px
        }

    .follow-btn {
        background: #0f1419;
        color: #fff;
        border: 0;
        padding: 6px 14px;
        border-radius: 999px;
        font-weight: 700
    }

    .ic {
        width: 22px;
        height: 22px;
        display: inline-block;
        vertical-align: middle;
    }
    /* small helpers to match screenshot */
    .view-more {
        font-weight: 600;
    }

    .verified {
        color: var(--accent);
        display: inline-flex;
    }

    .tabs {
        display: flex;
        gap: 2px;
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 20;
    }

    .tab {
        padding: 14px 18px;
        border: 0;
        background: transparent;
        color: var(--muted);
        font-weight: 700;
        border-bottom: 2px solid transparent;
        cursor: pointer;
    }

        .tab.active {
            color: var(--text);
            border-color: var(--accent);
        }

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #fff;
    border-bottom: 1px solid #e6e6e6;
    z-index: 1000;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-left: 10px;
}
/* Scroll‑hide header & fade footer */
#mainHeader {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.header--hidden {
    transform: translateY(-100%);
    opacity: 0;
}

#mainFooter {
    transition: opacity 0.3s ease;
}

.footer--faded {
    opacity: 0.5;
}

/* Overlay Menu */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 2000;
    overflow-y: auto;
}

    .menu-overlay.active {
        transform: translateX(0);
    }

.menu-header {
    display: flex;
    align-items: left;
    padding: 16px;
    border-bottom: 1px solid #eee;
}

    .menu-header h3 {
        flex: 1;
        text-align: left;
        margin: 0;
        font-size: 1.2rem;
    }

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

    .menu-list li {
        padding: 14px 16px;
        border-bottom: 1px solid #f4f4f4;
        font-size: 14px;
        font-weight: 800;
        text-align: left;
    }

.text-content .more-text {
    display: none;
}

.text-content.expanded .more-text {
    display: inline;
}

.toggle-button {
    display: inline-block;
    background: none;
    color: #007BFF;
    border: none;
    cursor: pointer;
    padding-left: 4px;
    font-weight: bold;
    font-size: 14px;
}