/* =========================
   TRAVOZEEN - GLOBAL BASE
========================= */

:root {
    --primary: #1877F2;
    --bg: #ffffff;
    --text: #1c1e21;
    --muted: #65676b;
    --border: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);

    --header-h: 60px;
    --sidebar-w: 250px;
    --rightbar-w: 300px;

    --z-header: 100;
    --z-sidebar: 200;
    --z-overlay: 1000;
    --z-toast: 1100;
    --z-modal: 1200;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

/* =========================
   HEADER
========================= */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    z-index: var(--z-header);
}

/* App Logo */
.app-name {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
}

.logo-text .white {
    color: #000;
}

.logo-text .blue {
    color: #00aaff;
    text-shadow: 0 0 10px #00aaff;
}

/* =========================
   SEARCH BAR
========================= */

.search-bar {
    display: flex;
    align-items: center;
    background: #f0f2f5;
    border-radius: 25px;
    padding: 6px 14px;
    width: 40%;
}

.search-bar input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    padding: 6px;
    font-size: 14px;
}

/* =========================
   HEADER ICONS
========================= */

.header-icons {
    display: flex;
    align-items: center;
    gap: 14px;
}

.icon {
    width: 42px;
    height: 42px;
    cursor: pointer;
    object-fit: contain;
}

.header-profile {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    object-fit: cover;
}

/* =========================
   MAIN WRAPPER LAYOUT
========================= */

.main-container {
    display: flex;
    margin-top: var(--header-h);
    height: calc(100vh - var(--header-h));
    overflow: hidden;
}

/* =========================
   LEFT SIDEBAR BASE
========================= */

.sidebar-left {
    width: var(--sidebar-w);
    background: #fff;
    border-right: 1px solid var(--border);
    padding: 15px;
    overflow-y: auto;
}

/* Sidebar Items */
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.sidebar-item:hover {
    background: #f0f2f5;
}

/* =========================
   CENTER FEED
========================= */

.feed {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
    overflow-y: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Scrollbar */
.feed::-webkit-scrollbar {
    width: 6px;
}

.feed::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* =========================
   RIGHT SIDEBAR
========================= */

.sidebar-right {
    width: var(--rightbar-w);
    background: #fff;
    border-left: 1px solid var(--border);
    padding: 15px;
    overflow-y: auto;
    display: none;
}

/* Desktop only */
@media (min-width: 1024px) {
    .sidebar-right {
        display: block;
    }
}
/* =========================
   MENU BUTTON (MOBILE)
========================= */

.menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #000;
}

/* =========================
   LEFT SIDEBAR ITEMS (ENHANCED)
========================= */

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.25s ease;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

.sidebar-item:hover {
    background: #f0f2f5;
    transform: translateX(2px);
}

/* Active state */
.sidebar-item.active {
    background: rgba(24, 119, 242, 0.1);
    color: var(--primary);
    font-weight: 600;
}

/* =========================
   MOBILE SIDEBAR (SLIDE)
========================= */

@media (max-width: 768px) {

    .menu-btn {
        display: block;
    }

    .sidebar-left {
        position: fixed;
        top: var(--header-h);
        left: -280px;
        width: 280px;
        height: calc(100vh - var(--header-h));
        background: #fff;
        border-right: 1px solid var(--border);
        transition: left 0.3s ease;
        z-index: var(--z-sidebar);
        box-shadow: 10px 0 20px rgba(0,0,0,0.08);
    }

    .sidebar-left.active {
        left: 0;
    }

    .main-container {
        flex-direction: column;
    }

    .feed {
        max-width: 100%;
        padding: 10px;
    }
}

/* =========================
   OVERLAY (FOR MOBILE MENU)
========================= */

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: none;
    z-index: var(--z-overlay);
}

.overlay.show {
    display: block;
}

/* =========================
   FEED WRAPPER SAFETY FIX
========================= */

.main-container {
    overflow: hidden;
}

/* Prevent sidebar scroll leak */
.sidebar-left,
.sidebar-right {
    scrollbar-width: thin;
}

/* =========================
   PROFILE HEADER INSIDE SIDEBAR
========================= */

.profile-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.user-photo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

#userName {
    font-size: 15px;
    font-weight: 600;
}

/* =========================
   SEARCH BAR RESPONSIVE FIX
========================= */

@media (max-width: 768px) {
    .search-bar {
        width: 55%;
    }

    .logo-text {
        display: none;
    }
}

/* =========================
   HEADER ICON TOUCH IMPROVEMENT
========================= */

.icon {
    transition: 0.2s ease;
}

.icon:active {
    transform: scale(0.9);
}

/* =========================
   SMALL UI POLISH
========================= */

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(24,119,242,0.2);
}
/* =========================
   STORIES SECTION
========================= */

.stories {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 12px 0;
    margin-bottom: 15px;
    scroll-behavior: smooth;
}

/* hide scrollbar */
.stories::-webkit-scrollbar {
    display: none;
}

/* story card */
.story-card {
    position: relative;
    width: 110px;
    height: 190px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    background: #222;
    transition: 0.25s ease;
}

.story-card:hover {
    transform: scale(1.03);
}

/* story image */
.story-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s ease;
}

.story-card:hover .story-image {
    transform: scale(1.1);
}

/* dark gradient overlay */
.story-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.75),
        rgba(0,0,0,0.2),
        rgba(0,0,0,0.1)
    );
}

/* avatar */
.story-avatar {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    object-fit: cover;
}

/* username */
.story-username {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

/* =========================
   CREATE POST BOX
========================= */

.create-post-box {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
}

/* top input row */
.create-post-top {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

/* input */
.create-post-input {
    flex: 1;
    border: none;
    outline: none;
    background: #f0f2f5;
    padding: 10px 14px;
    border-radius: 20px;
    font-size: 14px;
}

/* icons row */
.create-post-icons {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
}

.create-post-icons div {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    transition: 0.2s;
}

.create-post-icons div:hover {
    background: #f0f2f5;
}

/* =========================
   POST CARD
========================= */

.post-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    overflow: hidden;
}

/* post header */
.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
}

/* avatar */
.post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ccc;
    object-fit: cover;
}

/* name */
.post-user {
    font-weight: 600;
    font-size: 14px;
}

.post-time {
    font-size: 12px;
    color: var(--muted);
}

/* content */
.post-content {
    padding: 0 12px 12px;
    font-size: 14px;
    color: var(--text);
}

/* media */
.post-media {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    background: #e4e6eb;
}

/* =========================
   POST ACTIONS (LIKE/COMMENT/SHARE)
========================= */

.post-actions {
    display: flex;
    justify-content: space-around;
    padding: 10px;
    border-top: 1px solid #eee;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
}

.post-actions div {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: 0.2s;
}

.post-actions div:hover {
    background: #f0f2f5;
    color: var(--primary);
}

/* =========================
   POST FEELING / META TEXT
========================= */

.post-feeling {
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
    margin-top: 4px;
}

.post-activity {
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}

.post-location {
    font-size: 12px;
    color: #777;
    margin-top: 2px;
}
/* =========================
   TOAST NOTIFICATION
========================= */

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #00c853;
    color: #000;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transform: translateX(400px);
    transition: 0.35s ease;
    z-index: var(--z-toast);
}

.toast.show {
    transform: translateX(0);
}

/* =========================
   CHAT POPUP WINDOW
========================= */

.message-popup {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 380px;
    height: 600px;
    background: #fff;
    border-radius: 16px;
    display: none;
    flex-direction: column;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    z-index: var(--z-modal);
    overflow: hidden;
}

/* open state */
.message-popup.active {
    display: flex;
}

/* chat header */
.chat-header {
    background: var(--primary);
    color: #fff;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* chat messages area */
.chat-body {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background: #f0f2f5;
}

/* message bubble */
.msg {
    max-width: 75%;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
}

/* received */
.msg.in {
    background: #fff;
    align-self: flex-start;
    border: 1px solid #ddd;
}

/* sent */
.msg.out {
    background: var(--primary);
    color: #fff;
    align-self: flex-end;
}

/* chat input */
.chat-input {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #eee;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border-radius: 20px;
    border: none;
    outline: none;
    background: #f0f2f5;
}

.chat-input button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
}

/* =========================
   GLASS LOGIN / REGISTER FORM
========================= */

.glass-card {
    width: 100%;
    max-width: 420px;
    padding: 30px;
    border-radius: 18px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

/* form group */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    font-weight: 600;
}

/* input */
.form-group input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    outline: none;
    font-size: 14px;
}

/* button */
.btn-primary {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-primary:hover {
    background: #155fcb;
}

/* =========================
   OTP OVERLAY
========================= */

.otp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    z-index: var(--z-modal);
}

.otp-overlay.show {
    display: flex;
}

/* OTP box */
.otp-box {
    width: 90%;
    max-width: 380px;
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    animation: pop 0.25s ease;
}

@keyframes pop {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* OTP input */
.otp-input {
    width: 100%;
    padding: 12px;
    font-size: 18px;
    text-align: center;
    letter-spacing: 4px;
    border: 2px solid #ddd;
    border-radius: 10px;
    outline: none;
}

.otp-input:focus {
    border-color: var(--primary);
}

/* OTP buttons */
.otp-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
}

.otp-resend {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 10px;
    cursor: pointer;
}

/* =========================
   PROFILE UPLOAD UI
========================= */

.profile-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.preview-image {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

/* upload button */
#choosePhoto {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
}

/* =========================
   LOADING SCREEN
========================= */

#loadingScreen {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
}

/* loader circle */
.loaderBox::before {
    content: "";
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top: 4px solid var(--primary);
    border-right: 4px solid var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* =========================
   BOTTOM NAV (MOBILE APP STYLE)
========================= */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: #fff;
    border-top: 1px solid #ddd;
    display: none;
    justify-content: space-around;
    align-items: center;
    z-index: var(--z-header);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    font-size: 12px;
    color: var(--muted);
}

.bottom-nav span {
    font-size: 22px;
}

.bottom-nav .active {
    color: var(--primary);
}

.center-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -25px;
    font-size: 26px;
    box-shadow: 0 10px 25px rgba(24,119,242,0.35);
}

/* =========================
   RESPONSIVE FINAL FIXES
========================= */

@media (max-width: 768px) {

    .sidebar-right {
        display: none !important;
    }

    .bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 80px;
    }

    .search-bar {
        width: 55%;
    }

    .logo-text {
        display: none;
    }

    .main-container {
        flex-direction: column;
    }

    .feed {
        padding: 10px;
        max-width: 100%;
    }

    .story-card {
        width: 100px;
        height: 170px;
    }
}

/* =========================
   DARK MODE SUPPORT
========================= */

body.dark {
    --bg: #18191a;
    --text: #e4e6eb;
    --border: #3a3b3c;
}

/* global dark styles */
body.dark {
    background: var(--bg);
    color: var(--text);
}

body.dark .header,
body.dark .sidebar-left,
body.dark .sidebar-right,
body.dark .post-card,
body.dark .create-post-box,
body.dark .bottom-nav {
    background: #242526;
    border-color: var(--border);
}

/* inputs dark */
body.dark input,
body.dark .create-post-input,
body.dark .chat-input input {
    background: #3a3b3c;
    color: #e4e6eb;
}

/* hover fix */
body.dark .sidebar-item:hover,
body.dark .post-actions div:hover {
    background: #3a3b3c;
}

/* =========================
   GLOBAL ANIMATION POLISH
========================= */

* {
    transition: background 0.2s ease, color 0.2s ease;
}

/* smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* =========================
   IMAGE SAFETY FIX
========================= */

img {
    max-width: 100%;
    display: block;
}

/* =========================
   SMALL UX IMPROVEMENTS
========================= */

button {
    cursor: pointer;
    transition: 0.2s ease;
}

button:active {
    transform: scale(0.96);
}

/* selection color */
::selection {
    background: rgba(24,119,242,0.2);
}

/* hide scrollbars globally (optional clean UI) */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* =========================
   FINAL CLEAN RESET TUNE
========================= */

a {
    color: inherit;
}

ul {
    list-style: none;
}

input {
    font-family: inherit;
}

/* =========================
   ADS CARD (FEED STYLE)
========================= */

.ad-card {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    margin: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #eee;
}

.ad-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
    font-weight: 600;
}

.ad-content {
    text-align: center;
    font-size: 14px;
    color: #555;
}
@media (max-width: 768px) {

    .ad-card {
        margin: 10px 0;
        font-size: 13px;
    }

}