/* /* assets/css/style.css */
/* Retro 2010 Facebook Style – flat, clean, no modern effects */
/* UPDATED: WhatsApp-style chat, fixed friends section, mobile header fixes */

/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== GLOBAL ===== */
body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    background-color: #000000;
    color: #ffffff;
    overflow-x: hidden;
}

a { color: #ffffff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== ACCENT COLORS ===== */
:root {
    --accent-red: #fd0202;
}

/* ===== DARK MODE ===== */
body.dark-mode {
    background-color: #2b0000;
    color: #ffffff;
}
body.dark-mode #header-bar    { background-color: #2b0000; border-color: #000000; }
body.dark-mode #sidebar-left,
body.dark-mode #sidebar-right { background-color: #2b0000; border-color: #000000; }
body.dark-mode .post-card,
body.dark-mode .settings-box,
body.dark-mode #post-trigger-box { background-color: #2b0000; border-color: #2b0000; }
body.dark-mode .modal-box     { background-color: #2b0000; color: #ffffff; }
body.dark-mode a              { color: #ffffff; }

/* ===== HEADER ===== */
#header-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 50px;
    background-color: #2b0000;
    border-bottom: 1px solid #000000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 1000;
}

#logo {
    color: var(--accent-red);
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 1px;
    text-decoration: none;
    flex-shrink: 0;
}

#header-left  { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
#header-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.header-link {
    color: #ffffff;
    font-size: 13px;
    padding: 4px 10px;
    border: 1px solid #000000;
    background-color: #2a0000;
    white-space: nowrap;
    border-radius: 4px;
}
.header-link:hover { background-color: #330000; text-decoration: none; }

#header-username { color: var(--accent-red); font-weight: bold; white-space: nowrap; font-size: 14px; }

/* Notification Bell - Hidden on mobile */
#notif-bell {
    color: #ffffff;
    position: relative;
    font-size: 16px;
    flex-shrink: 0;
    cursor: pointer;
}
#notif-count {
    position: absolute;
    top: -5px; right: -6px;
    background: #2b0000;
    color: #ffffff;
    border-radius: 50%;
    font-size: 10px;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
}

/* ===== SEARCH ===== */
#search-wrap { position: relative; }
#search-input {
    width: 220px;
    padding: 6px 10px;
    border: 1px solid #000000;
    font-size: 13px;
    font-family: Arial, Helvetica, sans-serif;
    border-radius: 20px;
    background: #2a0000;
    color: #ffffff;
}
#search-input::placeholder { color: #ffffff; }
#search-results {
    position: absolute;
    top: 32px; left: 0;
    width: 260px;
    background: #2b0000;
    border: 1px solid #000000;
    z-index: 2000;
    display: none;
    border-radius: 8px;
    overflow: hidden;
}
#search-results .search-item {
    padding: 10px 12px;
    border-bottom: 1px solid #000000;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}
#search-results .search-item:hover { background: #2a0000; }
#search-results .search-item img   { width: 32px; height: 32px; object-fit: cover; border-radius: 50%; }

/* ===== LAYOUT ===== */
#main-wrap {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    min-height: calc(100vh - 50px);
}

.layout { display: flex; }

/* ===== ALL PAGE CONTAINERS CENTERED ===== */
.page-container {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    padding: 0 15px;
}

.empty-state {
    text-align: center;
    margin-top: 60px;
    color: #aaa;
    font-size: 16px;
}

/* ===== PROFILE POSTS GRID — Facebook 3-col style ===== */
.profile-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.profile-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.profile-posts .post { 
    width: 100%; 
}

.profile-posts .post-card {
    padding: 6px;
    margin-bottom: 0;
}
.profile-posts .post-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    border: 1px solid #ffffff;
    border-radius: 4px;
}
.profile-posts .post-video {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    border: 1px solid #ffffff;
    border-radius: 4px;
}
.profile-posts .post-content,
.profile-posts .post-actions,
.profile-posts .post-time {
    display: none;
}
.profile-posts .post-avatar {
    width: 24px;
    height: 24px;
}
.profile-posts .post-author {
    font-size: 11px;
    color: var(--accent-red);
}
.profile-posts .post-top {
    margin-bottom: 4px;
    gap: 6px;
}

/* ===== WATCH PAGE — YouTube style wider ===== */
.watch-upload {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}
.watch-upload .post-card {
    max-width: 100%;
    padding: 15px;
}

/* Make the watch page post-trigger match the height of the home post-trigger box */
.watch-upload #post-trigger-box {
    min-height: 62px; /* matches avatar (42px) + vertical padding (10px top + 10px bottom) */
    display: flex;
    align-items: center;
    gap: 10px;
}
.watch-upload .post-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: none;
    display: block;
    border: 1px solid #ffffff;
    background: #000;
    border-radius: 8px;
}
.watch-upload .post-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: none;
    object-fit: cover;
    display: block;
    border: 1px solid #ffffff;
    border-radius: 8px;
}
.watch-upload .post-top .post-avatar {
    width: 40px;
    height: 40px;
}
.watch-upload .post-author {
    font-size: 15px;
    color: var(--accent-red);
}
.watch-upload .post-time {
    font-size: 12px;
}
.watch-upload .post-content p {
    font-size: 15px;
    line-height: 1.5;
    margin-top: 10px;
}

.settings-container {
    max-width: 550px;
    margin: 0 auto;
    width: 100%;
}

.friends-page {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    padding: 0 15px;
}

.upload-loader {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #2b0000;
    padding: 25px;
    border: 1px solid rgb(255, 255, 255);
    color: white;
    z-index: 99999;
    border-radius: 8px;
    font-size: 15px;
}

#uploadOverlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.upload-box {
    background: #2b0000;
    padding: 30px;
    color: white;
    border: 1px solid rgb(255, 255, 255);
    text-align: center;
    border-radius: 8px;
    font-size: 16px;
}

button:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== LEFT SIDEBAR ===== */
#sidebar-left {
    position: fixed;
    top: 50px; left: 0;
    width: 240px;
    height: calc(100vh - 50px);
    background-color: #2b0000;
    border-right: 1px solid #000000;
    overflow-y: auto;
    z-index: 100;
    padding-top: 10px;
}
#sidebar-left ul { list-style: none; }
#sidebar-left ul li a {
    display: block;
    padding: 12px 18px;
    color: #ffffff;
    font-weight: bold;
    border-bottom: 1px solid #000000;
    font-size: 14px;
    transition: background 0.2s;
}

/* ===== RIGHT SIDEBAR ===== */
#sidebar-right {
    position: fixed;
    top: 50px; right: 0;
    width: 280px;
    height: calc(100vh - 50px);
    background-color: #2b0000;
    border-left: 1px solid #000000;
    overflow-y: auto;
    z-index: 999;
    display: flex;
    flex-direction: column;
}
#chat-list-label {
    background-color: #2b0000;
    color: #ffffff;
    padding: 12px 15px;
    font-weight: bold;
    font-size: 14px;
    border-bottom: 1px solid #000000;
}
#chat-user-list { list-style: none; overflow-y: auto; flex: 1; }
.chat-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-bottom: 1px solid #000000;
    cursor: pointer;
    transition: background 0.2s;
}
.chat-user-item:hover { background: #2b0000; }
.chat-avatar { width: 36px; height: 36px; object-fit: cover; border: 1px solid #330000; border-radius: 50%; }
.chat-user-name { font-size: 14px; }
.chat-user-status {
    font-size: 11px;
    color: #00ff00;
    margin-left: auto;
}

/* ===== CENTER FEED ===== */
#center-feed {
    margin-left: 250px;
    margin-right: 290px;
    padding: 20px;
    overflow-y: auto;
    min-height: calc(100vh - 50px);
    display: flex;
    justify-content: center;
}

.center-feed-inner {
    width: 100%;
    max-width: 600px;
}

.feed-container {
    width: 100%;
    max-width: 600px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#feed-container {
    width: 100%;
    max-width: 600px;
}

/* ===== POST TRIGGER BOX ===== */
#post-trigger-box {
    width: 100%;
    background: #2b0000;
    border: 1px solid #000000;
    padding: 10px 12px;
    margin-bottom: 15px;
    border-radius: 10px;

    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

/* Avatar */
.post-trigger-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.upload-buttons {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.upload-buttons button {
    flex: 1;
    padding: 10px;
    background: #2a0000;
    border: 1px solid #000000;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.upload-buttons button:hover {
    background: #330000;
}

#post-trigger-box span {
    color: #ffffff;
    font-size: 14px;
}

#post-trigger-box:hover { background: #2a0000; }
.post-trigger-avatar { width: 42px; height: 42px; object-fit: cover; border: 1px solid #ffffff; border-radius: 50%; }
.post-trigger-text { color: #ffffff; }

/* ===== POST CARD — Facebook style ===== */
.post-card {
    width: 100%;
    width: 100%;
    background: #2b0000;
    border: 1px solid #2b0000;
    margin-bottom: 18px;
    padding: 15px;
    border-radius: 8px;
}
.post-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.post-avatar { width: 44px; height: 44px; object-fit: cover; border: 1px solid #ffffff; border-radius: 50%; }
.post-meta   { display: flex; flex-direction: column; }
.post-author { font-weight: bold; color: var(--accent-red); font-size: 15px; }
.post-time   { font-size: 12px; color: #ffffff; }
.post-content p { line-height: 1.5; margin-top: 10px; font-size: 15px; }
.show-more-link { font-size: 13px; color: #ffffff; cursor: pointer; }

/* ===== POST MEDIA — Facebook image, 16:9 video ===== */
.post-media { margin: 12px 0; }
.post-img   {
    max-width: 100%;
    display: block;
    border: 1px solid #ffffff;
    border-radius: 8px;
}
.post-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: none;
    display: block;
    border-radius: 8px;
}

/* Post Actions */
.post-actions {
    margin-top: 12px;
    border-top: 1px solid #ffffff;
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.action-btn {
    background: #2a0000;
    border: 1px solid #ffffff;
    padding: 8px 16px;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    color: #ffffff;
    flex: 1;
    border-radius: 6px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.action-btn:hover { background: #330000; }
.action-btn.liked { background: #2b0000; color: #ffffff; border-color: #ffffff; }

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-box {
    background: #2b0000;
    border: 1px solid #000000;
    width: 550px;
    max-width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 12px;
}
.modal-header {
    background: #2b0000;
    color: #ffffff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 16px;
    border-bottom: 1px solid #000000;
}
.modal-close {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 20px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.comment-submit-btn {
    background: #2b0000;
    color: #ffffff;
    border: 1px solid #ffffff;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    display: inline-block;
}

.comment-submit-btn:hover {
    background: #730777;
}

.modal-close:hover { background: rgba(255,255,255,0.2); }
.modal-body { padding: 20px; }
.modal-body textarea {
    width: 100%;
    height: 120px;
    resize: vertical;
    border: 1px solid #000000;
    padding: 12px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    background: #2a0000;
    color: #ffffff;
    border-radius: 8px;
}
.post-attachments { margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }

/* ===== COMMENTS ===== */
.comment-item { border-bottom: 1px solid #ffffff; padding: 12px 0; }
.comment-top  { display: flex; align-items: center; gap: 10px; }
.comment-avatar { width: 36px; height: 36px; object-fit: cover; border: 1px solid #000000; border-radius: 50%; }
.comment-author { font-weight: bold; font-size: 13px; color: var(--accent-red); }
.comment-text   { margin-left: 46px; font-size: 14px; line-height: 1.5; color: #ffffff; }
.comment-time   { font-size: 11px; color: #ffffff; margin-left: 46px; }
.reply-toggle   { font-size: 12px; color: #0d6efd !important; cursor: pointer; margin-left: 46px; margin-top: 4px; text-decoration: none; }
.reply-list     { margin-left: 46px; margin-top: 8px; border-left: 2px solid #000000; padding-left: 12px; }
.reply-item     { padding: 6px 0; border-bottom: 1px solid #000000; }
.reply-input-row { display: flex; gap: 8px; margin-left: 46px; margin-top: 6px; }
.reply-input-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #000000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    background: #2a0000;
    color: #ffffff;
    border-radius: 20px;
}
.reply-input-row button {
    padding: 8px 16px;
    background: #2b0000;
    color: #ffffff;
    border: 1px solid #000000;
    cursor: pointer;
    font-size: 13px;
    border-radius: 20px;
}
.reply-toggle:hover { color: #0056b3 !important; text-decoration: underline; }
#comment-form { margin-top: 15px; }
#comment-input {
    width: 100%;
    height: 70px;
    border: 1px solid #000000;
    padding: 12px;
    font-family: Arial, Helvetica, sans-serif;
    resize: vertical;
    font-size: 14px;
    background: #2a0000;
    color: #ffffff;
    border-radius: 8px;
}

/* ===== WHATSAPP STYLE CHAT ===== */
/* Desktop Chat Window - HIDDEN ON MOBILE */
#chat-window {
    position: fixed;
    bottom: 0; right: 240px;
    width: 340px;
    height: 450px;
    background: #2b0000;
    border: 1px solid #000000;
    border-bottom: none;
    z-index: 2500;
    display: flex;
    flex-direction: column;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
}

/* Force hide chat window on mobile */
@media (max-width: 768px) {
    #chat-window {
        display: none !important;
    }
}

#chat-window-header {
    background: #2b0000;
    color: #ffffff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #000000;
    border-radius: 12px 12px 0 0;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #000000;
}

.chat-header-name {
    font-weight: bold;
    font-size: 15px;
    color: var(--accent-red);
}

.chat-header-status {
    font-size: 12px;
    color: #00ff00;
}

#chat-close-btn { 
    background: none; 
    border: none; 
    color: #ffffff; 
    cursor: pointer; 
    font-size: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}
#chat-close-btn:hover { background: rgba(255,51,51,0.2); }

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #000000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* WhatsApp Style Message Bubbles */
.chat-message {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
}

.chat-message.sent {
    align-self: flex-end;
    background: #2b0000;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.chat-message.received {
    align-self: flex-start;
    background: #d65858;
    color: #ffffff;
    border: 1px solid #000000;
    border-bottom-left-radius: 4px;
}

.chat-message-time {
    font-size: 10px;
    color: rgba(255,255,255,0.7);
    text-align: right;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.chat-message-status {
    font-size: 12px;
}

#chat-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #2b0000;
    border-top: 1px solid #000000;
}

#chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #000000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    background: #2a0000;
    color: #ffffff;
    border-radius: 24px;
    outline: none;
}
#chat-input:focus { border-color: #ffffff; }

.send-btn {
    background: none !important;
    border: none !important;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    padding: 5px 10px;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
}
#chat-input-row button:hover { background: #2b0000; }

/* Date separator */

/* ===== WHITE OUTLINES (posts, comments, like/comment buttons, post form) ===== */
/* Make post cards and their media show white borders/outlines */
.post-card {
    border: 1px solid #ffffff !important;
}
.post-card .post-avatar {
    border-color: #ffffff !important;
}
.post-card .post-img,
.post-card .post-video {
    border: 1px solid #ffffff !important;
    border-radius: 8px !important;
}

/* Ensure the divider/line after media and above actions is white */
.post-card .post-actions {
    border-top: 1px solid #ffffff !important;
}

/* Like / Comment buttons inside posts should have white outline */
.post-card .action-btn {
    border: 1px solid #ffffff !important;
}
.post-card .action-btn.liked {
    border-color: #ffffff !important;
}

/* Post creation trigger and modal outlines */
#post-trigger-box {
    border: 1px solid #ffffff !important;
}
.post-trigger-avatar { border-color: #ffffff !important; }

/* Modal outlines for post/comment/view should have white border */
.modal-box {
    border: 1px solid #ffffff !important;
}
.modal-header { border-bottom: 1px solid #ffffff !important; }

/* Comment form and inputs outlines */
.modal-body textarea,
#comment-input,
.reply-input-row input {
    border: 1px solid #ffffff !important;
}

#comment-form {
    border: 1px solid #ffffff !important;
    padding: 10px;
    border-radius: 8px;
}

/* Comment list and replies */
.comment-avatar { border-color: #ffffff !important; }
.comment-item { border-bottom: 1px solid #ffffff !important; }
.reply-list { border-left: 2px solid #ffffff !important; }
.reply-item { border-bottom: 1px solid #ffffff !important; }

/* Keep backgrounds unchanged — only outlines */

.chat-date-separator {
    text-align: center;
    margin: 15px 0;
    font-size: 12px;
    color: #ffffff;
    position: relative;
}

.chat-date-separator::before,
.chat-date-separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: #330000;
}

.chat-date-separator::before { left: 0; }
.chat-date-separator::after { right: 0; }

/* ===== AUTH PAGES ===== */
body.auth-page {
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
#auth-box {
    background: #2b0000;
    border: 1px solid #000000;
    padding: 35px 40px;
    width: 420px;
    max-width: 95vw;
    border-radius: 12px;
    position: relative;
    z-index: 10001;
}
#auth-logo    { color: var(--accent-red); font-size: 32px; font-weight: bold; margin-bottom: 8px; text-align: center; }
#auth-tagline { color: #ffffff; margin-bottom: 25px; text-align: center; font-size: 15px; }
#auth-box input[type="text"],
#auth-box input[type="email"],
#auth-box input[type="password"],
#auth-box input[type="date"] {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 15px;
    border: 1px solid #000000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    background: #2a0000;
    color: #ffffff;
    border-radius: 8px;
    transition: border-color 0.2s;
}
#auth-box input:focus { border-color: #ffffff; outline: none; }
.form-row { display: flex; gap: 12px; }
.form-row input { flex: 1; }
.dob-label { font-size: 13px; color: #ffffff; display: block; margin-bottom: 6px; }
.auth-error   { background: #330000; border: 1px solid #000000; padding: 12px; margin-bottom: 15px; color: #ffffff; border-radius: 8px; font-size: 14px; }
.auth-success { background: #003300; border: 1px solid #000000; padding: 12px; margin-bottom: 15px; color: #00ff00; border-radius: 8px; font-size: 14px; }
.auth-switch  { margin-top: 20px; font-size: 14px; color: #ffffff; text-align: center; }

/* ===== BUTTONS ===== */
.btn-primary {
    background: #2b0000;
    color: #ffffff;
    border: 1px solid #ffffff;
    outline: 1px solid #ffffff;
    padding: 10px 24px;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    display: inline-block;
    border-radius: 8px;
    font-weight: bold;
    transition: background 0.2s;
}
.btn-primary:hover { background: #730707; }
.btn-secondary {
    background: #2a0000;
    color: #ffffff;
    border: 1px solid #ffffff;
    outline: 1px solid #ffffff;
    padding: 10px 24px;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    display: inline-block;
    border-radius: 8px;
    transition: background 0.2s;
}
.btn-secondary:hover { background: #330000; }

/* ===== PROFILE — Facebook style ===== */
.profile-card {
    background: #2b0000;
    border: 1px solid #000000;
    padding: 25px;
    display: flex;
    align-items: flex-start;
    gap: 25px;
    margin-bottom: 20px;
    border-radius: 12px;
}
.profile-pic-large { width: 140px; height: 140px; object-fit: cover; border: 3px solid #000000; border-radius: 8px; }
.profile-info h2   { font-size: 24px; color: var(--accent-red); margin-bottom: 8px; }
.profile-info p    { font-size: 15px; color: #ffffff; margin-bottom: 6px; }

/* ===== FRIENDS SECTION — PERFECT STYLING ===== */
/* Friends Page Header */
.friends-header {
    background: #2b0000;
    border: 1px solid #000000;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
}

.friends-header h1 {
    font-size: 24px;
    color: var(--accent-red);
    margin-bottom: 15px;
}

.friends-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.friends-tab {
    padding: 10px 20px;
    background: #2a0000;
    border: 1px solid #000000;
    color: #ffffff;
    cursor: pointer;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.2s;
}

.friends-tab:hover { background: #330000; }
.friends-tab.active { background: #2b0000; border-color: #ffffff; }

/* Friend Card — Horizontal layout */
.friend-card {
    background: #2b0000;
    border: 1px solid #000000;
    padding: 15px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.friend-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.friend-avatar { 
    width: 70px; 
    height: 70px; 
    object-fit: cover; 
    border: 2px solid #000000; 
    border-radius: 50%;
    flex-shrink: 0;
}

.friend-info { 
    flex: 1; 
    min-width: 0;
}

.friend-name { 
    font-weight: bold; 
    font-size: 17px; 
    color: var(--accent-red); 
    display: block;
    margin-bottom: 4px;
}

.friend-mutual { 
    font-size: 13px; 
    color: #ffffff; 
    display: block;
}

.friend-actions { 
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.friend-actions .btn-primary,
.friend-actions .btn-secondary {
    padding: 8px 20px;
    font-size: 13px;
    white-space: nowrap;
}

/* Friend Request Card */
.friend-request-card {
    background: #2b0000;
    border: 1px solid #000000;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-radius: 12px;
}

.friend-request-card .friend-avatar {
    width: 80px;
    height: 80px;
    border: 2px solid #000000;
}

.friend-request-card .friend-name {
    font-size: 18px;
    color: var(--accent-red);
}

/* Friends Grid for suggestions */
.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.friend-card-grid {
    background: #2b0000;
    border: 1px solid #000000;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s;
}

.friend-card-grid:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.15);
}

.friend-card-grid .friend-cover {
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, #330000, #1a0000);
}

.friend-card-grid .friend-info-grid {
    padding: 20px;
    text-align: center;
    margin-top: -40px;
}

.friend-card-grid .friend-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #000000;
    margin-bottom: 12px;
}

.friend-card-grid .friend-name {
    font-size: 17px;
    margin-bottom: 6px;
    color: var(--accent-red);
}

.friend-card-grid .friend-mutual {
    margin-bottom: 15px;
}

.friend-card-grid .friend-actions {
    justify-content: center;
}

/* ===== NOTIFICATIONS ===== */
.notif-item {
    background: #2b0000;
    border: 1px solid #000000;
    padding: 15px 18px;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border-radius: 10px;
    transition: background 0.2s;
}
.notif-item:hover { background: #2b0000; }
.notif-item.notif-unread { background: #2b0000; border-left: 4px solid #fdfdfd; }
.notif-avatar { width: 50px; height: 50px; object-fit: cover; border: 1px solid #000000; border-radius: 50%; }
.notif-text { flex: 1; }
.notif-text p { font-size: 15px; color: var(--accent-red); line-height: 1.5; }
.notif-text .post-time { font-size: 12px; color: #ffffff; margin-top: 4px; }

/* ===== SETTINGS — FIXED STYLING ===== */
.settings-box {
    background: #2b0000;
    border: 1px solid #000000;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    border-radius: 12px;
}

.settings-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #000000;
}

.settings-header h2 {
    font-size: 24px;
    color: var(--accent-red);
    margin-bottom: 8px;
}

.settings-header h2 {
    color: #fd0202 !important;
}

.settings-header p {
    color: #ffffff;
    font-size: 14px;
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section-title {
    font-size: 18px;
    color: var(--accent-red);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #000000;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    font-size: 15px;
    border-bottom: 1px solid #000000;
}

.settings-row:last-child { border-bottom: none; }

.settings-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-label strong {
    color: #ffffff;
    font-size: 15px;
}

.settings-label span {
    color: #ffffff;
    font-size: 13px;
}

.settings-box input[type="password"],
.settings-box input[type="text"],
.settings-box input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 15px;
    border: 1px solid #000000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    background: #2a0000;
    color: #ffffff;
    border-radius: 8px;
    transition: border-color 0.2s;
}

.settings-box input:focus { border-color: #ffffff; outline: none; }

.settings-box select {
    padding: 12px 16px;
    border: 1px solid #000000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    background: #2a0000;
    color: #ffffff;
    border-radius: 8px;
    min-width: 150px;
}

.settings-box hr { border: none; border-top: 1px solid #000000; margin: 25px 0; }

.settings-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #000000;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    background: #2a0000;
    border: 1px solid #000000;
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch.active {
    background: #730707;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-switch.active::after {
    transform: translateX(24px);
}

/* ===== SECTION TITLE ===== */
.section-title {
    font-size: 20px;
    border-bottom: 2px solid #000000;
    padding-bottom: 10px;
    margin-bottom: 25px;
    color: var(--accent-red);
    font-weight: bold;
}

/* ===== FOOTER ===== */
#footer-bar {
    text-align: center;
    padding: 15px;
    font-size: 13px;
    color: #ffffff;
    border-top: 1px solid #000000;
    background: #2b0000;
    margin-left: 250px;
    margin-right: 290px;
}

/* ===== MOBILE CHAT TOGGLE ===== */
.chat-toggle-btn {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #000000;
    color: #ffffff;
    font-size: 24px;
    display: none;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    z-index: 9999;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(248, 3, 3, 0.986);
    transition: transform 0.2s;
    border: 1px solid #000000;
}
.chat-toggle-btn:hover { transform: scale(1.1); }

/* ===== MOBILE CHAT PANEL — WHATSAPP STYLE ===== */
/* This is now handled by conversation.php full screen view */
/* Keeping for potential future modal chat implementation */

/* Force hide any leftover mobile chat elements */
.chat-mobile {
    display: none !important;
}

.chat-toggle-btn {
    display: none !important;
}

/* ===== MOBILE BOTTOM NAV ===== */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #0c0202;
    border-top: 1px solid #000000;
    display: none;
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
}
.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
    font-size: 11px;
    padding: 6px;
    gap: 3px;
    transition: color 0.2s;
}
.mobile-nav-item:hover { color: #ffffff; text-decoration: none; }
.mobile-nav-item.active { color: #ffffff; font-weight: bold; }

/* ===== TABLET — hide sidebars, show mobile nav ===== */
@media (max-width: 1024px) {
    #sidebar-left, #sidebar-right { display: none; }

    #center-feed {
        margin-left: 0;
        margin-right: 0;
        padding: 15px;
    }

    #footer-bar {
        margin-left: 0;
        margin-right: 0;
    }

    .modal-box { width: 95vw; }
    #auth-box { width: 95vw; }
    #chat-window { display: none; }

    .mobile-nav { display: flex; }
    #main-wrap { padding-bottom: 70px; }
    .chat-toggle-btn { display: flex; }

    #search-input { width: 160px; }

    .watch-upload { max-width: 100%; }

    .friends-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {
    body { font-size: 14px; }

    #logo { font-size: 18px; }

    #header-bar {
        height: 55px;
        padding: 0 12px;
        background-color: #1a0000;
        border-bottom: 2px solid #000000;
    }

    #header-left { gap: 8px; }
    #header-right { gap: 8px; }

    /* Hide notification bell on mobile */
    #notif-bell { display: none; }

    /* Show messenger icon on mobile */
    #messenger-link { display: flex !important; }

    /* Smaller search on mobile */
    #search-input {
        width: 120px;
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 20px;
        border: 1px solid #000000;
        background-color: #2a0000;
        color: #ffffff;
    }
    #search-input::placeholder {
        color: #ffffff;
        opacity: 0.7;
    }
    #search-results { width: 200px; }

    .header-link {
        font-size: 12px;
        padding: 6px 10px;
        border: 1px solid #000000;
        background-color: #2a0000;
        color: #ffffff;
        border-radius: 20px;
        transition: all 0.2s ease;
    }
    .header-link:hover {
        background-color: #330000;
        border-color: #000000;
        transform: translateY(-1px);
    }

    #header-username {
        font-size: 13px;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        color: #ffffff;
        font-weight: bold;
    }

    /* Mobile header profile link styling */
    #header-profile-link {
        padding: 6px 10px;
        border-radius: 20px;
        background-color: #2a0000;
        border: 1px solid #000000;
        transition: all 0.2s ease;
    }
    #header-profile-link:hover {
        background-color: #330000;
        border-color: #000000;
        transform: translateY(-1px);
    }

    #main-wrap {
        padding-bottom: 70px;
        margin-top: 55px;
    }

    #center-feed { padding: 10px; }

    .center-feed-inner,
    .feed-container,
    #feed-container,
    .page-container,
    .friends-page {
        max-width: 100%;
    }

    /* Posts — full width, Facebook style on mobile */
    .post-card {
        max-width: 100%;
        padding: 12px;
        margin-bottom: 15px;
    }
    .post-avatar { width: 40px; height: 40px; }
    .post-author { font-size: 14px; }
    .post-content p { font-size: 14px; }
    .post-img { max-width: 100%; }
    .post-video { width: 100%; aspect-ratio: 16 / 9; max-height: none; }
    .action-btn { padding: 8px 12px; font-size: 12px; }

    /* Profile card — centered stack on mobile */
    .profile-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
        gap: 15px;
    }
    .profile-pic-large { width: 120px; height: 120px; }
    .profile-info h2 { font-size: 20px; }

    /* Profile posts — 2 columns on mobile */
    .profile-posts {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .profile-posts .post-img { height: 140px; }
    .profile-posts .post-video { height: 120px; }

    /* Friend cards — perfect mobile styling */
    .friend-card {
        padding: 12px 15px;
        gap: 12px;
    }
    .friend-avatar { width: 55px; height: 55px; }
    .friend-name { font-size: 15px; }
    .friend-mutual { font-size: 12px; }
    .friend-actions .btn-primary,
    .friend-actions .btn-secondary {
        padding: 8px 14px;
        font-size: 12px;
    }

    .friend-request-card {
        padding: 15px;
        gap: 15px;
    }
    .friend-request-card .friend-avatar {
        width: 60px;
        height: 60px;
    }
    .friend-request-card .friend-name {
        font-size: 16px;
    }

    .friends-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .friends-header {
        padding: 15px;
    }
    .friends-header h1 {
        font-size: 20px;
    }
    .friends-tab {
        padding: 8px 14px;
        font-size: 13px;
    }

    /* Watch page — YouTube full width on mobile */
    .watch-upload { max-width: 100%; }
    .watch-upload .post-card { max-width: 100%; padding: 12px; }
    .watch-upload .post-video { width: 100%; aspect-ratio: 16 / 9; max-height: none; }
    .watch-upload .post-img { width: 100%; aspect-ratio: 16 / 9; max-height: none; }
    .watch-upload .post-content p { font-size: 14px; }

    /* Comments */
    .comment-avatar { width: 32px; height: 32px; }
    .comment-text { font-size: 14px; margin-left: 42px; }
    .comment-time { margin-left: 42px; }
    .reply-toggle { margin-left: 42px; }
    .reply-list { margin-left: 42px; }
    .reply-input-row { margin-left: 42px; }
    #comment-input { height: 70px; font-size: 14px; }

    .modal-body textarea { height: 100px; font-size: 14px; }
    .btn-primary, .btn-secondary { padding: 10px 18px; font-size: 14px; }

    #post-trigger-box { padding: 12px; }
    .post-trigger-avatar { width: 38px; height: 38px; }

    .notif-avatar { width: 44px; height: 44px; }
    .notif-text p { font-size: 14px; }

    /* Settings — fixed mobile styling */
    .settings-box {
        max-width: 100%;
        padding: 20px;
        margin: 0 10px;
    }
    .settings-header h2 {
        font-size: 20px;
    }
    .settings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px 0;
    }
    .settings-actions {
        flex-direction: column;
        gap: 10px;
    }
    .settings-actions .btn-primary,
    .settings-actions .btn-secondary {
        width: 100%;
        text-align: center;
    }

    #search-input { width: 100px; font-size: 11px; }
    #search-results { width: 180px; }

    .chat-toggle-btn {
        width: 50px;
        height: 50px;
        font-size: 22px;
        bottom: 75px;
        right: 15px;
    }
    .mobile-nav { height: 56px; }
    .mobile-nav-item { font-size: 10px; }
    #footer-bar { font-size: 12px; padding: 12px; }
}

/* ===== HIDE MOBILE NAV ON DESKTOP ===== */
@media (min-width: 1025px) {
    .mobile-nav {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: static !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    #main-wrap { padding-bottom: 0; }
    .chat-toggle-btn { display: none !important; }
}

/* ===== VERY SMALL SCREENS ===== */
@media (max-width: 380px) {
    #logo { font-size: 16px; }
    #header-left { gap: 6px; }
    #header-right { gap: 6px; }
    .header-link { font-size: 11px; padding: 3px 6px; }
    #search-input { width: 90px; font-size: 11px; padding: 5px 8px; }

    .friend-card {
        padding: 10px;
        gap: 10px;
    }
    .friend-avatar { width: 48px; height: 48px; }
    .friend-name { font-size: 14px; }
    .friend-actions .btn-primary,
    .friend-actions .btn-secondary {
        padding: 6px 10px;
        font-size: 11px;
    }

    .profile-posts { grid-template-columns: repeat(2, 1fr); gap: 4px; }
    .profile-posts .post-img { height: 120px; }
}

@media (max-width: 768px) {
    #sidebar-left,
    #sidebar-right {
        display: none !important;
    }

    #center-feed {
        margin: 0 !important;
        width: 100% !important;
    }

    .mobile-nav {
        z-index: 9999;
    }

    /* Slightly smaller mobile nav items to avoid covering content */
    .mobile-nav-item {
        padding: 4px !important;
        gap: 2px !important;
        font-size: 10px !important;
    }
}

@media (max-width: 768px) {

    .chat-container {
        width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    #center-feed {
        margin: 0 !important;
        padding: 10px !important;
    }

    #main-wrap {
        padding: 0 !important;
        /* Ensure content is not hidden behind the fixed mobile nav */
        padding-bottom: calc(72px + env(safe-area-inset-bottom)) !important;
    }

    .chat-list {
        width: 100% !important;
    }

    .chat-item {
        width: 100%;
    }
}

.chat-container {
    position: relative;
    z-index: 10;
}

.chat-badge {
    background: #730707;
    color: white;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 50%;
    margin-left: auto;
}

.chat-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
}

.chat-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-user-name {
    font-weight: bold;
    color: var(--accent-red);
}

.chat-user-last {
    font-size: 12px;
    color: #ffffff;
}

.chat-user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.chat-time {
    font-size: 11px;
    color: #ffffff;
}

#center-feed {
    width: 100%;
    display: flex;
    justify-content: center;
}

.feed-container {
    width: 100%;
}

.like-btn {
    background: #2b0000; /* dark like your UI */
    color: #fff;
    border: 1px solid #f0f0f0;
}

.like-btn.liked {
    background: #2b0000 !important;
    color: #fff;
}

.action-btn.liked i,
.action-btn.liked span {
    color: #db0b0b !important;
}

.action-btn.liked,
.action-btn.liked * {
    color: #e70c0c !important;
}

#send-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    padding: 5px 10px;
}

.conversation-input button {
    all: unset;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
}

#chat-input-row button {
    all: unset !important;
    cursor: pointer;
    font-size: 0 !important; /* hides "Send" text */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Your icon */
#chat-input-row button::before {
    content: "⌯⌲";
    font-size: 22px;
    color: #fd0202;
}

/* REMOVE HOVER BACKGROUND */
#chat-input-row button:hover {
    background: none !important;
}

#chat-messages {
    overflow-y: auto;

    /* hide scrollbar */
    scrollbar-width: none;       /* Firefox */
    -ms-overflow-style: none;    /* IE */
}

#chat-messages::-webkit-scrollbar {
    display: none;               /* Chrome, Safari */
}

.notif-text p {
    color: #ffffff !important;
}

.notif-text p strong {
    color: #fd0202 !important;
}

.chat-message.sent {
    background: #2a0000 !important;
    color: #ffffff !important;
    border: 1px solid #ffffff !important;
}

.chat-message.received {
    background: #062708 !important;
    color: #ffffff !important;
    border: 1px solid #ffffff !important;
}

#chat-input-row {
    background: #000000 !important;
}

#chat-input {
    background: #2a0000 !important;
    border: 1px solid #ffffff !important;
    color: #ffffff !important;
}

#chat-input-row button::before {
    color: #fd0202 !important;
}

#messenger-link {
    display: none;
}

@media (min-width: 769px) {
    .conversation-header {
        padding: 12px 16px;
    }

    .user-avatar img {
        width: 40px;
        height: 40px;
    }

    .user-name {
        font-size: 16px;
    }
}

@media (min-width: 1025px) {
    #sidebar-right {
        display: flex !important;
    }
}

/* ===== FIX DESKTOP CHAT HEADER LIKE MOBILE ===== */

#chat-window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #2b0000;
    border-bottom: 1px solid #000000;
}

/* LEFT SIDE (avatar + name) */
.chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* PROFILE IMAGE */
.chat-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
}

/* NAME */
.chat-header-name {
    font-size: 15px;
    font-weight: bold;
    color: #fd0202;
}

/* CLOSE BUTTON */
#chat-close-btn {
    font-size: 20px;
    cursor: pointer;
}

/* ===== DESKTOP: POPUP OUTLINE WHITE + NO INNER CHAT BUBBLE OUTLINE ===== */
@media (min-width: 1025px) {
    /* Outer popups (modals) and desktop chat window get a white outline */
    .modal-box,
    #chat-window {
        border: 1px solid #ffffff !important;
        box-shadow: none !important;
    }

    /* Remove inner chat bubble outlines on desktop so only popup shows outline */
    .chat-message.sent,
    .chat-message.received {
        border: none !important;
    }

    /* Ensure chat header and close button keep a subtle white outline */
    #chat-window-header, #chat-close-btn {
        border-bottom: 1px solid transparent;
    }
}

/* ===== DESKTOP: TOP SEARCH INPUT WHITE OUTLINE ===== */
@media (min-width: 1025px) {
    /* Make the top search input have a white border on desktop */
    #search-input {
        border: 1px solid #ffffff !important;
        background-clip: padding-box;
    }
    #search-input:focus {
        border: 1px solid #ffffff !important;
        box-shadow: 0 0 0 4px rgba(255,255,255,0.03) !important;
    }
    #search-input::placeholder {
        color: rgba(255,255,255,0.8) !important;
    }

    /* Ensure search results dropdown matches the white outline on desktop */
    #search-results {
        border: 1px solid #ffffff !important;
    }
}

/* ===== GLOBAL BUTTON OUTLINES: WHITE ===== */
/* Force a white border for all button-like elements site-wide */
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
input[type="image"],
[role="button"],
a[role="button"],
.btn,
a.btn,
.btn-primary,
.btn-secondary,
.action-btn,
.comment-submit-btn,
.upload-buttons button,
.reply-input-row button,
.reply-input-row input,
.modal-close,
#chat-close-btn,
#send-btn,
.send-btn,
.chat-toggle-btn,
.header-link,
.mobile-nav-item,
.friends-tab,
.friend-actions .btn-primary,
.friend-actions .btn-secondary,
.friend-request-card .btn-primary,
.friend-request-card .btn-secondary,
.friend-card-grid .friend-actions .btn-primary,
.friend-card-grid .friend-actions .btn-secondary {
    border: 1px solid #ffffff !important;
    box-shadow: none !important;
    background-clip: padding-box;
}

/* Keep focus styling usable — don't remove outline on focus */
button:focus,
input[type="button"]:focus,
input[type="submit"]:focus,
.btn:focus,
.action-btn:focus {
    outline: 2px solid rgb(255, 255, 255) !important;
}

/* ===== CARD OUTLINES: WHITE (site-wide) ===== */
/* Ensure card-like containers across the site use a white outline */
.post-card,
.profile-card,
.friend-card,
.friend-request-card,
.friend-card-grid,
.notif-item,
.settings-box,
.upload-box,
.friend-card-grid .friend-cover,
.friend-card-grid .friend-info-grid,
.friend-card-grid .friend-actions,
.friend-card-grid .friend-avatar,
.friend-card-grid .friend-name,
.friend-card-grid .friend-mutual,
.friend-card-grid .friend-actions .btn-primary,
.friend-card-grid .friend-actions .btn-secondary,
.profile-posts .post-card,
.watch-upload .post-card {
    border: 1px solid #ffffff !important;
}

/* Make avatars and large profile pics on cards white-outlined */
.profile-pic-large,
.friend-avatar,
.notif-avatar,
.post-avatar {
    border-color: #ffffff !important;
}

/* Settings header and separators should also show white outlines */
.settings-header,
.settings-section-title,
.settings-row,
.settings-actions {
    border-color: #ffffff !important;
}

/* Keep only outlines changed — don't alter backgrounds */

/* ===== MOBILE CHAT OVERRIDES ===== */
@media (max-width: 768px) {
    /* Conversation page input: use black border on mobile (not red) */
    .conversation-input input {
        border: 1px solid #000000 !important;
        box-shadow: none !important;
        background: #2a0000 !important;
    }
    .conversation-input input:focus {
        border-color: #000000 !important;
        box-shadow: none !important;
    }

    /* Mobile send button: remove global white outline, keep red filled button look */
    .conversation-input .send-btn,
    .conversation-input .send-btn * {
        border: none !important;
        box-shadow: none !important;
        outline: none !important;
    }
    .conversation-input .send-btn {
        background: #ff3333 !important;
        color: #ffffff !important;
        border: none !important;
    }

    /* Sidebar chat input overrides (small screens) */
    #chat-input {
        border: 1px solid #000000 !important;
        background: #2a0000 !important;
        box-shadow: none !important;
    }
    #chat-input:focus {
        border-color: #000000 !important;
        box-shadow: none !important;
    }

    #chat-input-row button,
    #chat-input-row button::before {
        border: none !important;
        box-shadow: none !important;
        outline: none !important;
        background: transparent !important;
    }

    /* Keep send icon red but without an outer outline */
    #chat-input-row button::before {
        color: #fd0202 !important;
    }

    /* Ensure no forced white outlines on chat containers on mobile */
    #chat-window,
    .chat-message,
    .chat-message.sent,
    .chat-message.received,
    .conversation-input .send-btn {
        border: none !important;
        box-shadow: none !important;
    }
}
