.social-app .topbar,
.social-app header {
    grid-column: 1 / -1;
}

.social-app .social-main {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Prevent buttons from overflowing */
.social-page-hero .social-primary-btn {
    flex-shrink: 0;
}

/* Improve mobile behavior */
@media (max-width: 900px) {
    .social-app .social-main {
        padding: 16px;
    }

    .social-page-hero .social-primary-btn {
        width: auto;
    }
}

@media (max-width: 640px) {
    .social-app .social-main {
        padding: 12px;
    }

    .social-page-hero .social-primary-btn {
        width: 100%;
    }
}
.social-main {
    width: 100%;
    padding: 24px;
    box-sizing: border-box;
    overflow-x: hidden;
    color: #fff;
}
/* ==========================================================
   GHPHOUSE SOCIAL MODULE - DARK RED THEME
   ========================================================== */
/* ==========================================================
   SOCIAL PAGE LAYOUT FIX
   Forces users/friends/messages pages to use full page width
   ========================================================== */


.social-app {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: var(--topbar-height, auto) 1fr;
    width: 100%;
    min-height: 100vh;
    background: #07080d;
}
/* Fix hero layout */


.social-page-hero {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid rgba(255,45,85,0.16);
    background: radial-gradient(circle at top right, rgba(255,45,85,0.14), transparent 34%),
    linear-gradient(180deg, #18191f, #101116);
    box-shadow: 0 24px 60px rgba(0,0,0,0.42),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

.social-kicker {
    display: inline-block;
    margin-bottom: 7px;

    color: #ff6f8d;

    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.social-page-hero h1 {
    margin: 0;

    color: #fff;

    font-size: 30px;
    font-weight: 950;
}

.social-page-hero p {
    margin: 7px 0 0;

    color: #aaa;

    font-size: 14px;
}

.social-primary-btn,
.social-secondary-btn,
.social-danger-btn,
.social-muted-btn {
    min-height: 42px;
    padding: 0 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    border: none;
    border-radius: 999px;

    text-decoration: none;
    font-size: 13px;
    font-weight: 900;

    cursor: pointer;

    transition:
            transform 0.2s ease,
            background 0.2s ease,
            border-color 0.2s ease,
            opacity 0.2s ease;
}

.social-primary-btn {
    background: linear-gradient(135deg, #e1164d, #ff2d55);
    color: #fff;
    box-shadow: 0 14px 30px rgba(255,45,85,0.24);
}

.social-primary-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.07);
}

.social-secondary-btn {
    background: rgba(255,255,255,0.07);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.08);
}

.social-secondary-btn:hover {
    background: rgba(255,45,85,0.12);
    border-color: rgba(255,45,85,0.35);
    transform: translateY(-1px);
}

.social-danger-btn {
    background: rgba(255,45,85,0.14);
    color: #ff7a93;
    border: 1px solid rgba(255,45,85,0.25);
}

.social-danger-btn:hover {
    background: rgba(255,45,85,0.23);
    color: #fff;
}

.social-muted-btn {
    background: rgba(255,255,255,0.06);
    color: #bbb;
    border: 1px solid rgba(255,255,255,0.08);
}

.social-primary-btn:disabled,
.social-secondary-btn:disabled,
.social-danger-btn:disabled,
.social-muted-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}
/* Fix search panel width */


/* Search */

.social-search-panel {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 22px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(145deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018)),
    #151515;
}

.social-search-form {
    display: grid;
    grid-template-columns: 1fr 130px;
    gap: 12px;
}

.social-search-box {
    height: 46px;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 0 15px;

    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.09);

    background: rgba(255,255,255,0.045);
    color: #aaa;
}

.social-search-box input {
    width: 100%;

    border: none;
    outline: none;

    background: transparent;
    color: #fff;

    font-size: 14px;
}

.social-search-form button {
    border: none;
    border-radius: 14px;

    background: linear-gradient(135deg, #e1164d, #ff2d55);
    color: #fff;

    font-weight: 900;
    cursor: pointer;
}

/* Users */

.social-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
}

.social-user-card {
    position: relative;
    overflow: hidden;

    padding: 18px;

    border-radius: 22px;
    border: 1px solid rgba(255,45,85,0.13);

    background:
            radial-gradient(circle at top right, rgba(255,45,85,0.10), transparent 36%),
            linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.018)),
            #151515;

    box-shadow:
            0 20px 45px rgba(0,0,0,0.32),
            inset 0 1px 0 rgba(255,255,255,0.04);
}

.social-user-avatar {
    width: 74px;
    height: 74px;

    margin-bottom: 14px;

    border-radius: 24px;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(135deg, #e1164d, #ff2d55);
    color: #fff;

    font-size: 28px;
    font-weight: 950;

    box-shadow: 0 14px 30px rgba(255,45,85,0.20);
}

.social-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.social-user-info h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 950;
}

.social-user-info h3 a {
    color: #fff;
    text-decoration: none;
}

.social-user-info h3 a:hover {
    color: #ff7a93;
}

.social-user-info p {
    margin: 5px 0;

    color: #ff7a93;

    font-size: 13px;
    font-weight: 800;
}

.social-user-info small {
    display: block;

    min-height: 36px;

    color: #aaa;

    font-size: 13px;
    line-height: 1.4;
}

.social-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;

    margin-top: 16px;
}

/* Friends Tabs */

.social-tabs-panel {
    display: flex;
    gap: 10px;

    margin-bottom: 22px;
    padding: 8px;

    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);

    background:
            linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015)),
            #151821;

    overflow-x: auto;
}

.social-tab {
    min-height: 42px;
    padding: 0 16px;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    border: none;
    border-radius: 999px;

    background: transparent;
    color: #aaa;

    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

.social-tab span {
    min-width: 22px;
    height: 22px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;

    background: rgba(255,255,255,0.08);
    color: #fff;

    font-size: 12px;
}

.social-tab.active {
    color: #fff;
    background: linear-gradient(135deg, #e1164d, #ff2d55);
}

.social-tab-panel {
    display: none;
}

.social-tab-panel.active {
    display: block;
}

.social-section-head {
    margin-bottom: 16px;
}

.social-section-head h2 {
    margin: 0;

    color: #fff;

    font-size: 22px;
    font-weight: 950;
}

.social-section-head p {
    margin: 6px 0 0;

    color: #aaa;

    font-size: 14px;
}

/* Empty States */

.social-empty-state,
.social-empty-mini,
.social-chat-empty,
.social-chat-empty-inline,
.social-loading-state {
    padding: 34px 20px;

    text-align: center;

    border-radius: 20px;
    border: 1px dashed rgba(255,255,255,0.12);

    background: rgba(255,255,255,0.035);
    color: #aaa;
}

.social-empty-state {
    grid-column: 1 / -1;
}

.social-empty-state i,
.social-empty-mini i,
.social-chat-empty i,
.social-chat-empty-inline i {
    color: #ff2d55;
    font-size: 30px;
}

.social-empty-state h3,
.social-empty-mini strong,
.social-chat-empty h2,
.social-chat-empty-inline h3 {
    display: block;
    margin: 12px 0 6px;
    color: #fff;
}

.social-empty-mini a {
    display: inline-flex;
    margin-top: 10px;

    color: #ff7a93;

    text-decoration: none;
    font-weight: 900;
}

/* ==========================================================
   MESSAGES
   ========================================================== */

.social-message-main {
    padding-bottom: 40px;
}

.social-message-hero {
    margin-bottom: 18px;
}

.social-chat-shell {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 18px;

    min-height: 680px;
}

.social-chat-sidebar,
.social-chat-panel {
    border-radius: 24px;
    border: 1px solid rgba(255,45,85,0.14);

    background:
            radial-gradient(circle at top right, rgba(255,45,85,0.10), transparent 34%),
            linear-gradient(180deg, #18191f, #101116);

    box-shadow:
            0 24px 60px rgba(0,0,0,0.40),
            inset 0 1px 0 rgba(255,255,255,0.04);
}

.social-chat-sidebar {
    overflow: hidden;
}

.social-chat-sidebar-head {
    height: 68px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 18px;

    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.social-chat-sidebar-head h2 {
    margin: 0;

    color: #fff;

    font-size: 18px;
    font-weight: 950;
}

.social-chat-sidebar-head a {
    width: 38px;
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background: rgba(255,45,85,0.14);
    color: #ff7a93;

    text-decoration: none;
}

.social-conversation-list {
    max-height: 612px;
    overflow-y: auto;
}

.social-conversation-item {
    width: 100%;

    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 12px;
    align-items: center;

    padding: 14px 16px;

    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);

    background: transparent;
    color: #fff;

    text-align: left;
    cursor: pointer;

    transition: background 0.2s ease;
}

.social-conversation-item:hover,
.social-conversation-item.active {
    background: rgba(255,45,85,0.11);
}

.social-conversation-avatar {
    width: 48px;
    height: 48px;

    border-radius: 16px;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(135deg, #e1164d, #ff2d55);
    color: #fff;

    font-weight: 950;
}

.social-conversation-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.social-conversation-info {
    min-width: 0;
}

.social-conversation-info strong {
    display: block;

    color: #fff;

    font-size: 14px;
    font-weight: 950;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.social-conversation-info small {
    display: block;

    margin-top: 4px;

    color: #aaa;

    font-size: 12px;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.social-conversation-meta {
    display: grid;
    justify-items: end;
    gap: 5px;
}

.social-conversation-meta small {
    color: #777;
    font-size: 10px;
    white-space: nowrap;
}

.social-conversation-meta span {
    min-width: 20px;
    height: 20px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;

    background: #ff2d55;
    color: #fff;

    font-size: 11px;
    font-weight: 950;
}

/* Chat Panel */

.social-chat-panel {
    overflow: hidden;

    display: grid;
    grid-template-rows: 76px 1fr auto;
}

.social-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding: 0 20px;

    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.social-chat-head-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-chat-head-avatar {
    width: 50px;
    height: 50px;

    border-radius: 17px;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(135deg, #e1164d, #ff2d55);
    color: #fff;

    font-weight: 950;
}

.social-chat-head-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.social-chat-head h2 {
    margin: 0;

    color: #fff;

    font-size: 18px;
    font-weight: 950;
}

.social-chat-head p {
    margin: 4px 0 0;

    color: #ff7a93;

    font-size: 12px;
    font-weight: 800;
}

.social-message-list {
    min-height: 430px;
    max-height: 520px;

    padding: 20px;

    overflow-y: auto;

    background:
            radial-gradient(circle at bottom left, rgba(255,45,85,0.08), transparent 34%),
            rgba(0,0,0,0.10);
}

.social-message-row {
    display: flex;
    margin-bottom: 12px;
}

.social-message-row.mine {
    justify-content: flex-end;
}

.social-message-row.theirs {
    justify-content: flex-start;
}

.social-message-bubble {
    max-width: min(520px, 80%);

    padding: 10px 12px;

    border-radius: 18px;

    background: rgba(255,255,255,0.075);
    color: #fff;

    border: 1px solid rgba(255,255,255,0.08);
}

.social-message-row.theirs .social-message-bubble {
    border-top-left-radius: 6px;
}

.social-message-row.mine .social-message-bubble {
    background: linear-gradient(135deg, #e1164d, #ff2d55);
    border-color: rgba(255,255,255,0.08);
    border-top-right-radius: 6px;
}

.social-message-bubble p {
    margin: 0;

    color: #fff;

    font-size: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.social-message-bubble small {
    display: block;

    margin-top: 6px;

    color: rgba(255,255,255,0.72);

    font-size: 10px;
    text-align: right;
}

.social-message-image img,
.social-message-video {
    display: block;

    width: min(360px, 100%);
    max-height: 280px;

    object-fit: cover;

    margin-bottom: 8px;

    border-radius: 14px;
}

.social-message-audio {
    width: 270px;
    max-width: 100%;

    margin-bottom: 8px;
}

.social-message-file {
    display: flex;
    align-items: center;
    gap: 10px;

    min-width: 220px;
    padding: 12px;

    margin-bottom: 8px;

    border-radius: 14px;

    background: rgba(0,0,0,0.20);
    color: #fff;

    text-decoration: none;
}

.social-message-file i {
    color: #ffcc66;
    font-size: 22px;
}

.social-message-form {
    padding: 14px;

    border-top: 1px solid rgba(255,255,255,0.08);

    background: rgba(0,0,0,0.18);
}

.social-attachment-preview {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-bottom: 10px;
    padding: 10px 12px;

    border-radius: 14px;
    border: 1px solid rgba(255,45,85,0.22);

    background: rgba(255,45,85,0.08);
    color: #fff;
}

.social-attachment-preview.active {
    display: flex;
}

.social-attachment-preview div {
    display: flex;
    align-items: center;
    gap: 9px;

    min-width: 0;
}

.social-attachment-preview span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.social-attachment-preview button {
    width: 30px;
    height: 30px;

    border: none;
    border-radius: 50%;

    background: rgba(0,0,0,0.35);
    color: #fff;

    cursor: pointer;
}

.social-message-composer {
    display: grid;
    grid-template-columns: 44px 1fr 46px;
    gap: 10px;
    align-items: end;
}

.social-attach-btn,
.social-send-btn {
    width: 44px;
    height: 44px;

    border: none;
    border-radius: 15px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: rgba(255,255,255,0.08);
    color: #fff;

    cursor: pointer;
}

.social-attach-btn:hover {
    background: rgba(255,45,85,0.14);
}

.social-attach-btn input {
    display: none;
}

.social-send-btn {
    width: 46px;

    background: linear-gradient(135deg, #e1164d, #ff2d55);

    box-shadow: 0 12px 24px rgba(255,45,85,0.24);
}

.social-send-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.social-message-composer textarea {
    width: 100%;
    min-height: 44px;
    max-height: 120px;

    resize: none;

    padding: 12px 14px;

    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 16px;

    background: rgba(255,255,255,0.055);
    color: #fff;

    outline: none;

    font-size: 14px;
    line-height: 1.4;
}

.social-message-composer textarea:focus {
    border-color: #ff2d55;
    box-shadow: 0 0 0 3px rgba(255,45,85,0.14);
}

.social-chat-empty {
    align-self: center;
    justify-self: center;

    max-width: 420px;
}

.social-chat-empty-inline {
    width: min(420px, 100%);
    margin: 120px auto 0;
}

/* Responsive */

@media (max-width: 1100px) {
    .social-chat-shell {
        grid-template-columns: 300px 1fr;
    }
}

@media (max-width: 900px) {
    .social-main {
        padding: 16px;
    }

    .social-page-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .social-search-form {
        grid-template-columns: 1fr;
    }

    .social-chat-shell {
        grid-template-columns: 1fr;
    }

    .social-chat-sidebar {
        max-height: 360px;
    }

    .social-conversation-list {
        max-height: 290px;
    }

    .social-chat-panel {
        min-height: 620px;
    }
}

@media (max-width: 640px) {
    .social-main {
        padding: 12px;
    }

    .social-page-hero {
        padding: 18px;
    }

    .social-page-hero h1 {
        font-size: 24px;
    }

    .social-users-grid {
        grid-template-columns: 1fr;
    }

    .social-user-actions {
        flex-direction: column;
    }

    .social-primary-btn,
    .social-secondary-btn,
    .social-danger-btn,
    .social-muted-btn {
        width: 100%;
    }

    .social-chat-head {
        padding: 0 14px;
    }

    .social-chat-head .social-secondary-btn {
        width: auto;
        padding: 0 12px;
    }

    .social-message-list {
        padding: 14px;
    }

    .social-message-bubble {
        max-width: 92%;
    }

    .social-message-composer {
        grid-template-columns: 40px 1fr 42px;
    }

    .social-attach-btn,
    .social-send-btn {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }
}