/* ── Reset ───────────────────────────────────────────────────────────────── */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Base ────────────────────────────────────────────────────────────────── */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f7f9f9;
    color: #0f1419;
    font-size: 14px;
    line-height: 1.5;
}

.twitter-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

/* ── Profile header ──────────────────────────────────────────────────────── */
.profile-hdr {
    background: #fff;
    border-bottom: 1px solid #eff3f4;
    position: sticky;
    top: 0;
    z-index: 10;
}

.banner {
    width: 100%;
    height: 300px;
    background: #cfd9de;
    overflow: hidden;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    object-position: top;
}

.pinfo {
    padding: 12px 16px 16px;
}

.ptop {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.pav {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    margin-top: -38px;
    background: #cfd9de;
    flex-shrink: 0;
}

.follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0f1419;
    color: #fff;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.follow-btn svg {
    width: 15px;
    height: 15px;
    fill: #fff;
}

.follow-btn:hover {
    background: #272c30;
}

.pname {
    font-weight: 800;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
}

.badge {
    width: 18px;
    height: 18px;
    fill: #1d9bf0;
    flex-shrink: 0;
}

.phandle {
    color: #536471;
    font-size: 14px;
    margin: 2px 0 10px;
}

.pstats {
    display: flex;
    gap: 20px;
    font-size: 14px;
}

.pstats b {
    color: #0f1419;
    font-weight: 700;
}

.pstats span {
    color: #536471;
}

/* ── Tweets grid ─────────────────────────────────────────────────────────── */
.tweets-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px;
    align-items: stretch;
}

.twit-main {
    flex: 1 1 calc(33.333% - 16px);
    min-width: 260px;
    display: flex;
    flex-direction: column;
    max-width: 379px;
}

/* ── Tweet card ──────────────────────────────────────────────────────────── */
.tw {
    background: #fff;
    border: 1px solid #eff3f4;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px;
}

.tw a {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.tw-top {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.av {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.tc {
    flex: 1;
    min-width: 0;
}

.tt {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.nm {
    font-weight: 700;
    color: #0f1419;
    font-size: 15px;
}

.hn,
.dt {
    color: #536471;
    font-size: 13px;
}

.tx {
    white-space: pre-wrap;
    word-break: break-word;
}

.tx a {
    color: #1d9bf0;
    text-decoration: none;
    display: contents;
}

.tx a:hover {
    text-decoration: underline;
}

.mi {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 12px;
}

.ac {
    display: flex;
    gap: 20px;
    color: #536471;
    font-size: 13px;
}

/* ── Load More ───────────────────────────────────────────────────────────── */
.twit-main.twit-hidden {
    display: none;
}

.load-more-bar {
    position: sticky;
    bottom: 0;
    z-index: 20;
    background: #fff;
    border-top: 1px solid #eff3f4;
    padding: 12px 16px;
}

.load-more-btn {
    display: block;
    width: 100%;
    background: #f0eeee;
    color: #cd6744;
    border: 1px solid #e2dfdf;
    border-radius: 6px;
    padding: 13px 16px;
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    letter-spacing: 0.01em;
}

.load-more-btn:hover {
    background: #e8e5e5;
    color: #b85a38;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.ftr {
    padding: 16px;
    text-align: center;
    border-top: 1px solid #eff3f4;
    background: #fff;
}

.ftr a {
    color: #1d9bf0;
    font-size: 13px;
    text-decoration: none;
}

.ftr a:hover {
    text-decoration: underline;
}
.twitter-x-title {
    text-align: center;
    color: #1a803c;
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 3rem;
    letter-spacing: 1px;
}


/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
    .twit-main {
        flex: 1 1 100%;
    }

    .banner {
        height: auto;
    }
}