@import url('https://fonts.googleapis.com/css2?family=Asimovian&family=Playwrite+ES:wght@100..400&display=swap');

.cherry-bomb-one-regular {
font-family: "Asimovian", sans-serif;
  font-weight: 400;
  font-style: normal;
}

:root {
 --bg: #191818;
 --ink: #000000;
 --panel: #ffffff;
 --pill-radius: 20px;
 --sidebar-width: 280px;
 --sidebar-mobile-width: 80vw;
 --dark-bg: #2a2a2ae6;
 --dark-border: rgba(255, 255, 255, 0.1);
 --blue: #0068df;
 --blue-hover: #0070FF;
 --white-text: #ffffff;
 --light-text: #bdbdbd;
 --dark-text: #666;
 --card-bg: #1e1c1c;
 --card-border: #3a3a3a;
 --card-hover: #323232;
 --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
 --smooth-transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
 --icon-size-sm: 18px;
 --icon-size-md: 20px;
 --icon-size-lg: 24px;
 --icon-size-xl: 26px;
 --btn-size-sm: 32px;
 --btn-size-md: 36px;
 --btn-size-lg: 44px;
 --shadow-light: 0 2px 8px rgba(0,0,0,.3);
 --shadow-heavy: 0 4px 16px rgba(0,0,0,.3);
 --shadow-toolbar: 0 10px 26px rgba(0,0,0,.3);
}

[data-theme="light"] {
 --bg: #ffffff;
 --ink: #ffffff;
 --dark-bg: rgba(255, 255, 255, 0.95);
 --dark-border: rgba(26, 26, 26, 0.08);
 --white-text: #1c1919;
 --light-text: #4a4a4a;
 --dark-text: #888;
 --card-bg: #ffffff;
 --card-border: #e8e8e8;
 --card-hover: #ffffff;
 --shadow-light: 0 2px 8px rgba(0,0,0,.08);
 --shadow-heavy: 0 4px 16px rgba(0,0,0,.12);
 --shadow-toolbar: 0 10px 26px rgba(0,0,0,.12);
}

* { 
 box-sizing: border-box; 
 scrollbar-width: thin;
 scrollbar-color: var(--blue) transparent;
 -webkit-tap-highlight-color: transparent;
}

*::-webkit-scrollbar {
 width: 6px;
 height: 6px;
}

*::-webkit-scrollbar-track {
 background: transparent;
}

*::-webkit-scrollbar-thumb {
 background: var(--blue);
 border-radius: 3px;
}

*::-webkit-scrollbar-thumb:hover {
 background: var(--blue-hover);
}

html, body { 
 height: 100%; 
 margin: 0; 
 font-family: 'Merriweather', serif;
 background: var(--bg);
 color: var(--ink);
}

.material-symbols-rounded, 
.material-symbols-outlined {
 font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 40;
 font-size: var(--icon-size-md);
 pointer-events: none;
}

.btn-base {
 display: flex;
 align-items: center;
 justify-content: center;
 border: none;
 cursor: pointer;
 transition: var(--transition);
 background: transparent;
}

.btn-round { border-radius: 50%; }
.btn-rect { border-radius: 10px; }
.btn-icon {
 width: var(--btn-size-md);
 height: var(--btn-size-md);
}
.btn-hover:hover { background: rgba(66, 133, 244, 0.1); }
.btn-dark {
 background: var(--dark-bg);
 backdrop-filter: blur(10px);
 border: 1px solid var(--dark-border);
}

.top-right-container {
 position: fixed;
 top: 1%;
 right: 1%;
 display: none;
 gap: 4px;
 z-index: 300;
 background: var(--dark-bg);
 backdrop-filter: blur(10px);
 border: 1px solid var(--dark-border);
 border-radius: 12px;
 padding: 4px;
 box-shadow: var(--shadow-heavy);
 height: var(--btn-size-lg);
 align-items: center;
}

.top-right-container.visible { display: flex; }

.notification-btn,
.add-btn {
 @extend .btn-base, .btn-icon, .btn-rect, .btn-hover;
}

.notification-btn .material-symbols-rounded,
.add-btn .material-symbols-rounded {
 font-size: var(--icon-size-md);
 color: var(--blue);
}

.top-left-icon {
 position: fixed;
 top: 1%;
 left: 1%;
 width: var(--btn-size-lg);
 height: var(--btn-size-lg);
 border-radius: 14px;
 background: var(--dark-bg);
 backdrop-filter: blur(10px);
 border: 1px solid var(--dark-border);
 box-shadow: var(--shadow-heavy);
 display: none;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 transition: var(--transition);
 z-index: 300;
 padding: 4px;
}

.top-left-icon.visible { display: flex; }
.top-left-icon:hover { background: rgba(42, 42, 42, 0.95); }

.top-left-icon .material-symbols-outlined {
 font-size: var(--icon-size-lg);
 color: var(--blue);
}

.mood-bar {
  position: fixed;
  top: -200px;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  padding: 4px;
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-height: 60px;
  max-height: 136px;
}

.mood-bar.visible {
  transform: translateY(200px);
}

.mood-input-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mood-input-container textarea {
  width: 100%;
  min-height: 15px;
  max-height: 80px;
  padding: 10px 16px;
  border: transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--white-text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.3;
  resize: none;
  outline: none;
  transition: all 0.2s ease;
  overflow-y: auto;
  box-sizing: border-box;
}

.mood-input-container textarea::placeholder {
  color: var(--dark-text);
}

.mood-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.mood-char-counter {
  font-size: 12px;
  color: var(--dark-text);
  font-weight: 500;
}

.mood-char-counter.warning {
  color: #ff9800;
}

.mood-char-counter.danger {
  color: #f44336;
}

.mood-submit-btn .material-symbols-outlined{
  color: #f44336;
}

.mood-submit-btn {
  background: transparent;
  border: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #f44336;
  flex-shrink: 0;
}

.mood-submit-btn:active {
  transform: scale(0.95);
}

.mood-submit-btn .material-symbols-outlined {
  font-size: 20px;
}

.sidebar-toggle {
  position: fixed;
  top: 1%;
  width: var(--btn-size-lg);
  height: var(--btn-size-lg);
  border-radius: 14px;
  background: var(--dark-bg);
  border: 1px solid var(--dark-border);
  box-shadow: var(--shadow-heavy);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: left 0.3s ease;
  z-index: 300;
  left: calc(var(--sidebar-width) + 1px);
}

.sidebar-toggle.visible { display: flex; }
.sidebar:not(.open) ~ .sidebar-toggle { left: 1px; }

.sidebar-toggle:hover {
 background: rgba(42, 42, 42, 0.95);
 transform: translateY(-1px);
 box-shadow: 0 8px 18px rgba(0,0,0,.4);
}

.sidebar-toggle .material-symbols-rounded {
 font-size: 16px;
 color: var(--white-text);
 transition: var(--transition);
 font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 40;
}

.sidebar-toggle.active .material-symbols-rounded {
 font-size: 28px;
 color: var(--blue) !important;
 font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 0, 'opsz' 40;
}

.sidebar {
  position: fixed;
  top: 0;
  left: calc(-1 * var(--sidebar-width));
  width: var(--sidebar-width);
  height: 100vh;
  background: rgba(31, 31, 31, 0.98);
  border-right: 1px solid var(--dark-border);
  z-index: 250;
  transition: left 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}


.sidebar.open { left: 0; }

.sidebar-header {
  height: 60px;
  background: var(--card-hover);
  border-bottom: 1px solid var(--dark-border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}

.sidebar-title {
 font-size: 18px;
 font-weight: 600;
 color: var(--white-text);
 margin: 0;
}

.sidebar-content {
  padding: 0;
  color: var(--white-text);
  flex: 1;
  overflow-y: auto; /* Move overflow to content area */
  padding-top: 8px;
}

.sidebar-overlay {
 position: fixed;
 top: 0;
 left: 0;
 width: 100vw;
 height: 100vh;
 background: rgba(0, 0, 0, 0.5);
 z-index: 200;
 opacity: 0;
 visibility: hidden;
 transition: var(--transition);
}

.sidebar-overlay.visible {
 opacity: 1;
 visibility: visible;
}

.toolbar {
 position: fixed;
 bottom: calc(env(keyboard-inset-height, 0px) + 2%);
 left: 50%;
 transform: translateX(-50%);
 display: flex;
 flex-direction: column;
 gap: 0;
 align-items: center;
 background: var(--dark-bg);
 backdrop-filter: blur(10px);
 border: 1px solid var(--dark-border);
 border-radius: var(--pill-radius);
 padding: 2px 4px;
 box-shadow: var(--shadow-toolbar);
 z-index: 100;
 overflow: visible;
 max-width: calc(100vw - 32px);
 width: auto;
 justify-content: center;
 transition: var(--transition), opacity 0.3s ease, transform 0.3s ease, width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.toolbar.hidden {
 opacity: 0;
 transform: translateX(-50%) translateY(20px);
 pointer-events: none;
}

.toolbar-icons {
 display: flex;
 gap: 8px;
 align-items: center;
 justify-content: center;
 width: auto;
 flex-shrink: 0;
}

.file-preview-container {
 width: 100%;
 max-width: 100%;
 opacity: 0;
 visibility: hidden;
 transition: var(--transition);
 max-height: 0;
 overflow: hidden;
 order: -1;
 margin-bottom: 0;
 background: rgba(31, 31, 31, 0.5);
 border-radius: 12px;
 padding: 0;
}

.file-preview-container.visible {
 opacity: 1;
 visibility: visible;
 max-height: 120px;
 margin-bottom: 8px;
 padding: 4px;
}

.file-preview-container:not(.visible) {
 display: none !important;
 width: 0 !important;
 height: 0 !important;
 margin: 0 !important;
 padding: 0 !important;
}

.file-preview-scroll {
 display: flex;
 gap: 8px;
 overflow-x: auto !important;
 overflow-y: hidden !important;
 padding: 4px;
 scrollbar-width: none;
 -ms-overflow-style: none;
 flex-wrap: nowrap !important;
 max-width: 100% !important;
 width: 100% !important;
}

.file-preview-scroll::-webkit-scrollbar { display: none; }

.file-preview-item,
.clear-all-btn {
 position: relative;
 min-width: 60px;
 width: 60px;
 height: 80px;
 background: var(--dark-bg);
 border-radius: 8px;
 box-shadow: var(--shadow-light);
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 padding: 6px;
 border: 1px solid var(--dark-border);
 flex-shrink: 0 !important;
 cursor: pointer;
 transition: var(--transition);
}

.clear-all-btn { margin-left: 4px; }

.clear-all-btn:hover,
.file-preview-item:hover { transform: scale(1.1); }

.file-preview-item img {
 width: 48px;
 height: 48px;
 object-fit: cover;
 border-radius: 4px;
 margin-bottom: 2px;
}

.file-preview-item .file-icon,
.clear-all-btn .material-symbols-outlined {
 font-size: var(--icon-size-lg);
 margin-bottom: 2px;
 color: var(--blue);
}

.clear-all-btn:hover .material-symbols-outlined { color: var(--blue-hover); }

.file-preview-item .file-name {
 font-size: 8px;
 color: var(--white-text);
 text-align: center;
 width: 100%;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

.file-remove {
 position: absolute;
 top: 2px;
 right: 2px;
 width: 20px;
 height: 20px;
 background: transparent;
 color: var(--blue);
 border-radius: 50%;
 display: flex;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 font-size: 16px;
 font-weight: bold;
 transition: var(--transition);
 border: none;
}

.file-remove:hover {
 color: var(--blue-hover);
 transform: scale(1.2);
}

.file-upload-input { display: none; }

.icon-btn {
 display: grid;
 place-items: center;
 width: var(--btn-size-md);
 height: var(--btn-size-sm);
 border-radius: 12px;
 background: transparent;
 border: none;
 cursor: pointer;
 transition: transform .12s ease, box-shadow .12s ease, opacity 0.3s ease, background 0.2s ease;
 flex-shrink: 0;
}

.icon-btn:hover {
 background: rgba(255, 255, 255, 0.2);
 transform: translateY(-1px);
}

.icon-btn .material-symbols-rounded,
.icon-btn .material-symbols-outlined { color: var(--white-text); }

.icon-btn.active .material-symbols-rounded,
.icon-btn.active .material-symbols-outlined { color: var(--blue) !important; }

.search-box,
.chat-box {
 position: relative;
 display: flex;
 align-items: center;
 background: transparent;
 border-radius: 12px;
 height: var(--btn-size-md);
 border: none;
 overflow: hidden;
 width: var(--btn-size-md);
 cursor: pointer;
 transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
 flex-shrink: 0;
}

.search-box:hover,
.chat-box:hover { background: rgba(255, 255, 255, 0.15); }
.search-box.active,
.chat-box.active { cursor: text; }

.search-icon,
.chat-icon {
 position: absolute;
 left: 50%;
 top: 50%;
 transform: translate(-50%, -50%);
 display: grid;
 place-items: center;
 z-index: 2;
 transition: left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.search-box.active .search-icon {
 left: auto;
 right: 10px;
 transform: translateY(-50%);
}

.chat-box.active .chat-icon { display: none; }

.attach-icon,
.send-icon {
 position: absolute;
 left: 50%;
 top: 50%;
 transform: translate(-50%, -50%);
 display: grid;
 place-items: center;
 z-index: 2;
 transition: left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
 cursor: pointer;
}

.attach-icon { display: none; }

.chat-box.active .attach-icon {
 display: grid;
 left: 10px;
 transform: translateY(-50%);
}

.send-icon { display: none; }

.chat-box.active .send-icon {
 display: grid;
 left: auto;
 right: 10px;
 transform: translateY(-50%);
}

.search-box input,
.chat-box input {
 width: 100%;
 height: 100%;
 border: none;
 outline: none;
 background: transparent;
 font-family: 'Merriweather', serif;
 font-size: 15px;
 color: var(--white-text);
 padding-left: 10px;
 padding-right: 40px;
 opacity: 0;
 pointer-events: none;
 transition: opacity 0.25s ease 0.15s;
}

.search-box.active input,
.chat-box.active input {
 opacity: 1;
 pointer-events: auto;
}

.search-box input::placeholder,
.chat-box input::placeholder { color: rgba(255, 255, 255, 0.6); }

.search-icon .material-symbols-rounded,
.chat-icon .material-symbols-outlined,
.attach-icon .material-symbols-rounded,
.send-icon .material-symbols-outlined {
 font-size: var(--icon-size-md);
 color: var(--white-text);
}

.search-box.active .search-icon .material-symbols-rounded,
.chat-box.active .attach-icon .material-symbols-rounded,
.chat-box.active .send-icon .material-symbols-outlined { color: var(--blue) !important; }

.spacer { height: 90px; }

.page-container {
 max-width: 1100px;
 margin: 0 auto;
 padding: 24px clamp(16px,4vw,32px) 96px;
 min-height: calc(100vh - 180px);
 transition: var(--transition);
}

.page { display: none; }
.page.active { display: block; }

.page-title {
 font-size: clamp(32px, 6vw, 48px);
 font-weight: 700;
 color: var(--white-text);
 margin: 0 0 24px 0;
 letter-spacing: -0.02em;
}

.page-content {
 color: var(--light-text);
 font-size: 16px;
 line-height: 1.6;
}

.home-grid {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
 gap: 20px;
 margin-top: 32px;
}

.home-card {
 background: var(--card-bg);
 border-radius: 16px;
 padding: 24px;
 border: 1px solid var(--card-border);
 transition: var(--transition);
}

.home-card:hover {
 background: var(--card-hover);
 border-color: #4a4a4a;
 transform: translateY(-2px);
}

.card-title {
 font-size: 18px;
 font-weight: 600;
 color: var(--white-text);
 margin: 0 0 12px 0;
}

.card-description {
 color: var(--light-text);
 font-size: 14px;
 line-height: 1.5;
}

.search-results {
 background: transparent;
 border-radius: 12px;
 padding: 0;
 margin: 0;
 border: none;
 min-height: 0;
}

#chatPage .page-content {
 padding: 0;
 min-height: 0;
}

.search-placeholder {
 text-align: center;
 color: var(--dark-text);
 font-style: italic;
 padding: 40px 20px;
}

.search-empty-state {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 height: 100vh;
 position: fixed;
 top: 0;
 left: 0;
 right: 0;
 bottom: 0;
 z-index: 1;
 transform: translateY(-60px);
}

.search-empty-gif {
 width: 160px;
 height: 160px;
 opacity: 1;
 object-fit: contain;
 margin-bottom: 0.5px;
 filter: drop-shadow(0 0 5px rgb(0, 0, 0));
 transition: filter 0.3s ease;
}

.search-empty-text { text-align: center; }

.search-greeting {
 font-family: 'Merriweather', serif;
 font-size: 24px;
 font-weight: 400;
 color: var(--light-text);
 margin: 0 0 2px 0;
 letter-spacing: 0.3px;
}

.search-brand {
 font-family: 'Merriweather', serif;
 font-size: 24px;
 font-weight: 600;
 color: var(--light-text);
 margin: 0;
 letter-spacing: 0.5px;
}

.brand-highlight { color: var(--blue); }
.search-empty-state.hidden { display: none; }

.query-card {
 background: var(--card-hover);
 border-radius: 8px;
 padding: 16px;
 margin-bottom: 12px;
 border: 1px solid #4a4a4a;
 color: var(--white-text);
 font-size: 14px;
 line-height: 1.4;
}

.query-card:last-child { margin-bottom: 0; }

.page-tabs {
 display: flex;
 gap: 0;
 margin-bottom: 24px;
 background: var(--dark-bg);
 backdrop-filter: blur(10px);
 border-radius: 10px;
 padding: 3px;
 border: 1px solid var(--dark-border);
 overflow: hidden;
}

.fixed-tabs {
 position: fixed;
 top: 1%;
 left: 50%;
 transform: translateX(-50%);
 z-index: 200;
 width: auto;
 min-width: 160px;
 max-width: calc(100vw - 32px);
}

.page-tab {
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 8px 16px;
 cursor: pointer;
 transition: var(--transition);
 background: transparent;
 border: none;
 border-radius: 6px;
 position: relative;
 flex: 1;
 min-height: var(--btn-size-md);
}

.page-tab .material-symbols-outlined {
 font-size: var(--icon-size-md);
 color: var(--light-text);
 transition: var(--transition);
 font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 40;
}

.page-tab.active {
 background: var(--card-hover);
}

.page-tab.active .material-symbols-outlined {
 color: var(--blue);
 font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 0, 'opsz' 40;
}

.page-tab:hover:not(.active) .material-symbols-outlined { color: var(--white-text); }

.tab-content { display: none; }
.tab-content.active { display: block; }

.whatsapp-container {
 position: fixed;
 top: 0;
 left: 0;
 width: 100vw;
 height: 100vh;
 background: var(--bg);
 z-index: 50;
 display: flex;
}

.contacts-panel {
 width: 350px;
 height: 100vh;
 background: var(--card-bg);
 border-right: 1px solid var(--card-border);
 display: flex;
 flex-direction: column;
}

.contacts-header {
  font-family: 'Merriweather', serif;
 height: 60px;
 background: var(--card-hover);
 display: flex;
 align-items: center;
 padding: 0 16px;
 border-bottom: 1px solid var(--card-border);
 position: relative;
 overflow-x: hidden;
}

.contacts-back-btn {
 width: var(--btn-size-sm);
 height: var(--btn-size-sm);
 border-radius: 50%;
 background: transparent;
 border: none;
 display: flex;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 margin-right: 8px;
 transition: background 0.2s ease;
 flex-shrink: 0;
}

.contacts-back-btn:hover { background: #4a4a4a; }

.contacts-back-btn .material-symbols-outlined {
 font-size: var(--icon-size-sm);
 color: var(--blue);
}

.contacts-search-input {
  font-family: 'Merriweather', serif;
  flex: 1;
  border: none; /* Remove duplicate border */
  background: transparent;
  padding: 8px 36px 8px 16px; /* Fixed consistent padding */
  font-size: 14px;
  color: var(--white-text);
  outline: none;
  border-radius: 20px;
}

.contacts-search-input::placeholder {
  color: var(--dark-text);
}
.contacts-search-input:focus { border-color: transparent; }

.contacts-search-cancel {
 position: absolute;
 right: 24px;
 top: 50%;
 transform: translateY(-50%);
 background: none;
 border: none;
 cursor: pointer;
 display: none;
 align-items: center;
 justify-content: center;
 width: 20px;
 height: 20px;
 border-radius: 50%;
 transition: var(--transition);
 z-index: 10;
}

.contacts-search-cancel .material-symbols-rounded {
 font-size: 16px;
 color: var(--blue);
}

.contacts-search-cancel:hover { background: rgba(66, 133, 244, 0.1); }

.contacts-search-input.has-text ~ .contacts-search-cancel { display: flex; }

.contacts-list {
 flex: 1;
 overflow-y: auto;
 padding: 0;
}

.contact-item {
 display: flex;
 align-items: center;
 padding: 12px 20px;
 cursor: pointer;
 transition: background 0.2s ease;
 border-bottom: 1px solid rgba(255,255,255,0.05);
}

.contact-item:hover { background: var(--card-hover); }
.contact-item.active { background: #1f3a5f; }

.contact-avatar {
 width: 48px;
 height: 48px;
 border-radius: 50%;
 background: var(--blue);
 display: flex;
 align-items: center;
 justify-content: center;
 margin-right: 12px;
 font-weight: 600;
 color: var(--white-text);
 font-size: 18px;
}

.contact-info {
 flex: 1;
 min-width: 0;
}

.contact-name {
 font-size: 15px;
 font-weight: 500;
 color: var(--white-text);
 margin: 0 0 4px 0;
}

.contact-last-message {
 font-size: 13px;
 color: var(--light-text);
 margin: 0;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

.contact-time {
 font-size: 12px;
 color: var(--dark-text);
 margin-left: 8px;
}

.chat-panel {
 flex: 1;
 height: 100vh;
 background: var(--bg);
 display: flex;
 flex-direction: column;
 position: relative;
}

.chat-header {
 height: 60px;
 background: var(--card-hover);
 display: flex;
 align-items: center;
 padding: 0 16px;
 border-bottom: 1px solid var(--card-border);
}

.back-btn {
 width: var(--btn-size-sm);
 height: var(--btn-size-sm);
 border-radius: 50%;
 background: transparent;
 border: none;
 display: none;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 margin-right: 8px;
 transition: background 0.2s ease;
}

.back-btn:hover { background: #4a4a4a; }

.back-btn .material-symbols-outlined {
 font-size: var(--icon-size-sm);
 color: var(--blue);
}

.chat-contact-avatar {
 width: var(--btn-size-sm);
 height: var(--btn-size-sm);
 border-radius: 50%;
 background: var(--blue);
 display: flex;
 align-items: center;
 justify-content: center;
 margin-right: 8px;
 font-weight: 600;
 color: var(--white-text);
 font-size: 14px;
}

.chat-contact-info { flex: 1; }

.chat-contact-name {
 font-size: 14px;
 font-weight: 500;
 color: var(--white-text);
 margin: 0 0 2px 0;
}

.chat-contact-status {
 font-size: 11px;
 color: var(--light-text);
 margin: 0;
}

.chat-messages {
 flex: 1;
 overflow-y: auto;
 padding: 16px;
 padding-bottom: 80px;
 background: var(--bg);
}

.message {
 display: flex;
 margin-bottom: 16px;
}

.message.sent { justify-content: flex-end; }
.message.received { justify-content: flex-start; }

.message-bubble {
 max-width: 70%;
 padding: 12px 16px;
 border-radius: 18px;
 font-size: 14px;
 line-height: 1.4;
 position: relative;
 word-wrap: break-word;
 word-break: break-word;
 overflow-wrap: break-word;
}

.message.sent .message-bubble {
 background: var(--blue);
 color: var(--white-text);
 border-bottom-right-radius: 4px;
}

.message.received .message-bubble {
 background: var(--card-bg);
 color: var(--white-text);
 border-bottom-left-radius: 4px;
 border: 1px solid var(--card-border);
}

.message-time {
 font-size: 11px;
 opacity: 0.7;
 margin-top: 4px;
 text-align: right;
}

.chat-input-wrapper {
 position: absolute;
 bottom: calc(env(keyboard-inset-height, 0px) + 2%);
 left: 16px;
 right: 16px;
 display: flex;
 align-items: center;
 background: var(--card-bg);
 border-radius: 24px;
 padding: 4px 8px;
 border: 1px solid #4a4a4a;
 z-index: 10;
}

.chat-attach-btn {
 width: var(--btn-size-md);
 height: var(--btn-size-md);
 border-radius: 50%;
 background: transparent;
 border: none;
 display: flex;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 margin-right: 8px;
 transition: background 0.2s ease;
}

.chat-attach-btn:hover { background: #3a3a3a; }

.chat-attach-btn .material-symbols-rounded {
 font-size: var(--icon-size-md);
 color: var(--light-text);
}

.chat-input {
 flex: 1;
 min-width: 50px;
 border: none;
 outline: none;
 background: transparent;
 font-family: 'Merriweather', serif;
 font-size: 15px;
 color: var(--white-text);
 padding: 8px 0;
}

.chat-input::placeholder { color: var(--dark-text); }

.chat-send-btn {
 width: var(--btn-size-md);
 height: var(--btn-size-md);
 border-radius: 50%;
 background: transparent;
 border: none;
 display: flex;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 margin-left: 8px;
}

.chat-send-btn .material-symbols-rounded {
 font-size: var(--icon-size-md);
 color: var(--blue);
}

.chat-header-actions {
 display: flex;
 gap: 8px;
 margin-left: auto;
}

.chat-action-btn {
 width: var(--btn-size-sm);
 height: var(--btn-size-sm);
 border-radius: 50%;
 background: transparent;
 border: none;
 display: flex;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 transition: background 0.2s ease;
}

.chat-action-btn:hover { background: #4a4a4a; }

.chat-action-btn .material-symbols-outlined {
 font-size: var(--icon-size-md);
 color: var(--blue);
}

.page-back-btn,
.profile-settings-btn {
 position: fixed;
 top: 1%;
 width: var(--btn-size-lg);
 height: var(--btn-size-lg);
 border-radius: 14px;
 background: transparent;
 border: none;
 display: none;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 transition: var(--transition);
 z-index: 300;
}

.page-back-btn { left: 1%; }
.profile-settings-btn { right: 1%; }

.page-back-btn.visible,
.profile-settings-btn.visible { display: flex; }

.page-back-btn:hover,
.profile-settings-btn:hover { background: rgba(66, 133, 244, 0.1); }

.page-back-btn .material-symbols-outlined,
.profile-settings-btn .material-symbols-outlined {
 font-size: var(--icon-size-lg);
 color: var(--blue);
}

.settings-header {
 position: fixed;
 top: 0;
 left: 0;
 right: 0;
 height: 60px;
 background: var(--card-hover);
 display: flex;
 align-items: center;
 padding: 0 16px;
 border-bottom: 1px solid var(--card-border);
 z-index: 200;
}

.settings-back-btn {
 width: var(--btn-size-md);
 height: var(--btn-size-md);
 border-radius: 50%;
 background: transparent;
 border: none;
 display: flex;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 margin-right: 16px;
 transition: background 0.2s ease;
}

.settings-back-btn:hover { background: #4a4a4a; }

.settings-back-btn .material-symbols-outlined {
 font-size: var(--icon-size-md);
 color: var(--blue);
}

.settings-title {
 font-size: 20px;
 font-weight: 600;
 color: var(--white-text);
 margin: 0;
}

.settings-content {
 padding-top: 80px;
 padding-left: 24px;
 padding-right: 24px;
 padding-bottom: 24px;
}

.settings-option {
 display: flex;
 align-items: center;
 justify-content: space-between;
 padding: 20px 0;
 border-bottom: 1px solid var(--card-border);
 cursor: pointer;
 transition: background 0.2s ease;
}

.settings-option:hover { background: rgba(255,255,255,0.02); }

.setting-info {
 display: flex;
 align-items: center;
 flex: 1;
}

.setting-title {
 font-size: 16px;
 font-weight: 500;
 color: var(--white-text);
 margin: 0;
}

.setting-arrow {
 font-size: var(--icon-size-md);
 color: var(--dark-text);
}

.theme-toggle {
 position: relative;
 width: 50px;
 height: 26px;
 background: #4a4a4a;
 border-radius: 13px;
 cursor: pointer;
 transition: var(--transition);
 border: none;
 outline: none;
}

.theme-toggle::before {
 content: '';
 position: absolute;
 top: 2px;
 left: 2px;
 width: 22px;
 height: 22px;
 background: var(--white-text);
 border-radius: 50%;
 transition: var(--transition);
 box-shadow: 0 2px 4px rgba(0,0,0,.2);
}

.theme-toggle.active { background: var(--blue); }
.theme-toggle.active::before { transform: translateX(24px); }

.setting-icon {
 font-size: 22px;
 margin-right: 16px;
 flex-shrink: 0;
}

.theme-icon { color: #9c27b0; }
.saved-icon { color: #ff9800; }
.liked-icon { color: #e91e63; }
.profile-icon { color: #2196f3; }
.logout-icon { color: #f44336; }

.logout-option {
 border-bottom: none;
 margin-top: 20px;
 padding-top: 30px;
}

.logout-info {
 justify-content: center;
 width: 100%;
}

.logout-option .setting-title {
 color: #f44336;
 font-weight: 600;
}

.logout-option:hover { background: rgba(244, 67, 54, 0.1); }

.chat-response-card {
 border-radius: 12px;
 border: 1px solid var(--card-border);
 margin-bottom: 16px;
 overflow: hidden;
 transition: var(--transition);
 background: transparent;
}

.chat-query-header {
 padding: 16px 20px;
 border-bottom: 1px solid var(--card-border);
 background: var(--card-hover);
}

.chat-query-content {
 display: flex;
 align-items: flex-start;
 gap: 12px;
}

.chat-query-icon {
 font-size: 20px;
 color: var(--blue) !important;
 flex-shrink: 0;
 margin-top: 2px;
 font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 40;
}

.chat-query-text {
 font-size: 14px;
 font-weight: 500;
 color: var(--white-text);
 margin: 0;
 line-height: 1.4;
 flex: 1;
}

.sources-toggle-btn {
 display: none;
 align-items: center;
 justify-content: center;
 width: 32px;
 height: 32px;
 border-radius: 8px;
 background: transparent;
 border: 1px solid var(--card-border);
 cursor: pointer;
 transition: var(--transition);
 margin-left: auto;
 flex-shrink: 0;
}

.sources-toggle-btn:hover {
 background: var(--card-hover);
 border-color: var(--blue);
}

.sources-toggle-btn.active {
 background: var(--blue);
 border-color: var(--blue);
}

.sources-toggle-btn .material-symbols-outlined {
 font-size: 18px;
 color: var(--light-text);
 transition: var(--transition);
}

.sources-toggle-btn:hover .material-symbols-outlined,
.sources-toggle-btn.active .material-symbols-outlined {
 color: var(--white-text);
}

.chat-response-wrapper {
 position: relative;
 transition: height 0.3s ease;
}

.chat-response-content,
.chat-sources-content {
 padding: 20px;
 transition: opacity 0.3s ease, transform 0.3s ease;
}

.chat-response-content {
 color: var(--light-text);
 font-size: 14px;
 line-height: 1.6;
 background: transparent;
}

.chat-response-content p {
 margin: 0 0 12px 0;
}

.chat-response-content p:last-child {
 margin-bottom: 0;
}

.chat-sources-content {
 position: relative;
 background: var(--card-bg);
 border: 1px solid var(--card-border);
 border-top: none;
 border-radius: 0 0 12px 12px;
 display: flex;
 flex-direction: column;
}

.chat-response-wrapper:not(.show-sources) .chat-sources-content {
 display: none;
}

.chat-response-wrapper.show-sources .chat-response-content {
 display: none;
}

.sources-header {
 margin-bottom: 16px;
 padding-bottom: 12px;
 border-bottom: 1px solid var(--card-border);
 flex-shrink: 0;
}

.sources-header h3 {
 font-size: 18px;
 font-weight: 600;
 color: var(--blue);
 margin: 0;
 text-align: center;
}

.sources-list {
 display: flex;
 flex-direction: column;
 gap: 12px;
 flex: none;
 overflow: visible;
 padding-right: 0;
}

.source-item {
 display: flex;
 align-items: center;
 gap: 12px;
 padding: 12px;
 background: var(--card-hover);
 border-radius: 8px;
 border: 1px solid var(--card-border);
 transition: var(--transition);
 min-width: 0;
 min-height: auto;
}

.source-item:hover {
 border-color: var(--blue);
 transform: translateY(-1px);
}

.source-number {
 width: 24px;
 height: 24px;
 border-radius: 50%;
 background: var(--blue);
 color: white;
 display: flex;
 align-items: center;
 justify-content: center;
 font-size: 12px;
 font-weight: 600;
 flex-shrink: 0;
}

.source-info {
 flex: 1;
 min-width: 0;
 overflow: hidden;
}

.source-domain {
 font-size: 14px;
 font-weight: 500;
 color: var(--white-text);
 margin-bottom: 2px;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
 max-width: 100%;
}

.source-url {
 font-size: 12px;
 color: var(--light-text);
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
 max-width: 100%;
}

.source-link {
 width: 32px;
 height: 32px;
 border-radius: 6px;
 background: transparent;
 border: 1px solid var(--card-border);
 display: flex;
 align-items: center;
 justify-content: center;
 text-decoration: none;
 transition: var(--transition);
 flex-shrink: 0;
}

.source-link:hover {
 background: var(--blue);
 border-color: var(--blue);
}

.source-link .material-symbols-outlined {
 font-size: 16px;
 color: var(--light-text);
 transition: var(--transition);
}

.source-link:hover .material-symbols-outlined {
 color: white;
}

.no-sources {
 text-align: center;
 color: var(--dark-text);
 font-style: italic;
 padding: 20px;
}

.chat-streaming-indicator {
 display: inline-flex;
 align-items: center;
 gap: 4px;
 color: var(--blue);
 font-size: 12px;
 margin-top: 8px;
}

.chat-streaming-dots {
 display: inline-flex;
 gap: 2px;
}

.chat-streaming-dot {
 width: 4px;
 height: 4px;
 background: var(--blue);
 border-radius: 50%;
 animation: chatStreamingPulse 1.4s infinite ease-in-out both;
}

.chat-streaming-dot:nth-child(1) { animation-delay: -0.32s; }
.chat-streaming-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes chatStreamingPulse {
 0%, 80%, 100% { 
   transform: scale(0.8);
   opacity: 0.5;
 }
 40% { 
   transform: scale(1);
   opacity: 1;
 }
}

.chat-welcome-container {
 position: fixed;
 top: 50%;
 left: 50%;
 transform: translate(-50%, -50%);
 text-align: center;
 z-index: 1;
}

.chat-welcome-greeting {
 font-size: clamp(28px, 5vw, 36px);
 color: var(--light-text);
 margin: 0 0 8px 0;
 font-weight: 400;
 letter-spacing: 0.5px;
}

.chat-welcome-username {
 font-size: clamp(32px, 6vw, 42px);
 color: var(--blue);
 font-weight: 600;
 margin: 0;
 letter-spacing: 0.3px;
}

.response-text h1, .response-text h2, .response-text h3 {
 color: var(--white-text);
 margin: 20px 0 12px 0;
 font-weight: 600;
 line-height: 1.3;
}

.response-text h1 { 
 font-size: 22px; 
 border-bottom: 2px solid var(--card-border);
 padding-bottom: 8px;
}
.response-text h2 { 
 font-size: 19px;
 border-bottom: 1px solid var(--card-border);
 padding-bottom: 6px;
}
.response-text h3 { 
 font-size: 17px; 
}

.response-text strong {
 color: var(--white-text);
 font-weight: 700;
}

.response-text em {
 font-style: italic;
 color: var(--blue);
}

.response-text strong em {
 color: var(--white-text);
 font-weight: 700;
 font-style: italic;
}

.response-text code {
 background: var(--card-bg);
 color: var(--blue);
 padding: 3px 6px;
 border-radius: 4px;
 font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
 font-size: 13px;
 border: 1px solid var(--card-border);
}

.response-text pre {
 background: var(--card-bg);
 border: 1px solid var(--card-border);
 border-radius: 8px;
 padding: 16px;
 overflow-x: auto;
 margin: 16px 0;
 border-left: 4px solid var(--blue);
}

.response-text pre code {
 background: none;
 padding: 0;
 color: var(--white-text);
 border: none;
}

.response-text ul, .response-text ol {
 margin: 12px 0;
 padding-left: 24px;
}

.response-text li {
 margin: 6px 0;
 color: var(--light-text);
 line-height: 1.5;
}

.response-text p {
 margin: 12px 0;
 line-height: 1.6;
}

.response-text a {
 color: var(--blue);
 text-decoration: none;
 border-bottom: 1px solid var(--blue);
 transition: var(--transition);
}

.response-text a:hover {
 background: rgba(66, 133, 244, 0.1);
 border-radius: 3px;
 padding: 1px 2px;
}

.markdown-table-wrapper {
 overflow-x: auto;
 margin: 20px 0;
 border-radius: 10px;
 border: 1px solid var(--card-border);
 box-shadow: var(--shadow-light);
}

.markdown-table {
 width: 100%;
 border-collapse: collapse;
 background: var(--card-bg);
 font-size: 14px;
}

.markdown-table thead th {
 background: var(--blue);
 color: white;
 font-weight: 600;
 padding: 14px 16px;
 text-align: left;
 border-bottom: 2px solid var(--blue);
 position: sticky;
 top: 0;
}

.markdown-table tbody td {
 padding: 12px 16px;
 color: var(--light-text);
 border-bottom: 1px solid var(--card-border);
 transition: all 0.2s ease;
}

.markdown-table tbody tr {
 transition: all 0.2s ease;
}

.markdown-table tbody tr:hover {
 background: var(--card-hover);
 transform: scale(1.01);
}

.markdown-table tbody tr:hover td {
 color: var(--white-text);
 box-shadow: inset 0 0 0 1px rgba(66, 133, 244, 0.2);
}

.markdown-table tbody tr:last-child td {
 border-bottom: none;
}

.markdown-table tbody tr:nth-child(even) {
 background: rgba(255, 255, 255, 0.02);
}

.search-results-header {
 position: fixed;
 top: 1%;
 left: 50%;
 transform: translateX(-50%);
 z-index: 200;
 background: var(--dark-bg);
 backdrop-filter: blur(10px);
 border-radius: 12px;
 padding: 4px;
 border: 1px solid var(--dark-border);
 box-shadow: var(--shadow-heavy);
 display: none;
 width: auto;
 min-width: 240px;
}

.search-results-header.visible { display: flex; }

.search-results-tabs {
 display: flex;
 position: relative;
 gap: 0;
 width: 100%;
 min-width: 240px;
}

.search-tab-indicator {
 position: absolute;
 top: 0;
 left: 0;
 height: 100%;
 background: var(--blue);
 border-radius: 8px;
 transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
 z-index: 1;
}

.search-results-tab {
 position: relative;
 z-index: 2;
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 10px 16px;
 cursor: pointer;
 transition: var(--transition);
 background: transparent;
 border: none;
 border-radius: 8px;
 min-height: 40px;
 flex: 1;
}

.search-results-tab .material-symbols-outlined {
 font-size: 20px;
 color: var(--light-text);
 transition: var(--transition);
}

.search-results-tab.active .material-symbols-outlined {
 color: white;
}

.search-results-tab:hover:not(.active) .material-symbols-outlined {
 color: var(--white-text);
}

.search-content-section {
 display: none;
 padding-top: 80px;
}

.search-content-section.active {
 display: block;
}

.search-section-results {
 display: grid;
 gap: 16px;
 margin-top: 20px;
}

.profile-result-card {
 background: var(--card-bg);
 border-radius: 12px;
 padding: 16px;
 border: 1px solid var(--card-border);
 transition: var(--transition);
 cursor: pointer;
 display: flex;
 align-items: center;
 gap: 12px;
}

.profile-result-card:hover {
 background: var(--card-hover);
 border-color: var(--blue);
 transform: translateY(-2px);
}

.profile-result-avatar {
 width: 48px;
 height: 48px;
 border-radius: 50%;
 background: var(--blue);
 display: flex;
 align-items: center;
 justify-content: center;
 font-weight: 600;
 color: white;
 font-size: 18px;
 flex-shrink: 0;
}

.profile-result-info {
 flex: 1;
 min-width: 0;
}

.profile-result-name {
 font-size: 16px;
 font-weight: 500;
 color: var(--white-text);
 margin: 0 0 4px 0;
}

.profile-result-username {
 font-size: 14px;
 color: var(--blue);
 margin: 0 0 4px 0;
}

.profile-result-bio {
 font-size: 13px;
 color: var(--light-text);
 margin: 0;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

.post-result-card {
 background: var(--card-bg);
 border-radius: 12px;
 padding: 16px;
 border: 1px solid var(--card-border);
 transition: var(--transition);
 cursor: pointer;
}

.post-result-card:hover {
 background: var(--card-hover);
 border-color: var(--blue);
 transform: translateY(-2px);
}

.post-result-title {
 font-size: 16px;
 font-weight: 500;
 color: var(--white-text);
 margin: 0 0 8px 0;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

.post-result-description {
 font-size: 14px;
 color: var(--light-text);
 margin: 0 0 12px 0;
 line-height: 1.4;
 overflow: hidden;
 display: -webkit-box;
 -webkit-line-clamp: 2;
 -webkit-box-orient: vertical;
}

.post-result-meta {
 display: flex;
 align-items: center;
 gap: 8px;
 font-size: 12px;
 color: var(--dark-text);
}

.chat-image-preview {
 margin: 16px 0;
 overflow-x: auto;
 overflow-y: hidden;
 white-space: nowrap;
 padding: 8px 0;
 scrollbar-width: thin;
 scrollbar-color: var(--blue) transparent;
}

.chat-image-preview::-webkit-scrollbar {
 height: 6px;
}

.chat-image-preview::-webkit-scrollbar-track {
 background: transparent;
}

.chat-image-preview::-webkit-scrollbar-thumb {
 background: var(--blue);
 border-radius: 3px;
}

.chat-image-preview::-webkit-scrollbar-thumb:hover {
 background: var(--blue-hover);
}

.video-call-modal {
 position: fixed;
 top: 0;
 left: 0;
 width: 100vw;
 height: 100vh;
 background: rgba(0, 0, 0, 0.95);
 z-index: 9999;
 display: none;
 flex-direction: column;
 align-items: center;
 justify-content: center;
}

.video-call-modal.active { display: flex; }

.video-container {
 position: relative;
 width: 90vw;
 height: 70vh;
 max-width: 800px;
 max-height: 600px;
 background: #1a1a1a;
 border-radius: 12px;
 overflow: hidden;
}

.remote-video, .local-video {
 width: 100%;
 height: 100%;
 object-fit: cover;
 border-radius: 12px;
}

.local-video {
 position: absolute;
 top: 20px;
 right: 20px;
 width: 150px;
 height: 100px;
 border: 2px solid var(--blue);
 z-index: 10;
}

.call-controls {
 position: absolute;
 bottom: 20px;
 left: 50%;
 transform: translateX(-50%);
 display: flex;
 gap: 20px;
 z-index: 11;
}

.call-btn {
 width: 60px;
 height: 60px;
 border-radius: 50%;
 border: none;
 display: flex;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 transition: var(--transition);
}

.call-btn.mute { background: var(--card-bg); }
.call-btn.video { background: var(--card-bg); }
.call-btn.end { background: #f44336; }

.call-btn .material-symbols-outlined {
 font-size: 24px;
 color: var(--white-text);
}

.call-status {
 position: absolute;
 top: 20px;
 left: 20px;
 background: rgba(0, 0, 0, 0.7);
 padding: 10px 16px;
 border-radius: 8px;
 color: var(--white-text);
 font-size: 14px;
 z-index: 11;
}

.call-type-indicator {
 position: absolute;
 top: 20px;
 left: 20px;
 background: rgba(0, 0, 0, 0.7);
 padding: 8px 12px;
 border-radius: 16px;
 color: var(--white-text);
 font-size: 12px;
 font-weight: 500;
 z-index: 11;
 display: flex;
 align-items: center;
 gap: 6px;
}

.call-type-indicator .material-symbols-outlined {
 font-size: 16px;
}

.incoming-call-modal {
 position: fixed;
 top: 0;
 left: 0;
 width: 100vw;
 height: 100vh;
 background: rgba(0, 0, 0, 0.95);
 z-index: 10000;
 display: none;
 align-items: center;
 justify-content: center;
}

.incoming-call-modal.active { display: flex; }

.incoming-call-card {
 background: var(--card-bg);
 border-radius: 20px;
 padding: 40px 30px;
 text-align: center;
 border: 1px solid var(--card-border);
 box-shadow: var(--shadow-heavy);
 max-width: 320px;
 width: 90vw;
}

.incoming-caller-avatar {
 width: 80px;
 height: 80px;
 border-radius: 50%;
 background: var(--blue);
 display: flex;
 align-items: center;
 justify-content: center;
 margin: 0 auto 16px;
 font-size: 32px;
 font-weight: 600;
 color: var(--white-text);
}

.incoming-caller-name {
 font-size: 20px;
 font-weight: 600;
 color: var(--white-text);
 margin: 0 0 8px 0;
}

.incoming-call-type {
 font-size: 14px;
 color: var(--light-text);
 margin: 0 0 32px 0;
}

.incoming-call-actions {
 display: flex;
 justify-content: center;
 gap: 20px;
}

.incoming-call-btn {
 width: 60px;
 height: 60px;
 border-radius: 50%;
 border: none;
 display: flex;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 transition: var(--transition);
}

.incoming-call-btn.accept {
 background: #4caf50;
}

.incoming-call-btn.decline {
 background: #f44336;
}

.incoming-call-btn:hover {
 transform: scale(1.1);
}

.incoming-call-btn .material-symbols-outlined {
 font-size: 28px;
 color: white;
}

.profile-display-container {
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 20px;
 margin-top: 0;
 padding: 16px;
 position: absolute;
 top: 5%;
 left: 50%;
 transform: translateX(-50%);
}

.profile-image-circle {
 width: 80px;
 height: 80px;
 border-radius: 50%;
 background: var(--blue);
 display: flex;
 align-items: center;
 justify-content: center;
 position: relative;
 flex-shrink: 0;
 border: 3px solid var(--card-border);
 overflow: hidden;
}

.profile-image-circle img {
 width: 100%;
 height: 100%;
 object-fit: contain;
 border-radius: 50%;
}

.profile-initial {
 font-size: 32px;
 font-weight: 600;
 color: white;
}

.profile-info-card {
 background: var(--card-bg);
 border-radius: 12px;
 padding: 16px;
 border: 1px solid var(--card-border);
 position: relative;
 width: 240px;
 text-align: left;
}

.profile-card-header {
 position: absolute;
 top: 8px;
 right: 8px;
}

.profile-edit-btn {
 width: 28px;
 height: 28px;
 border-radius: 50%;
 background: transparent;
 border: 1px solid var(--card-border);
 display: flex;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 transition: var(--transition);
}

.profile-edit-btn .material-symbols-outlined {
 font-size: 16px;
 color: var(--blue);
}

.profile-display-name {
 font-size: 18px;
 font-weight: 600;
 color: var(--white-text);
 margin: 0 0 8px 0;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
 padding-right: 32px;
}

.profile-display-bio {
 font-size: 14px;
 color: var(--light-text);
 margin: 0;
 line-height: 1.3;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

.profile-posts-section {
 margin-top: 40px;
 padding: 0 20px;
 width: 100%;
}

.profile-posts-title {
 font-size: 20px;
 font-weight: 600;
 color: var(--white-text);
 text-align: center;
 margin: 0 0 20px 0;
}

.profile-posts-grid {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
 gap: 16px;
 max-width: 1000px;
 margin: 0 auto;
}

.profile-posts-loading {
 grid-column: 1 / -1;
 text-align: center;
 color: var(--light-text);
 padding: 0px;
}

.profile-post-card {
 background: var(--card-bg);
 border-radius: 12px;
 border: 1px solid var(--card-border);
 overflow: hidden;
 cursor: pointer;
 transition: var(--transition);
}

.profile-post-card:hover {
 border-color: var(--blue);
 transform: translateY(-2px);
}

.profile-post-image {
 width: 100%;
 height: 100%;
 background: var(--dark-bg);
 display: flex;
 align-items: center;
 justify-content: center;
 overflow: hidden;
}

.profile-post-image img {
 width: 100%;
 height: 100%;
 object-fit: cover;
}

.profile-post-placeholder {
 font-size: 48px;
 color: var(--dark-text);
}

.profile-post-content {
 padding: 16px;
}

.profile-post-title {
 font-size: 16px;
 font-weight: 500;
 color: var(--white-text);
 margin: 0 0 8px 0;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

.profile-post-description {
 font-size: 14px;
 color: var(--light-text);
 margin: 0 0 12px 0;
 line-height: 1.4;
 overflow: hidden;
 display: -webkit-box;
 -webkit-line-clamp: 2;
 -webkit-box-orient: vertical;
}

.profile-post-date {
 font-size: 12px;
 color: var(--dark-text);
 margin: 0;
}

.post-detail-modal {
 position: fixed;
 top: 0;
 left: 0;
 width: 100vw;
 height: 100vh;
 z-index: 10000;
 opacity: 0;
 visibility: hidden;
 transition: all 0.3s ease;
}

.post-detail-modal.active {
 opacity: 1;
 visibility: visible;
}

.post-detail-overlay {
 position: absolute;
 top: 0;
 left: 0;
 width: 100%;
 height: 100%;
 background: rgba(0, 0, 0, 0.8);
}

.post-detail-content {
 position: relative;
 background: var(--card-bg);
 border-radius: 16px;
 max-width: 500px;
 max-height: 85vh;
 margin: 7.5vh auto;
 overflow: hidden;
 transform: translateY(50px);
 transition: transform 0.3s ease;
}

.post-detail-modal.active .post-detail-content {
 transform: translateY(0);
}

.post-detail-header {
 display: flex;
 justify-content: space-between;
 align-items: center;
 padding: 20px;
}

.post-close-btn {
 background: none;
 border: none;
 cursor: pointer;
 color: var(--blue);
}

.post-detail-images-container {
 max-height: 300px;
 overflow-y: auto;
}

.post-detail-images {
 display: flex;
 gap: 12px;
 padding: 16px;
 overflow-x: auto;
 scrollbar-width: thin;
}

.post-detail-images img {
 height: 200px;
 width: auto;
 border-radius: 8px;
 flex-shrink: 0;
 object-fit: cover;
}

.post-detail-info {
 padding: 0;
 max-height: 300px;
 overflow-y: auto;
}

.post-detail-description {
 padding: 20px;
}

.post-detail-description h4 {
 margin: 0 0 8px 0;
 color: var(--white-text);
 font-size: 16px;
}

.post-detail-description p {
 margin: 0;
 color: var(--light-text);
 line-height: 1.4;
}

.post-detail-date {
 padding: 16px 20px;
 color: var(--dark-text);
}

.calendar-grid {
 display: grid;
 grid-template-columns: repeat(7, 1fr);
 gap: 1px;
 background: transparent;
 border-radius: 12px;
 overflow: hidden;
 margin-top: 20px;
 width: 100%;
 max-width: 100%;
 box-sizing: border-box;
}

.calendar-header-day {
 background: var(--dark-bg);
 backdrop-filter: blur(10px);
 border: 1px solid var(--dark-border);
 color: var(--light-text);
 padding: 12px 8px;
 text-align: center;
 font-size: 12px;
 font-weight: 600;
 min-width: 0;
}

.calendar-day {
 background: var(--dark-bg);
 backdrop-filter: blur(10px);
 border: 1px solid var(--dark-border);
 min-height: 60px;
 padding: 8px;
 cursor: pointer;
 transition: var(--transition);
 position: relative;
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 text-align: center;
 min-width: 0;
}

.calendar-day:hover {
 background: var(--card-hover);
 border-color: var(--blue);
}

.calendar-day.today {
 border-color: var(--blue);
 background: rgba(0, 112, 255, 0.1);
}

.calendar-day.other-month {
 color: var(--dark-text);
 opacity: 0.5;
}

.day-number {
 font-weight: 600;
 color: var(--white-text);
 font-size: 14px;
 margin-bottom: 4px;
}

.calendar-day.other-month .day-number {
 color: var(--dark-text);
}

.event-dot {
 width: 6px;
 height: 6px;
 background: var(--blue);
 border-radius: 50%;
 margin-top: 2px;
}

.month-selector-container {
 position: relative;
 margin-bottom: 20px;
}

.month-selector-container::before,
.month-selector-container::after {
 content: '';
 position: absolute;
 top: 0;
 bottom: 0;
 width: 30px;
 pointer-events: none;
 z-index: 2;
}

.month-selector-container::before {
 left: 0;
 background: linear-gradient(to right, var(--bg), transparent);
}

.month-selector-container::after {
 right: 0;
 background: linear-gradient(to left, var(--bg), transparent);
}

.month-selector {
  display: flex;
  gap: 16px;
  overflow: hidden;
  padding: 16px 0;
  margin: 0 20px 20px 20px;
  position: relative;
  justify-content: center;
  align-items: center;
}

.month-selector::-webkit-scrollbar {
 display: none;
}

.month-item {
  background: var(--dark-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--dark-border);
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  min-width: 120px;
  text-align: center;
  position: relative;
  transform: scale(0.85);
  opacity: 0.6;
}

.month-item:hover {
 background: var(--card-hover);
 border-color: var(--blue);
 transform: scale(0.95);
 opacity: 0.9;
}

.month-item.active {
  background: rgba(0, 112, 255, 0.1);
  border-color: var(--blue);
  transform: scale(1);
  opacity: 1;
  box-shadow: 0 4px 16px rgba(0, 112, 255, 0.2);
}

.month-item:not(.active):hover {
  opacity: 0.8;
  transform: scale(0.9);
}

.month-name {
 font-size: 16px;
 font-weight: 600;
 color: var(--white-text);
 margin: 0;
 transition: var(--transition);
}

.month-year {
 position: absolute;
 bottom: 8px;
 right: 12px;
 font-size: 12px;
 color: var(--blue);
 font-weight: 500;
 transition: var(--transition);
}

.month-item.active .month-name {
 color: var(--blue);
}

.page#eventsPage .page-content { 
 padding-top: 0px;
}

.event-add-btn {
 position: fixed;
 top: 1%;
 right: 1%;
 width: var(--btn-size-lg);
 height: var(--btn-size-lg);
 border-radius: 14px;
 background: transparent;
 border: none;
 display: none;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 z-index: 300;
}

.event-add-btn.visible { display: flex; }


.event-add-btn .material-symbols-outlined {
 font-size: var(--icon-size-lg);
 color: var(--blue);
}

.event-detail-header {
 text-align: center;
 margin-bottom: 32px;
 padding: 20px 0;
}

.event-date-title {
 font-size: clamp(28px, 5vw, 36px);
 font-weight: 700;
 color: var(--white-text);
 margin: 0 0 8px 0;
 letter-spacing: -0.02em;
}

.event-date-subtitle {
 font-size: 16px;
 color: var(--light-text);
 margin: 0;
}

.selected-date-events {
 margin-bottom: 24px;
}

.no-events-message {
 text-align: center;
 padding: 60px 20px;
 color: var(--dark-text);
}

.no-events-message .material-symbols-outlined {
 font-size: 64px;
 color: var(--blue);
 margin-bottom: 16px;
 display: block;
}

.no-events-message p {
 margin: 8px 0;
 font-size: 16px;
}

.no-events-message p:first-of-type {
 color: var(--light-text);
 font-weight: 500;
}

.event-item {
 background: var(--card-bg);
 border-radius: 16px;
 padding: 20px;
 border: 1px solid var(--card-border);
 margin-bottom: 16px;
}

.event-item:last-child {
 margin-bottom: 0;
}

.event-time {
 font-size: 14px;
 color: var(--blue);
 font-weight: 600;
 margin-bottom: 8px;
 display: flex;
 align-items: center;
 gap: 6px;
}

.event-time .material-symbols-outlined {
 font-size: 16px;
 color: var(--blue) !important;
}

.event-title {
 font-size: 15px;
 font-weight: 600;
 color: var(--white-text);
 margin: 0 0 8px 0;
 line-height: 1.3;
}

.event-desc {
 font-size: 14px;
 color: var(--light-text);
 margin: 0;
 line-height: 1.5;
}

.add-event-form {
 background: var(--card-bg);
 border-radius: 20px;
 border: 1px solid var(--card-border);
 overflow: hidden;
 margin-top: 24px;
 opacity: 0;
 visibility: hidden;
 transform: translateY(20px);
 transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.add-event-form.visible {
 opacity: 1;
 visibility: visible;
 transform: translateY(0);
}

.form-header {
 background: var(--card-hover);
 padding: 20px 24px;
 border-bottom: 1px solid var(--card-border);
 display: flex;
 justify-content: space-between;
 align-items: center;
}

.form-header h3 {
 font-size: 18px;
 font-weight: 600;
 color: var(--white-text);
 margin: 0;
}

.form-close-btn {
 width: 32px;
 height: 32px;
 border-radius: 50%;
 background: transparent;
 border: 1px solid var(--card-border);
 display: flex;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 transition: var(--transition);
}

.form-close-btn:hover {
 background: var(--card-hover);
 border-color: var(--blue);
}

.form-close-btn .material-symbols-outlined {
 font-size: 18px;
 color: var(--light-text);
}

.form-content {
 padding: 24px;
}

.input-group {
 margin-bottom: 24px;
}

.input-group:last-child {
 margin-bottom: 0;
}

.input-label {
 display: block;
 font-size: 14px;
 font-weight: 600;
 color: var(--white-text);
 margin-bottom: 8px;
 letter-spacing: 0.3px;
}

.styled-input,
.styled-textarea {
 width: 100%;
 padding: 16px 20px;
 border: 2px solid var(--card-border);
 border-radius: 12px;
 background: var(--bg);
 color: var(--white-text);
 font-family: 'Merriweather', serif;
 font-size: 15px;
 line-height: 1.5;
 outline: none;
 transition: var(--transition);
 resize: none;
}

.styled-input:focus,
.styled-textarea:focus {
 border-color: var(--blue);
 box-shadow: 0 0 0 4px rgba(0, 112, 255, 0.1);
}

.styled-input::placeholder,
.styled-textarea::placeholder {
 color: var(--dark-text);
}

.mention-textarea {
 font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
 font-size: 14px;
}

.input-hint {
 display: block;
 font-size: 12px;
 color: var(--dark-text);
 margin-top: 6px;
 font-style: italic;
}

.time-row {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 16px;
}

.time-input {
 font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
 text-align: center;
 font-weight: 600;
}

.time-input::-webkit-calendar-picker-indicator {
 filter: invert(42%) sepia(93%) saturate(1352%) hue-rotate(87deg) brightness(119%) contrast(119%);
}

.form-actions {
 margin-top: 32px;
 display: flex;
 justify-content: center;
}

.save-event-btn {
 display: flex;
 align-items: center;
 gap: 12px;
 padding: 16px 32px;
 background: var(--blue);
 color: white;
 border: none;
 border-radius: 12px;
 font-family: 'Merriweather', serif;
 font-size: 16px;
 font-weight: 600;
 cursor: pointer;
 transition: var(--transition);
 min-width: 160px;
 justify-content: center;
}

.save-event-btn:hover {
 background: var(--blue-hover);
 transform: translateY(-2px);
 box-shadow: 0 8px 20px rgba(0, 112, 255, 0.3);
}

.save-event-btn:active {
 transform: translateY(0);
}

.save-event-btn .material-symbols-outlined {
 font-size: 20px;
}

.events-list {
 display: flex;
 flex-direction: column;
 gap: 12px;
}

.d1-contact {
 opacity: 0.8;
}

.d1-contact:hover {
 opacity: 1;
}

.d1-contacts-section {
 border-top: none;
}

.search-input-container {
  font-family: 'Merriweather', serif;
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 8px;
  background: var(--card-hover);
  border-radius: 20px;
  border: 1px solid rgb(86, 86, 86); /* Changed from grey to consistent variable */
  height: 36px;
  min-width: 100px;
  overflow-x: hidden;
}

.contacts-search-cancel {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition);
  color: var(--dark-text);
}

[data-theme="light"] .sidebar,
[data-theme="light"] .sidebar-header,
[data-theme="light"] .sidebar-toggle,
[data-theme="light"] .toolbar,
[data-theme="light"] .file-preview-container,
[data-theme="light"] .file-preview-item,
[data-theme="light"] .clear-all-btn,
[data-theme="light"] .icon-btn,
[data-theme="light"] .search-box,
[data-theme="light"] .chat-box,
[data-theme="light"] .top-right-container,
[data-theme="light"] .page-tabs,
[data-theme="light"] .contacts-panel,
[data-theme="light"] .contacts-header,
[data-theme="light"] .chat-header,
[data-theme="light"] .chat-input-wrapper,
[data-theme="light"] .settings-header,
[data-theme="light"] .add-users-section,
[data-theme="light"] .month-item,
[data-theme="light"] .calendar-header-day,
[data-theme="light"] .calendar-day,
[data-theme="light"] .add-event-form,
[data-theme="light"] .form-header,
[data-theme="light"] .styled-input,
[data-theme="light"] .styled-textarea {
 background: rgba(255, 255, 255, 0.95);
 border: 1px solid var(--dark-border);
}
[data-theme="light"] .top-left-icon:hover {
  background: rgba(255, 255, 255, 1);
}

[data-theme="light"] .sidebar { background: rgba(255, 255, 255, 0.98); }
[data-theme="light"] .toolbar { box-shadow: var(--shadow-toolbar); }
[data-theme="light"] .file-preview-item,
[data-theme="light"] .clear-all-btn { box-shadow: var(--shadow-light); }
[data-theme="light"] .top-right-container { box-shadow: var(--shadow-heavy); }

[data-theme="light"] .sidebar-toggle:hover,
[data-theme="light"] .icon-btn:hover,
[data-theme="light"] .search-box:hover,
[data-theme="light"] .chat-box:hover,
[data-theme="light"] .contact-item:hover,
[data-theme="light"] .chat-attach-btn:hover,
[data-theme="light"] .chat-action-btn:hover,
[data-theme="light"] .settings-back-btn:hover,
[data-theme="light"] .contacts-back-btn:hover,
[data-theme="light"] .back-btn:hover,
[data-theme="light"] .calendar-day:hover,
[data-theme="light"] .month-item:hover { background: rgba(255, 255, 255, 1); }

[data-theme="light"] .search-box.active,
[data-theme="light"] .chat-box.active { 
 background: transparent;
}

[data-theme="light"] .sidebar-toggle .material-symbols-rounded,
[data-theme="light"] .icon-btn .material-symbols-rounded,
[data-theme="light"] .icon-btn .material-symbols-outlined,
[data-theme="light"] .search-icon .material-symbols-rounded,
[data-theme="light"] .chat-icon .material-symbols-outlined,
[data-theme="light"] .attach-icon .material-symbols-rounded,
[data-theme="light"] .send-icon .material-symbols-outlined { color: var(--white-text); }

[data-theme="light"] .search-box input,
[data-theme="light"] .chat-box input,
[data-theme="light"] .contacts-search-input { color: var(--white-text); }

[data-theme="light"] .search-box input::placeholder,
[data-theme="light"] .chat-box input::placeholder,
[data-theme="light"] .contacts-search-input::placeholder { color: rgba(26, 26, 26, 0.6); }

[data-theme="light"] .contact-item.active { background: rgba(66, 133, 244, 0.15) !important; }

[data-theme="light"] .message.sent .message-bubble,
[data-theme="light"] .contact-avatar,
[data-theme="light"] .chat-contact-avatar { 
 background: var(--blue);
 color: #ffffff !important;
}

[data-theme="light"] .message.received .message-bubble {
 background: #ffffff;
 border: 1px solid var(--card-border);
}

[data-theme="light"] .settings-option:hover { background: rgba(0, 0, 0, 0.02); }

[data-theme="light"] .toggle-input { background: var(--card-border); }

[data-theme="light"] .add-users-section:hover { background: rgba(66, 133, 244, 0.03); }

[data-theme="light"] .month-selector-container::before {
 background: linear-gradient(to right, var(--bg), transparent);
}

[data-theme="light"] .month-selector-container::after {
 background: linear-gradient(to left, var(--bg), transparent);
}

[data-theme="light"] .markdown-table tbody tr:nth-child(even) {
 background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .styled-input:focus,
[data-theme="light"] .styled-textarea:focus {
 border-color: var(--blue);
 box-shadow: 0 0 0 4px rgba(0, 112, 255, 0.1);
}

[data-theme="light"] .chat-query-icon {
 color: var(--blue) !important;
}

[data-theme="light"] .event-time .material-symbols-outlined,
[data-theme="light"] .event-item .event-time .material-symbols-outlined {
 color: var(--blue) !important;
}

html {
 height: 100vh;
 height: -webkit-fill-available;
}

body {
 height: 100vh;
 height: -webkit-fill-available;
}

@media (min-width: 769px) and (max-width: 1000px) {
 .sidebar-toggle {
   left: calc(var(--sidebar-width) + 10px);
 }

 .sidebar:not(.open) ~ .sidebar-toggle {
   left: 10px;
 }

 .toolbar {
   max-width: calc(100vw - 32px);
   width: auto;
   padding: 8px 10px;
 }
 
 .toolbar-icons {
   gap: 6px;
   justify-content: center;
   flex-wrap: nowrap;
   overflow: hidden;
 }
 
 .toolbar .icon-btn,
 .toolbar .search-box, 
 .toolbar .chat-box {
   width: 40px;
   height: 40px;
 }
 
 .toolbar-icons > * {
   flex-shrink: 0;
   min-width: 0;
 }

 .toolbar .search-box.active .search-icon {
   right: 10px;
   transform: translateY(-50%);
 }
 
 .toolbar .chat-box.active .attach-icon {
   left: 10px;
   transform: translateY(-50%);
 }
 
 .toolbar .chat-box.active .send-icon {
   right: 10px;
   transform: translateY(-50%);
 }
 
 .toolbar .search-box.active input {
   padding-left: 10px;
   padding-right: 36px;
   font-size: 14px;
 }
 
 .toolbar .chat-box.active input {
   padding-left: 36px;
   padding-right: 36px;
   font-size: 14px;
 }

 .toolbar .icon-btn.active .material-symbols-rounded,
 .toolbar .icon-btn.active .material-symbols-outlined {
   color: var(--blue) !important;
 }
 
 .toolbar .search-box.active .search-icon .material-symbols-rounded,
 .toolbar .chat-box.active .attach-icon .material-symbols-rounded,
 .toolbar .chat-box.active .send-icon .material-symbols-outlined {
   color: var(--blue) !important;
 }
}

@media (min-width: 1001px) {
 :root {
   --btn-size-sm: 36px;
   --btn-size-md: 44px;
   --btn-size-lg: 48px;
   --icon-size-sm: 20px;
   --icon-size-md: 26px;
   --icon-size-lg: 28px;
   --icon-size-xl: 30px;
 }

 .file-preview-container.visible {
   max-height: 140px;
   margin-bottom: 12px;
 }
 
 .file-preview-scroll {
   gap: 12px;
   padding: 8px;
 }
 
 .file-preview-item,
 .clear-all-btn {
   min-width: 80px;
   width: 80px;
   height: 100px;
   padding: 8px;
   border-radius: 10px;
 }
 
 .file-preview-item img {
   width: 64px;
   height: 64px;
   border-radius: 6px;
   margin-bottom: 4px;
 }
 
 .file-preview-item .file-icon,
 .clear-all-btn .material-symbols-outlined {
   font-size: 32px;
   margin-bottom: 4px;
 }
 
 .file-preview-item .file-name { font-size: 10px; }
 
 .file-remove {
   top: 4px;
   right: 4px;
   width: 24px;
   height: 24px;
   font-size: 18px;
 }

 .clear-all-btn { margin-left: 8px; }

 .sidebar-toggle { left: calc(var(--sidebar-width) + 10px); }
 .sidebar:not(.open) ~ .sidebar-toggle { left: 10px; }

 .sidebar-header {
   height: 70px;
   padding: 0 24px;
 }

 .toolbar {
   padding: 10px 12px;
   max-width: 60vw !important;
 }
 
 .toolbar:not(.search-active) { max-width: 45vw !important; }
 
 .icon-btn { border-radius: 14px; }
 
 .search-box, 
 .chat-box { border-radius: 14px; }
 
 .search-box.active .search-icon { right: 12px; }
 
 .chat-box.active .attach-icon { left: 12px; }
 
 .chat-box.active .send-icon { right: 12px; }
 
 .search-box input, 
 .chat-box input {
   font-size: 16px;
   padding-left: 12px;
   padding-right: 48px;
 }
 
 .chat-box.active input {
   padding-left: 48px;
   padding-right: 48px;
 }

 .fixed-tabs { min-width: 140px; }

 .chat-response-card {
   max-width: 800px;
   width: 100%;
   margin-left: auto;
   margin-right: auto;
 }
 
 .chat-image-preview {
   max-width: 100%;
   width: 100%;
 }
 
 .chat-image-preview > div {
   max-width: 100% !important;
   width: auto !important;
   min-width: auto !important;
 }
 
 .sources-list {
   max-width: 100%;
   width: 100%;
 }
 
 .source-item {
   max-width: 100%;
   width: 100%;
 }
 
 .source-info {
   max-width: calc(100% - 80px);
 }
 
 .source-domain,
 .source-url {
   max-width: 100%;
 }
}

@media (max-width: 1000px) {
 :root {
   --btn-size-sm: 32px;
   --btn-size-md: 36px;
   --btn-size-lg: 40px;
   --icon-size-sm: 18px;
   --icon-size-md: 20px;
   --icon-size-lg: 22px;
   --icon-size-xl: 24px;
 }

 .contacts-panel {
   width: 100%;
   position: absolute;
   z-index: 10;
   transform: translateX(0);
   transition: transform 0.3s ease;
 }

 .contacts-panel.hide {
   transform: translateX(-100%);
 }

 .chat-panel {
   width: 100%;
   height: 100%;
   transform: translateX(100%);
   transition: transform 0.3s ease;
 }

 .chat-panel.show {
   transform: translateX(0);
 }

 .back-btn {
   display: flex !important;
 }

 .chat-input-wrapper {
   position: fixed;
   bottom: calc(env(keyboard-inset-height, 0px) + 2%);
   left: 12px;
   right: 12px;
   margin: 0;
   z-index: 1000;
   transition: bottom 0.3s ease;
 }
 
 .chat-messages {
   padding-bottom: 70px;
 }
 
 .whatsapp-container {
   height: -webkit-fill-available;
 }

 .video-container {
   width: 95vw;
   height: 60vh;
 }
 
 .local-video {
   width: 120px;
   height: 80px;
   top: 15px;
   right: 15px;
 }
 
 .call-controls {
   bottom: 15px;
   gap: 15px;
 }
 
 .call-btn {
   width: 50px;
   height: 50px;
 }
 
 .call-btn .material-symbols-outlined {
   font-size: 20px;
 }

 .incoming-call-card {
   padding: 32px 24px;
   max-width: 280px;
 }
 
 .incoming-caller-avatar {
   width: 70px;
   height: 70px;
   font-size: 28px;
   margin-bottom: 12px;
 }
 
 .incoming-caller-name {
   font-size: 18px;
 }
 
 .incoming-call-actions {
   gap: 16px;
 }
 
 .incoming-call-btn {
   width: 56px;
   height: 56px;
 }
 
 .incoming-call-btn .material-symbols-outlined {
   font-size: 24px;
 }

 .profile-display-container {
   margin-top: 2%;
   gap: 16px;
 }
 
 .profile-info-card {
   width: 200px;
 }
 
 .profile-image-circle {
   width: 70px;
   height: 70px;
 }
 
 .profile-initial {
   font-size: 28px;
 }

 .profile-posts-grid {
   grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
   gap: 12px;
 }
 
 .profile-posts-section {
   padding: 0 16px;
 }
}

@media (max-width: 768px) {
 .toolbar {
   gap: 2px;
   padding: 6px;
   justify-content: space-evenly;
   min-width: 280px;
   transition: var(--smooth-transition);
 }
 
 .icon-btn { transition: var(--smooth-transition); }
 
 .search-box, 
 .chat-box {
   transition: var(--smooth-transition);
   z-index: 1;
 }
 
 .toolbar.search-active .toolbar-icons .icon-btn,
 .toolbar.search-active .toolbar-icons .search-box:not(.active),
 .toolbar.search-active .toolbar-icons .chat-box:not(.active) {
   opacity: 0;
   pointer-events: none;
   transform: scale(0.3);
   transition: var(--smooth-transition);
   position: absolute;
 }
 
 .search-box.active, 
 .chat-box.active {
   position: relative;
   width: calc(100% - 4px);
   height: 32px;
   margin: 2px;
   display: flex;
   align-items: center;
   background: transparent;
   border: none;
   border-radius: 16px;
   z-index: 10;
 }

 .search-box.active input,
 .chat-box.active input {
   flex: 1;
   height: 100%;
   border: none;
   outline: none;
   background: transparent;
   font-family: 'Merriweather', serif;
   color: var(--white-text);
   opacity: 1;
   pointer-events: auto;
   padding-left: 12px;
   padding-right: 35px;
   font-size: 16px;
 }

 .chat-box.active input { padding-left: 35px; }

 .search-box.active .search-icon {
   right: 8px;
   transform: translateY(-50%);
 }

 .chat-box.active .attach-icon {
   left: 8px;
   transform: translateY(-50%);
 }

 .chat-box.active .send-icon {
   right: 8px;
   transform: translateY(-50%);
 }

 .sidebar {
   width: var(--sidebar-mobile-width);
   left: calc(-1 * var(--sidebar-mobile-width));
   background: rgba(31, 31, 31, 0.98);
 }
 
 .sidebar-toggle {
   left: calc(var(--sidebar-mobile-width) + 10px);
   border-radius: 12px;
 }

 .sidebar.open ~ .sidebar-toggle { left: calc(var(--sidebar-mobile-width) + 10px); }
 .sidebar:not(.open) ~ .sidebar-toggle { left: 10px; }
 
 .sidebar-header {
   height: 50px;
   padding: 0 16px;
 }
 
 .sidebar-title { font-size: 16px; }
 .sidebar-content { padding: 16px; }

 .top-right-container {
   gap: 3px;
   padding: 3px;
   border-radius: 10px;
 }

 .fixed-tabs { min-width: 180px; }

 .page-tabs {
   padding: 2px;
   border-radius: 8px;
 }
 
 .page-tab {
   padding: 6px 12px;
   min-height: 32px;
 }

 .chat-header {
   height: 55px;
   padding: 0 12px;
 }
 
 .chat-action-btn .material-symbols-outlined { font-size: var(--icon-size-sm); }

 .contacts-header {
   height: 55px;
   padding: 0 12px;
 }
 
 .contacts-search-input { height: 32px; }

 .page-back-btn,
 .profile-settings-btn {
   width: 40px;
   height: 40px;
   border-radius: 12px;
 }

 .settings-header {
   height: 55px;
   padding: 0 12px;
 }
 
 .settings-content {
   padding-top: 70px;
   padding-left: 16px;
   padding-right: 16px;
 }

 .setting-icon {
   font-size: 20px;
   margin-right: 12px;
 }

 .message-bubble { max-width: 85%; }

 .chat-response-content,
 .chat-sources-content {
   padding: 16px;
 }
 
 .source-item {
   padding: 10px;
   gap: 8px;
 }

 .source-number {
   width: 20px;
   height: 20px;
   font-size: 11px;
 }
 
 .source-domain {
   font-size: 13px;
   max-width: calc(100vw - 140px);
 }
 
 .source-url {
   font-size: 11px;
   max-width: calc(100vw - 140px);
 }
 
 .source-link {
   width: 28px;
   height: 28px;
 }
 
 .source-link .material-symbols-outlined {
   font-size: 14px;
 }

 .search-results-header {
   top: 1%;
   min-width: 160px;
   padding: 3px;
 }
 
 .search-results-tab {
   padding: 8px 12px;
   min-height: 36px;
 }
 
 .search-results-tab .material-symbols-outlined {
   font-size: 18px;
 }
 
 .search-content-section {
   padding-top: 5px;
 }
 
 .profile-result-card {
   padding: 12px;
   min-width: 0;
 }
 
 .profile-result-info {
   min-width: 0;
   overflow: hidden;
 }
 
 .profile-result-name {
   font-size: 15px;
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
 }
 
 .profile-result-username {
   font-size: 13px;
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
 }
 
 .profile-result-bio {
   font-size: 12px;
   line-height: 1.3;
   overflow: hidden;
   display: -webkit-box;
   -webkit-line-clamp: 2;
   -webkit-box-orient: vertical;
   white-space: normal;
 }
 
 .post-result-card {
   padding: 12px;
   min-width: 0;
 }
 
 .post-result-title {
   font-size: 15px;
 }
 
 .post-result-description {
   font-size: 13px;
   -webkit-line-clamp: 3;
 }
 
 .post-result-meta {
   font-size: 11px;
   overflow: hidden;
   white-space: nowrap;
   text-overflow: ellipsis;
 }

 .calendar-grid {
   gap: 1px;
   margin: 0;
   padding: 0;
 }
 
 .calendar-header-day {
   padding: 8px 4px;
   font-size: 11px;
   min-width: 0;
 }
 
 .calendar-day {
   min-height: 45px;
   padding: 4px 2px;
   min-width: 0;
 }
 
 .day-number {
   font-size: 12px;
   margin-bottom: 2px;
 }
 
 .event-dot {
   width: 4px;
   height: 4px;
   margin-top: 1px;
 }
 
 #calendarTabContent {
   padding: 0 8px;
   overflow-x: hidden;
 }

 .event-detail-header {
   margin-bottom: 24px;
   padding: 16px 0;
 }
 
 .event-date-title {
   font-size: 24px;
 }
 
 .event-date-subtitle {
   font-size: 14px;
 }
 
 .no-events-message {
   padding: 40px 16px;
 }
 
 .no-events-message .material-symbols-outlined {
   font-size: 48px;
 }
 
 .event-item {
   padding: 16px;
   margin-bottom: 12px;
 }
 
 .form-header {
   padding: 16px 20px;
 }
 
 .form-content {
   padding: 20px;
 }
 
 .input-group {
   margin-bottom: 20px;
 }
 
 .styled-input,
 .styled-textarea {
   padding: 14px 16px;
   font-size: 14px;
 }
 
 .time-row {
   gap: 12px;
 }
 
 .save-event-btn {
   padding: 14px 24px;
   font-size: 15px;
   min-width: 140px;
 }
 
 .form-actions {
   margin-top: 24px;
 }
}

@media (max-width: 480px) {
 .calendar-header-day {
   padding: 6px 2px;
   font-size: 10px;
 }
 
 .calendar-day {
   min-height: 40px;
   padding: 3px 1px;
 }
 
 .day-number {
   font-size: 11px;
 }
 
 #calendarTabContent {
   padding: 0 4px;
 }

 .source-domain {
   max-width: calc(100vw - 120px);
 }
 
 .source-url {
   max-width: calc(100vw - 120px);
 }
}

@media (max-width: 360px) {
 .calendar-grid {
   gap: 0;
 }
 
 .calendar-header-day,
 .calendar-day {
   padding: 4px 1px;
 }
 
 .calendar-header-day {
   font-size: 9px;
 }
 
 .day-number {
   font-size: 10px;
 }
 
 .calendar-day {
   min-height: 35px;
 }
}

/* Enhanced HTML formatting support */
.response-text h1, .response-text h2, .response-text h3, 
.response-text h4, .response-text h5, .response-text h6 {
  color: var(--white-text);
  margin: 20px 0 12px 0;
  font-weight: 600;
  line-height: 1.3;
}

.response-text h1 { 
  font-size: 24px; 
  border-bottom: 2px solid var(--card-border);
  padding-bottom: 8px;
}

.response-text h2 { 
  font-size: 20px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 6px;
}

.response-text h3 { font-size: 18px; }
.response-text h4 { font-size: 16px; }
.response-text h5 { font-size: 15px; }
.response-text h6 { font-size: 14px; }

.response-text center,
.response-text [style*="text-align: center"] {
  display: block;
  text-align: center;
  margin: 12px 0;
}

.response-text u {
  text-decoration: underline;
  text-decoration-color: var(--blue);
}

.response-text [style*="color:"] {
  /* Preserve inline color styles */
}

.response-text [style*="font-family:"] {
  /* Preserve inline font-family styles */
}

.response-text div {
  margin: 8px 0;
}

.response-text div[style*="background"] {
  padding: 12px;
  border-radius: 6px;
  margin: 12px 0;
}

/* Ensure code blocks don't execute */
.response-text pre code {
  display: block;
  white-space: pre-wrap;
  word-wrap: break-word;
  background: var(--card-bg);
  color: var(--white-text);
  border: none;
  border-radius: 4px;
  padding: 12px;
}

/* Security: Ensure no scripts can run */
.response-text script,
.response-text iframe,
.response-text object,
.response-text embed {
  display: none !important;
}

.card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

.pdf-export-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--card-border);
  cursor: pointer;
  transition: var(--transition);
}

.pdf-export-btn:hover {
  background: var(--card-hover);
  border-color: var(--blue);
}

.pdf-export-btn .material-symbols-outlined {
  font-size: 18px;
  color: var(--blue);
  transition: var(--transition);
}

.pdf-export-btn:hover .material-symbols-outlined {
  color: var(--blue);
}

.create-tabs {
  position: absolute;
  top: 1%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--dark-bg);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 4px;
  border: 1px solid var(--dark-border);
  box-shadow: var(--shadow-heavy);
  display: flex;
  position: relative;
  gap: 0;
  width: auto;
  min-width: 120px;
}

.create-tab-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  width: calc(50% - 4px);
  background: var(--blue);
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
}

.create-tab {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  cursor: pointer;
  transition: var(--transition);
  background: transparent;
  border: none;
  border-radius: 8px;
  min-height: 40px;
  flex: 1;
}

.create-tab .material-symbols-outlined {
  font-size: 20px;
  color: var(--light-text);
  transition: var(--transition);
}

.create-tab.active .material-symbols-outlined {
  color: white;
}

.create-tab:hover:not(.active) .material-symbols-outlined {
  color: var(--white-text);
}

.create-tab-content {
  display: none;
  padding-top: 80px;
  text-align: center;
}

.create-tab-content.active {
  display: block;
}

.create-tab-content h2 {
  font-size: 24px;
  color: var(--white-text);
  margin-bottom: 16px;
}

.create-tab-content p {
  font-size: 16px;
  color: var(--light-text);
}

/* --- Post Icon Image Upload UI --- */
.post-icon-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 250px;
    height: 250px;
    border-radius: 20px;
    border: 2px dashed var(--dark-border);
    background: transparent;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    overflow: hidden;
    margin: 40px auto;
}

.post-icon-container:hover {
    border-color: var(--blue);
}

.post-icon {
    position: relative;
    font-size: 100px;
    color: var(--dark-text);
    transition: all 0.3s ease;
    z-index: 1;
}

/* Hide the icon and show the carousel when images are present */
.post-icon-container.has-images .post-icon {
    transform: scale(0.6);
    opacity: 0;
}

.post-images-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: nowrap; /* Forces items into a single row */
    overflow-x: auto; /* Hides the scrollbar */
    -ms-overflow-style: none;      /* IE & Edge */
  scrollbar-width: none;  
    scroll-snap-type: x mandatory; /* Enables snapping to each item */
    -webkit-overflow-scrolling: touch; /* Improves swiping on iOS */
    transition: opacity 0.3s ease;
    transform: translateX(0); /* Start position */
}

.post-images-preview::-webkit-scrollbar {
  display: none;                 /* Chrome, Safari & Opera */
}


/* Show the preview container when images are present */
.post-icon-container.has-images .post-images-preview {
    opacity: 1;
}

.post-preview-item {
    position: relative;
    width: 100%; /* Each item takes up the full width */
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 0; /* Remove border-radius here */
    border: none;
    overflow: hidden;
    flex-shrink: 0; /* Prevents items from shrinking */
    scroll-snap-align: start; /* Snaps to the start of each item */
}

.post-remove-btn {
  pointer-events: auto;
}


.post-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease;
}

.post-remove-btn:hover {
    background: #f44336;
}

.post-images-preview {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
}

.post-preview-item {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
  /* Remove margins and set padding only if needed inside */
}

.post-preview-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 11;
  pointer-events: none; /* So swipes go through */
}
.post-preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  transition: background 0.2s, transform 0.2s;
  pointer-events: auto;
}
.post-preview-dot.active {
  background: var(--blue, #0070FF);
  transform: scale(1.2);
}

.contacts-search-input:focus + .contacts-search-cancel,
.contacts-search-input.has-text + .contacts-search-cancel {
  opacity: 1;
}

.contacts-search-cancel:hover {
  background: var(--card-bg);
  color: var(--white-text);
}

.contacts-search-cancel .material-symbols-rounded {
  font-size: 16px;
}

.sidebar-header {
  height: 60px;
  background: var(--card-hover);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--dark-border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
}

.sidebar-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 240px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  border: 1px solid #666;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.sidebar-toolbar-icons {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Changed from center to space-between */
  width: 100%; /* Make it take full width */
  transition: var(--smooth-transition);
  padding: 0 12px; /* Add horizontal padding */
}

.sidebar-toolbar.search-active .sidebar-toolbar-icons {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.3);
  position: absolute;
}

.sidebar-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.sidebar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-icon-btn.active .material-symbols-outlined {
  color: var(--blue) !important;
}

.sidebar-icon-btn .material-symbols-outlined {
  font-size: 20px;
  color: var(--white-text);
  transition: var(--transition);
}

.sidebar-search-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 16px);
  height: 36px;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--smooth-transition);
}

.sidebar-toolbar.search-active .sidebar-search-box {
  opacity: 1;
  visibility: visible;
}

.sidebar-search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  cursor: pointer;
}

.sidebar-search-icon .material-symbols-outlined {
  font-size: 20px;
  color: var(--blue);
}

.sidebar-search-box input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Merriweather', serif;
  font-size: 14px;
  color: var(--white-text);
  padding: 0 40px 0 16px;
}

.sidebar-search-box input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

[data-theme="light"] .sidebar-search-box input::placeholder {
  color: rgba(26, 26, 26, 0.6); /* Dark placeholder for light theme */
}

/* Mobile responsive */
@media (max-width: 1000px) {
  .sidebar-toolbar {
    max-width: 200px;
    height: 40px;
  }
  
  .sidebar-icon-btn {
    width: 32px;
    height: 32px;
  }
  
  .sidebar-icon-btn .material-symbols-outlined {
    font-size: 18px;
  }
}

.sidebar-content {
  padding: 0;
  color: var(--white-text);
  flex: 1;
  overflow-y: auto;
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 0;
}

.sidebar-chat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Keep content aligned to left */
  justify-content: flex-start;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #666;
  cursor: pointer;
  transition: var(--transition);
  margin: 0 8px;
  border-radius: 8px;
  margin-bottom: 4px;
}

.sidebar-chat-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--blue);
}

.sidebar-chat-item.active {
  background: rgba(0, 112, 255, 0.2);
  border-color: var(--blue);
}

.sidebar-chat-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--white-text);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  text-align: left; /* Explicitly left align */
}

.sidebar-chat-date {
  font-size: 12px;
  color: var(--light-text);
  margin: 0;
  text-align: left; /* Explicitly left align */
  width: 100%;
}

/* Light theme support */
[data-theme="light"] .sidebar-chat-item {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--dark-border);
}

[data-theme="light"] .sidebar-chat-item:hover {
  background: rgba(255, 255, 255, 1);
  border-color: var(--blue);
}

[data-theme="light"] .sidebar-chat-item.active {
  background: rgba(0, 112, 255, 0.15);
  border-color: var(--blue);
}

/* Mobile responsive */
@media (max-width: 1000px) {
  .sidebar-chat-item {
    padding: 10px 12px;
    margin: 0 6px;
    margin-bottom: 8px; /* Increased from 4px to 8px */
  }
  
  .sidebar-chat-name {
    font-size: 13px;
  }
  
  .sidebar-chat-date {
    font-size: 11px;
  }

    .chat-list {
    gap: 2px; /* Add slight gap between items */
    padding: 12px 0; /* More padding top and bottom */
  }
}

.card-bottom-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 12px 20px;
  background: transparent; /* Removed background */
  /* Removed border-top */
}

.copy-response-btn,
.share-response-btn,
.pdf-export-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; /* Smaller button size */
  height: 32px;
  border-radius: 50%; /* Round buttons look cleaner */
  background: transparent; /* Transparent background */
  border: none; /* No border */
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.copy-response-btn:hover,
.share-response-btn:hover,
.pdf-export-btn:hover {
  background: rgba(255, 255, 255, 0.1); /* Subtle hover background */
  transform: translateY(-1px);
}

.copy-response-btn .material-symbols-outlined,
.share-response-btn .material-symbols-outlined,
.pdf-export-btn .material-symbols-outlined {
  font-size: 16px; /* 50% smaller than before (was 20px, now 16px) */
  color: var(--light-text);
  transition: var(--transition);
}

.copy-response-btn:hover .material-symbols-outlined,
.share-response-btn:hover .material-symbols-outlined,
.pdf-export-btn:hover .material-symbols-outlined {
  color: var(--blue);
}

/* Light theme hover */
[data-theme="light"] .copy-response-btn:hover,
[data-theme="light"] .share-response-btn:hover,
[data-theme="light"] .pdf-export-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .card-bottom-actions {
    padding: 8px 16px;
    gap: 16px;
  }
  
  .copy-response-btn,
  .share-response-btn,
  .pdf-export-btn {
    width: 28px;
    height: 28px;
  }
  
  .copy-response-btn .material-symbols-outlined,
  .share-response-btn .material-symbols-outlined,
  .pdf-export-btn .material-symbols-outlined {
    font-size: 14px; /* Even smaller on mobile */
  }
}

.share-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.share-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.share-modal {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  height: 70vh;
  background: var(--card-bg);
  border-radius: 20px 20px 0 0; /* Rounded top corners, sharp bottom */
  box-shadow: var(--shadow-heavy);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.share-modal-overlay.active .share-modal {
  transform: translateX(-50%) translateY(0);
}

.share-modal-header {
  padding: 20px;
  border-bottom: 1px solid var(--card-border);
  background: var(--card-hover);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.share-search-container {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid var(--card-border);
  height: 44px;
  flex: 1;
}

.share-send-btn {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #0070FF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.share-send-btn:hover {
  background: #0056CC;
  transform: scale(1.05);
}

.share-send-btn .material-symbols-outlined {
  font-size: 20px;
  color: white;
}

/* Mobile responsive */
@media (max-width: 1000px) {
  .share-modal-header {
    padding: 16px;
    gap: 10px;
  }
  
  .share-send-btn {
    width: 35px;
    height: 35px;
  }
  
  .share-send-btn .material-symbols-outlined {
    font-size: 18px;
  }
}

.share-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--white-text);
  font-family: 'Merriweather', serif;
  font-size: 15px;
  padding: 0 16px 0 20px;
  height: 100%;
}

.share-search-input::placeholder {
  color: var(--dark-text);
}

.share-search-cancel {
  position: absolute;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
}

.share-search-input:focus + .share-search-cancel,
.share-search-input:not(:placeholder-shown) + .share-search-cancel {
  opacity: 1;
  visibility: visible;
}

.share-search-cancel:hover {
  background: var(--card-hover);
}

.share-search-cancel .material-symbols-rounded {
  font-size: 18px;
  color: var(--light-text);
}

.share-modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.share-contacts-list {
  padding: 16px 0;
}

.share-contact-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.share-contact-item:hover {
  background: var(--card-hover);
}

.share-contact-item:last-child {
  border-bottom: none;
}

.share-contact-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 18px;
  margin-right: 16px;
  flex-shrink: 0;
}

.share-contact-info {
  flex: 1;
  min-width: 0;
}

.share-contact-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--white-text);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-contact-username {
  font-size: 14px;
  color: var(--blue);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Responsive design */
@media (min-width: 1001px) {
  .share-modal {
    width: 60vw;
    max-width: 600px;
  }
}

@media (max-width: 1000px) {
  .share-modal {
    width: 100vw;
    left: 0;
    transform: translateY(100%);
  }
  
  .share-modal-overlay.active .share-modal {
    transform: translateY(0);
  }
  
  .share-modal-header {
    padding: 16px;
  }
  
  .share-contact-item {
    padding: 10px 16px;
  }
  
  .share-contact-avatar {
    width: 44px;
    height: 44px;
    font-size: 16px;
    margin-right: 12px;
  }
  
  .share-contact-name {
    font-size: 15px;
  }
  
  .share-contact-username {
    font-size: 13px;
  }
}

/* Light theme support */
[data-theme="light"] .share-modal,
[data-theme="light"] .share-modal-header {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

[data-theme="light"] .share-search-container {
  background: var(--bg);
}

[data-theme="light"] .share-contact-item:hover {
  background: var(--card-hover);
}

.selected-profiles-container {
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  padding: 12px 0;
}

.selected-profiles-scroll {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  padding: 0 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}

.selected-profiles-scroll::-webkit-scrollbar {
  display: none;
}

.selected-profile-item {
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: var(--transition);
}

.selected-profile-item:hover {
  transform: scale(1.05);
}

.selected-profile-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  border: 2px solid var(--card-border);
}

.selected-profile-remove {
  position: absolute;
  top: -4px;
  right: -12px;
  width: 18px;
  height: 18px;
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 2;
}

.selected-profile-remove:hover {
  background: transparent;
  transform: scale(1.1);
}

.selected-profile-remove .material-symbols-outlined {
  font-size: 20px;
  color: var(--blue);
}

/* Mobile responsive */
@media (max-width: 1000px) {
  .selected-profiles-scroll {
    padding: 0 16px;
    gap: 30px;
  }
  
  .selected-profile-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  
  .selected-profile-remove {
    width: 16px;
    height: 16px;
    top: -3px;
    right: -12px;
  }
  
  .selected-profile-remove .material-symbols-outlined {
    font-size: 20px;
  }
}

.post-result-card {
  background: transparent;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--card-border);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  gap: 16px;
  min-height: 120px;
}

.post-result-card:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}

.post-content-section {
  flex: 0 0 60%;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.post-result-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--white-text);
  margin: 0 0 8px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.post-result-description {
  font-size: 14px;
  color: var(--light-text);
  margin: 0 0 12px 0;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  flex: 1;
}

.post-result-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--dark-text);
  margin-top: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-images-container {
  flex: 0 0 40%;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
  display: flex;
  flex-direction: column;
}

.post-images-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
}

.post-images-scroll::-webkit-scrollbar {
  display: none;
}

.post-image-item {
  flex: 0 0 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  scroll-snap-align: start;
  min-height: 100px;
}

.post-image-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.post-image-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
}

.post-image-dot.active {
  background: var(--blue);
  transform: scale(1.3);
}

.post-image-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

.post-images-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--dark-text);
  gap: 8px;
}

.post-images-placeholder .material-symbols-outlined {
  font-size: 32px;
  color: var(--dark-text);
}

.post-images-placeholder span:last-child {
  font-size: 12px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .post-result-card {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }
  
  .post-content-section {
    flex: none;
  }
  
  .post-images-container {
    flex: none;
    height: 150px;
  }
  
  .post-result-title {
    font-size: 15px;
    white-space: normal;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .post-result-description {
    -webkit-line-clamp: 2;
  }
  
  .post-result-meta {
    font-size: 11px;
    flex-wrap: wrap;
  }
}

@keyframes chatStreamingPulse {
 0%, 80%, 100% { 
   transform: scale(0.8);
   opacity: 0.5;
 }
 40% { 
   transform: scale(1);
   opacity: 1;
 }
}

/* Search loading spinner */
.search-loading-spinner {
 position: fixed;
 top: 50%;
 left: 50%;
 transform: translate(-50%, -50%);
 z-index: 1000;
 display: none;
}

.search-loading-spinner.visible {
 display: block;
}

.spinner-ring {
 width: 40px;
 height: 40px;
 border: 2px solid transparent;
 border-top: 2px solid var(--blue);
 border-radius: 50%;
 animation: spin 0.8s linear infinite;
}

@keyframes spin {
 0% { transform: rotate(0deg); }
 100% { transform: rotate(360deg); }
}

.bookmark-response-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.bookmark-response-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.bookmark-response-btn .material-symbols-outlined {
  font-size: 16px;
  color: var(--light-text);
  transition: var(--transition);
}

.bookmark-response-btn:hover .material-symbols-outlined,
.bookmark-response-btn.saved .material-symbols-outlined {
  color: var(--blue);
}

.bookmark-response-btn.saved .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 0, 'opsz' 40;
}

/* Light theme hover */
[data-theme="light"] .bookmark-response-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.sidebar-chat-item {
  padding: 8px 12px;
  border-bottom: 1px solid var(--dark-border);
  cursor: pointer;
}

.sidebar-chat-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--white-text);
  margin-bottom: 4px;
}

.sidebar-chat-meta {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--light-text);
}

.sidebar-chat-delete {
  font-size: 15px !important;
  color: var(--blue);
  cursor: pointer;
  flex-shrink: 0;
}

.crowdsource-stylus-btn {
  position: fixed;
  top: 1%;
  right: 1%;
  width: var(--btn-size-lg);
  height: var(--btn-size-lg);
  border-radius: 14px;
  background: transparent;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 300;
}

.crowdsource-stylus-btn.visible { display: flex; }

.crowdsource-stylus-btn .material-symbols-outlined {
  font-size: var(--icon-size-lg);
  color: var(--blue);
}

.add-event-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.add-event-modal-overlay.active {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.add-event-form {
  background: var(--card-bg);
  border-radius: 20px;
  border: 1px solid var(--card-border);
  overflow: hidden;
  max-width: 500px;
  width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  margin: 0;
}

.add-event-modal-overlay:not(.active) .add-event-form {
  transform: scale(0.9);
  opacity: 0;
}

.code-block-container {
  margin: 16px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
}

.code-block-header {
  background: var(--card-hover);
  border-bottom: 1px solid var(--card-border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--white-text);
}

.code-block-header .material-symbols-outlined {
  font-size: 18px;
  color: var(--blue) !important;
}

.code-block-content {
  position: relative;
  overflow: hidden;
}

.code-block-content pre {
  margin: 0;
  padding: 0px;
  background: var(--card-bg);
  border: none;
  border-radius: 0;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.5;
}

.code-block-content code {
  background: none;
  padding: 0;
  border: none;
  color: var(--white-text);
  font-family: inherit;
}

/* Table styling improvements */
.response-text table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 16px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
}

.response-text th {
  background: var(--blue);
  color: white;
  padding: 12px 16px;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--blue);
}

.response-text td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--card-border);
  color: var(--light-text);
}

.response-text tr:hover td {
  background: var(--card-hover);
  color: var(--white-text);
}

.response-text tr:last-child td {
  border-bottom: none;
}

.post-title-section {
  margin: 16px 0;
  width: 100%;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-title-section textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--white-text);
  font-size: 14px;
  font-family: 'Merriweather', serif;
  outline: none;
  transition: var(--transition);
  resize: none;
  min-height: 44px;
  line-height: 1.4;
  overflow: hidden;
}

.post-title-section textarea:focus {
  border-color: var(--blue);
}

.post-title-section textarea::placeholder {
  color: var(--dark-text);
}

.post-title-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.post-title-counter {
  font-size: 11px;
  color: var(--dark-text);
}

.post-submit-btn {
  width: 36px;
  height: 36px;
  background: var(--blue);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.post-submit-btn:hover {
  background: var(--blue-hover);
  transform: scale(1.05);
}

.post-submit-btn .material-symbols-outlined {
  font-size: 20px;
  color: white;
}

.post-detail-location{
  display: flex;
  justify-content: space-between;
}

/* Home Feed Styles - Fixed fullscreen with padding */
.home-feed-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  z-index: 1;
}

.home-feed-scroll {
  width: 50%;
  max-width: 700px;
  min-width: 320px;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 80px 16px;
  box-sizing: border-box;
  /* Hide scrollbars */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.home-feed-scroll::-webkit-scrollbar {
  display: none;
}

.feed-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--light-text);
  text-align: center;
}



.feed-image-dot.active {
  background: var(--white-text);
}

.feed-post-content {
  padding: 16px;
}

.feed-post-meta {
  margin-top: 0px;
  font-size: 12px;
  color: var(--dark-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.feed-post-location {
  display: flex;
  align-items: center;
  gap: 4px;
}

.feed-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--dark-text);
  text-align: center;
}

.feed-empty-icon {
  font-size: 64px;
  color: var(--blue);
  margin-bottom: 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .home-feed-scroll {
    width: 90%;
    padding: 80px 12px;
  }
  
  .feed-post-images {
    height: 250px;
  }
}

@media (max-width: 480px) {
  .home-feed-scroll {
    width: 100%;
    padding: 80px 8px;
  }
}

/* Add this to your existing .response-text styles in styles.css */

.response-text blockquote {
  border-left: 4px solid var(--blue);
  margin: 16px 0;
  padding: 12px 16px;
  background: var(--card-hover);
  border-radius: 0 8px 8px 0;
  color: var(--light-text);
  font-style: italic;
  position: relative;
}

.response-text blockquote::before {
  content: '"';
  position: absolute;
  top: -8px;
  left: 12px;
  font-size: 32px;
  color: var(--blue);
  line-height: 1;
}

/* Ensure blockquotes work well on mobile */
@media (max-width: 768px) {
  .response-text blockquote {
    margin: 12px 0;
    padding: 10px 12px;
  }
  
  .response-text blockquote::before {
    font-size: 28px;
    top: -6px;
    left: 8px;
  }
}

.code-block-container {
  margin: 16px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  display: block; /* Add this */
}

.code-block-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--white-text);
  min-height: 32px;
  margin: 0;
  line-height: 1;
}

.code-block-content {
  position: relative;
  overflow-x: auto; /* Add horizontal scroll */
  overflow-y: hidden; /* Prevent vertical scroll */
  margin: 0;
  padding: 0;
  scrollbar-width: none; /* Hide Firefox scrollbar */
  -ms-overflow-style: none; /* Hide IE scrollbar */
}

.code-block-content::-webkit-scrollbar {
  display: none; /* Hide Chrome/Safari scrollbar */
}

.code-block-content pre {
  margin: 0 !important;
  padding: 12px 16px !important;
  background: var(--card-bg);
  border: none;
  border-radius: 0;
  overflow: visible; /* Let parent handle overflow */
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre; /* Prevent wrapping */
  min-width: max-content; /* Ensure full width */
}

.code-block-header .material-symbols-outlined {
  font-size: 16px; /* Reduced from 18px */
  color: var(--blue) !important;
}

.code-block-content code {
  background: none !important;
  padding: 0 !important;
  border: none !important;
  color: var(--white-text);
  font-family: inherit;
  margin: 0; /* Ensure no margin */
}

/* Remove wrapper div from tables */
.markdown-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 16px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
}

/* Remove the old table wrapper styles */
.markdown-table-wrapper {
  /* This class is no longer used */
  display: none;
}

/* Add horizontal rule styling */
.response-text hr {
  border: none;
  height: 1px;
  background: var(--card-border);
  margin: 20px 0;
}

/* Add strikethrough styling */
.response-text del {
  color: var(--dark-text);
  text-decoration: line-through;
}

.code-copy-btn {
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  color: var(--light-text);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 11px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.code-copy-btn:hover {
  background: var(--card-bg);
  border-color: var(--blue);
  color: var(--blue);
}

.code-copy-btn .material-symbols-outlined {
  font-size: 14px;
}

.table-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  margin: 16px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.table-wrapper::-webkit-scrollbar {
  display: none;
}

.markdown-table {
  width: 100%;
  min-width: max-content; /* This forces the table to take its natural width */
  border-collapse: separate;
  border-spacing: 0;
  margin: 0; /* Remove margin since wrapper handles it */
  border-radius: 0; /* Remove since wrapper has border-radius */
  overflow: visible; /* Let wrapper handle overflow */
  border: none; /* Wrapper handles border */
  background: transparent; /* Wrapper handles background */
}

.markdown-table thead th {
  background: var(--blue);
  color: white;
  font-weight: 600;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 2px solid var(--blue);
  position: sticky;
  top: 0;
  white-space: nowrap; 
}

.markdown-table tbody td {
  padding: 12px 16px;
  color: var(--light-text);
  border-bottom: 1px solid var(--card-border);
  transition: all 0.2s ease;
  white-space: nowrap; 
}

.markdown-table tbody tr:hover {
  background: var(--card-hover);
  transform: none; 
}

.markdown-table tbody tr:last-child td {
  border-bottom: none;
}

:root {
  --mood-icon-color: #ffffff; 
  --mood-text-color: #ffffff; 
}

[data-theme="light"] {
  --mood-icon-color: #1f2937; 
  --mood-text-color: #1f2937; 
}

.mood-like-btn .material-symbols-outlined,
.mood-chat-btn .material-symbols-outlined {
  color: var(--mood-icon-color) !important;
}

.mood-like-btn:hover .material-symbols-outlined {
  color: #e91e63;
}

.mood-chat-btn:hover .material-symbols-outlined {
  color: var(--blue) !important;
}

/* If you need to fix other specific icons, target them individually like: */
.some-other-component .material-symbols-outlined {
  color: var(--mood-icon-color);
}

/* Active page state for search and chat icons (when on that page but not expanded) */
.search-box.active-page:not(.active) .search-icon .material-symbols-rounded,
.chat-box.active-page:not(.active) .chat-icon .material-symbols-outlined {
  color: var(--blue) !important;
}

.mention-suggestions {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 190px;
  height: 50px;
  overflow: hidden;
  background: var(--blue);
  border-radius: 10px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  padding: 2px 0;
}

.mention-suggestions-scroll {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch; /* Add this line */
}

.mention-suggestions-scroll::-webkit-scrollbar {
  display: none;
}

.mention-suggestions.visible {
  opacity: 1;
  visibility: visible;
}

.mention-suggestion-item {
  min-width: 190px;
  max-width: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: white;
  scroll-snap-align: center;
  flex-shrink: 0;
  padding: 0 16px;
  cursor: pointer;
}

.mention-suggestion-item.special {
  background: var(--blue);
  color: white;
}

.mention-suggestion-item.special:hover {
  background: #4a6fd4;
}

.mention-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgb(0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.mention-dots {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.mention-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(94, 130, 240, 0.3);
  cursor: pointer;
  transition: var(--transition);
}

.mention-dot.active {
  background: white;
}

/* CSS Override - Add this to the end of styles.css */

/* Apply mobile-style icon hiding to ALL screen sizes */
@media (min-width: 769px) {
  .toolbar.search-active .toolbar-icons .icon-btn,
  .toolbar.search-active .toolbar-icons .search-box:not(.active),
  .toolbar.search-active .toolbar-icons .chat-box:not(.active) {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.3);
    transition: var(--smooth-transition);
    position: absolute;
  }
  
  /* Force toolbar to expand smoothly */
  .toolbar {
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  }
  
  .toolbar.search-active {
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
  }
  
  /* Remove delays and simplify transitions */
  .search-box.active {
    width: calc(50vw - 32px) !important;
    min-width: 368px !important;
    max-width: 568px !important;
    background: transparent !important;
    border: none !important;
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  }
  
  .chat-box.active {
    width: calc(50vw - 32px) !important;
    min-width: 368px !important;
    max-width: 568px !important;
    background: transparent !important;
    border: none !important;
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  }
}

@media (min-width: 1001px) {
  .toolbar.search-active {
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
  }
  
  .search-box.active {
    width: calc(40vw - 32px) !important;
    min-width: 468px !important;
    max-width: 768px !important;
    background: transparent !important;
    border: none !important;
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  }
  
  .chat-box.active {
    width: calc(40vw - 32px) !important;
    min-width: 468px !important;
    max-width: 768px !important;
    background: transparent !important;
    border: none !important;
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  }
}

.chat-header {
  position: relative;
  overflow: hidden; /* This will contain the sliding elements */
}

.chat-header-normal {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease;
  transform: translateX(0);
  opacity: 1;
}

.chat-header-normal.hidden {
  transform: translateX(-100%);
  opacity: 0;
}

.chat-header-toolbar {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}

.chat-header-toolbar.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.toolbar-back-section {
  padding-left: 16px;
  margin-right: auto; /* This pushes the actions section to the right */
}

.toolbar-actions-section {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 8px; /* Add gap between icons */
  padding-right: 16px;
  margin-left: auto; /* This ensures it stays right-aligned */
}

.toolbar-back-btn,
.toolbar-btn {
  width: var(--btn-size-sm);
  height: var(--btn-size-sm);
  background: transparent;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toolbar-back-btn:hover,
.toolbar-btn:hover {
  background: #4a4a4a;
  transform: scale(1.05);
}

.toolbar-back-btn .material-symbols-outlined,
.toolbar-btn .material-symbols-outlined {
  font-size: var(--icon-size-sm);
  color: var(--blue);
}

.chat-expand-btn {
  width: var(--btn-size-sm);
  height: var(--btn-size-sm);
  background: transparent;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.2s ease;
}

.chat-expand-btn:hover {
  background: #4a4a4a;
  transform: scale(1.05);
}

.chat-expand-btn .material-symbols-outlined {
  font-size: var(--icon-size-sm);
  color: var(--blue);
}

.chat-expand-icon {
  width: 35px;
  height: 35px;
  object-fit: contain;
}

.chat-contact-status-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.presence-robot {
  width: 20px;
  height: 20px;
  object-fit: contain;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.5s ease-in-out;
  z-index: 2;
  border-radius: 50%;
  background-color: transparent; /* Fallback if image fails */
}

.presence-robot.show {
  opacity: 1;
  transform: translateX(0);
  filter: drop-shadow(0 0 4px rgba(76, 175, 80, 0.3));
}

/* Notification Page Styles */
.notifications-feed-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  /* padding: 20px 16px; */
}

.notification-card-item {
  background-color: transparent;
  width: 100%;
  margin-bottom: 30px;
  font-family: 'Merriweather', serif;
}

.notification-top-section {
  display: flex;
  width: 100%;
}

.notification-user-tag {
  background-color: transparent;
  color: var(--blue);
  padding: 10px;
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
}

.notification-actions-area {
  padding: 10px;
  width: calc(50% - 1px);
  color: var(--white-text);
  border-top-right-radius: 12px;
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(20px) saturate(200%);
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.notification-action-icon {
  font-size: 20px;
  color: var(--white-text);
  cursor: pointer;
  transition: var(--transition);
}

.notification-action-icon:hover {
  color: var(--blue);
  transform: scale(1.1);
}

.notification-message-area {
  padding: 16px;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  border-top-left-radius: 12px;
  backdrop-filter: blur(20px) saturate(200%);
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white-text);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 15px;
  line-height: 1.5;
}

/* Light theme support */
[data-theme="light"] .notification-actions-area {
  background: rgb(255, 255, 255);
  color: var(--white-text);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  border-right: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .notification-message-area {
  background: rgba(255,255,255);
  color: var(--white-text);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .notifications-feed-container {
    /* padding: 16px 12px; */
  }
  
  .notification-card-item {
    margin-bottom: 24px;
  }
  
  .notification-user-tag {
    font-size: 15px;
    padding: 8px;
  }
  
  .notification-actions-area {
    padding: 8px;
  }
  
  .notification-message-area {
    padding: 12px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .notifications-feed-container {
    /* padding: 12px 8px; */
  }
  
  .notification-card-item {
    margin-bottom: 20px;
  }
  
  .notification-user-tag {
    font-size: 15px;
  }
  
  .notification-message-area {
    font-size: 15px;
  }
}

.camera-container {
  width: 100%;
  max-width: 300px;
  margin: 20px auto;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  aspect-ratio: 4/3;
  display: none;
}

.camera-container.active { display: block; }

.camera-container video, .camera-container canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-controls {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 20px 0;
}

.camera-capture-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--blue);
  border: none;
  cursor: pointer;
  color: white;
}

.camera-retry-btn, .photo-submit-btn {
  background: var(--blue);
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  color: white;
  cursor: pointer;
}

.photo-title-section {
  margin: 20px 16px;
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
}

.photo-title-section textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--light-text);
  resize: none;
  margin-bottom: 12px;
}

/* User Profile Styles */
.user-profile-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: var(--bg);
}

.user-profile-wrapper::-webkit-scrollbar {
  display: none;
}

.profile-header {
  height: 50vh;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  background-color: var(--blue);
}

.profile-overlay {
  width: 100%;
  height: 40%;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  padding: 0 20px;
  
  /* Add mask for smooth fade */
  -webkit-mask: linear-gradient(to bottom, 
    rgba(0,0,0,0) 0%, 
    rgba(0,0,0,0.3) 20%, 
    rgba(0,0,0,1) 40%, 
    rgba(0,0,0,1) 100%
  );
  mask: linear-gradient(to bottom, 
    rgba(0,0,0,0) 0%, 
    rgba(0,0,0,0.3) 20%, 
    rgba(0,0,0,1) 40%, 
    rgba(0,0,0,1) 100%
  );
}

.profile-overlay h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 600;
}

.profile-overlay p {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
  font-style: italic;
}

.profile-posts {
  min-height: 50vh;
  background: var(--bg);
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.loading-posts, .no-posts {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--light-text);
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.user-post-card {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--card-border);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  aspect-ratio: 1;
}

.user-post-card:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}

.user-post-image {
  width: 100%;
  height: calc(100% - 40px);
  background: var(--card-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.user-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-post-placeholder {
  font-size: 48px;
  color: var(--dark-text);
}

.user-post-title {
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--white-text);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive */
@media (min-width: 1001px) {
  .user-profile-wrapper {
    width: 50%;
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 768px) {
  .profile-posts {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding: 16px;
  }
  
  .profile-overlay h2 {
    font-size: 20px;
  }
  
  .profile-overlay p {
    font-size: 13px;
  }
}

.feed-post-actions {
  display: flex;
  gap: 3px;
  margin-top: 5px;
  padding-top: 8px;
}

.post-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.2s;
  color: var(--light-text);
}

.post-action-btn:hover {
  background: var(--card-hover);
}

.post-action-btn.liked {
  color: #f44336;
  background: rgba(244, 67, 54, 0.1);
}

.interactions-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.interactions-modal.active {
  opacity: 1;
}

.interactions-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  cursor: pointer;
}

.interactions-content {
  position: relative;
  background: var(--card-bg);
  margin: 50px auto 0;
  width: 90%;
  max-width: 500px;
  max-height: 70vh;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  overflow: hidden;
}

.interactions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--card-border);
}

.interactions-tabs {
  display: flex;
  gap: 8px;
}

.interactions-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  background: transparent;
  color: var(--light-text);
  cursor: pointer;
  transition: all 0.2s;
}

.interactions-tab.active {
  background: var(--blue);
  color: white;
}

.interactions-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  color: var(--light-text);
}

.interactions-body {
  max-height: 400px;
  overflow-y: auto;
}

.interactions-tab-content {
  display: none;
  padding: 16px;
}

.interactions-tab-content.active {
  display: block;
}

.interaction-user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.interaction-user-item:hover {
  background: var(--card-hover);
}

.interaction-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}

.interaction-comment-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--card-border);
}

.interaction-comment-item:last-child {
  border-bottom: none;
}

.interaction-comment-content {
  flex: 1;
}

.interaction-comment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.interaction-user-name {
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
}

.interaction-comment-time {
  font-size: 12px;
  color: var(--dark-text);
}

.interaction-comment-text {
  color: var(--light-text);
  line-height: 1.4;
}

.interactions-tabs-header {
  display: flex;
  gap: 8px;
}

.interaction-tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  background: transparent;
  color: var(--light-text);
  cursor: pointer;
  transition: all 0.2s;
}

.interaction-tab-btn.active {
  background: var(--card-hover);
}

.post-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s;
  width: 36px;
  height: 36px;
}

.like-icon {
  color: #f44336;
}

.comment-icon {
  color: #2196f3;
}

.post-action-icon:hover {
  background: var(--card-hover);
}

.post-action-icon.liked {
  background: rgba(244, 67, 54, 0.1);
}

.post-action-count {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 2px;
  border-radius: 12px;
  transition: all 0.2s;
  color: var(--light-text);
  font-size: 14px;
}

.post-action-count:hover {
  background: var(--card-hover);
}

.likes-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
}

.likes-modal .modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
}

.likes-modal .modal-content {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-bg);
  border-radius: 16px 16px 0 0;
  height: 90vh;
  width: 100%;
  animation: slideUp 0.3s ease;
}

@media (min-width: 1001px) {
  .likes-modal .modal-content {
    width: 60%;
  }
}

@keyframes slideUp {
  from { transform: translateX(-50%) translateY(100%); }
  to { transform: translateX(-50%) translateY(0); }
}

.likes-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--card-border);
  font-weight: 600;
}

.likes-modal .modal-header button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  color: var(--light-text);
}

.likes-modal .modal-body {
  height: calc(90vh - 60px);
  overflow-y: auto;
  padding: 16px;
}

.like-user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.like-user-item:hover {
  background: var(--card-hover);
}

.like-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}

.like-user-info {
  flex: 1;
}

.like-user-name {
  font-weight: 600;
  color: var(--white-text);
  margin-bottom: 2px;
}

.like-user-username {
  font-size: 14px;
  color: var(--light-text);
}

.comments-modal {
  background: var(--card-hover);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
}

.comments-modal .modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
}

.comments-modal .modal-content {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-bg);
  border-radius: 16px 16px 0 0;
  height: 90vh;
  width: 100%;
  animation: slideUp 0.3s ease;
  display: flex;
  flex-direction: column;
}

@media (min-width: 1001px) {
  .comments-modal .modal-content {
    width: 60%;
  }
}

.comments-modal .modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.comment-input-section {
  padding: 8px;
  background: transparent;
  border: none;
}

.comment-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-hover);
  border-radius: 25px;
  padding: 2px;
  border: 1px solid var(--card-border);
}

.comment-input-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--white-text);
  font-size: 14px;
}

.comment-input-wrapper button {
  background: #2196f3;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.comment-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  margin-bottom: 5px;
}

.comment-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.comment-user-name {
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
}

.comment-time {
  font-size: 12px;
  color: var(--dark-text);
}

.comment-text {
  color: var(--light-text);
  line-height: 1.4;
}

/* === FEED POST ACTION STYLES === */
.feed-like-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s;
  width: 36px;
  height: 36px;
}

.feed-comment-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s;
  width: 36px;
  height: 36px;
}

.feed-like-btn .material-symbols-rounded,
.feed-comment-btn .material-symbols-rounded {
  color: #888888 !important;
  font-size: 20px;
}

.feed-like-count,
.feed-comment-count {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 2px;
  border-radius: 12px;
  transition: all 0.2s;
  color: #888888 !important;
  font-size: 14px;
}

.mood-like-btn:hover,
.mood-comment-btn:hover,
.feed-like-btn:hover,
.feed-comment-btn:hover {
  background: transparent;
}

.mood-like-btn:hover .material-symbols-rounded,
.mood-comment-btn:hover .material-symbols-rounded,
.feed-like-btn:hover .material-symbols-rounded,
.feed-comment-btn:hover .material-symbols-rounded {
  color: var(--blue);
}

.feed-like-count:hover,
.feed-comment-count:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Add filled state for liked posts */
.feed-like-btn.liked .material-symbols-rounded {
  font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 0, 'opsz' 40 !important;
  color: #f44336 !important;
}

.mood-like-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s;
  width: 36px;
  height: 36px;
}

.mood-comment-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s;
  width: 36px;
  height: 36px;
}

.mood-like-btn .material-symbols-rounded,
.mood-comment-btn .material-symbols-rounded {
  color: #888888 !important;
  font-size: 20px;
}

.mood-like-count,
.mood-comment-count {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 2px;
  border-radius: 12px;
  transition: all 0.2s;
  color: #888888 !important;
  font-size: 14px;
}

.mood-like-count:hover,
.mood-comment-count:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mood-like-btn.liked .material-symbols-rounded {
  font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 0, 'opsz' 40 !important;
  color: #f44336 !important;
}

[data-theme="light"] .mood-card {
  background: rgba(255, 255, 255) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .mood-card .header,
[data-theme="light"] .mood-card .content-text,
[data-theme="light"] .mood-card .timestamp {
  color: black !important;
}

[data-theme="light"] .mood-card .profile-info div,
[data-theme="light"] .mood-card .profile-info span {
  color: black !important;
}

[data-theme="light"] .mood-card .action-icons .material-symbols-outlined {
  color: rgba(0,0,0,0.6) !important;
}

[data-theme="light"] .mood-card .mood-like-btn.liked .material-symbols-outlined {
  color: #f44336 !important;
}

.feed-image-dashes {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 10;
}

.feed-image-dash {
  height: 2px;
  border-radius: 1px;
  transition: all 0.2s;
  cursor: pointer;
}

.feed-post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px 16px;
}

.feed-post-user {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.feed-post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  font-weight: 600;
  color: white;
  font-size: 16px;
}

.feed-post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.feed-post-user-info {
  flex: 1;
  min-width: 0;
}

.feed-post-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--white-text);
  margin: 0 0 2px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-post-username {
  font-size: 12px;
  color: var(--light-text);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-post-bond-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 20px;
  padding: 6px 12px;
  flex-shrink: 0;
}

.feed-post-bond-pill .material-symbols-outlined {
  font-size: 14px;
  color: white !important;
}

.feed-post-bond-pill span:last-child {
  font-size: 12px;
  font-weight: 500;
  color: white !important;
}

.feed-post-actions {
  padding: 0 16px 12px 16px;
}

.feed-post-content {
  padding: 0 16px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .feed-post-header {
    padding: 12px 12px 8px 12px;
  }
  
  .feed-post-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  
  .feed-post-name {
    font-size: 13px;
  }
  
  .feed-post-username {
    font-size: 11px;
  }
  
  .feed-post-bond-pill {
    padding: 4px 8px;
  }
  
  .feed-post-bond-pill .material-symbols-outlined {
    font-size: 12px;
  }
  
  .feed-post-bond-pill span:last-child {
    font-size: 11px;
  }
  
  .feed-post-actions {
    padding: 0 12px 8px 12px;
  }
  
  .feed-post-content {
    padding: 0 12px;
  }
}

/* Notifications Container */
.notifications-feed-container {
  padding: 16px;
  max-height: 100%;
  overflow-y: auto;
}

/* Notification Cards */
.notification-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.notification-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), #8b5cf6, #f59e0b);
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Bond Request Specific Styling */
.bond-request-card {
  border-left: 3px solid #ff3333;
}

.bond-request-card::before {
  background: linear-gradient(90deg, #ff3333, #ff6b6b, #ffa8a8);
}

/* Notification Avatar */
.notification-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.bond-request-card .notification-avatar {
  background: linear-gradient(135deg, #ff3333, #ff6b6b);
}

.notification-avatar span {
  color: white;
  font-size: 24px;
  font-weight: 600;
}

.notification-avatar::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.3));
  z-index: -1;
}

/* Notification Content */
.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-text {
  color: var(--white-text);
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 8px;
  word-wrap: break-word;
  font-weight: 500;
}

.notification-time {
  color: var(--dark-text);
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 12px;
}

/* Notification Actions */
.notification-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.notification-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.notification-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.accept-btn {
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: white;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.accept-btn:hover {
  background: linear-gradient(135deg, #45a049, #4caf50);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.decline-btn {
  background: linear-gradient(135deg, #f44336, #d32f2f);
  color: white;
  border: 1px solid rgba(244, 67, 54, 0.3);
}

.decline-btn:hover {
  background: linear-gradient(135deg, #d32f2f, #f44336);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.notification-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.notification-btn span {
  font-size: 16px;
}

/* Empty States */
.notifications-empty-state,
.notifications-error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  color: var(--dark-text);
}

.notifications-empty-state span,
.notifications-error-state span {
  font-size: 64px;
  color: var(--blue);
  margin-bottom: 16px;
  display: block;
  opacity: 0.7;
}

.notifications-error-state span {
  color: #f44336;
}

.notifications-empty-state p,
.notifications-error-state p {
  font-size: 16px;
  margin: 8px 0;
  color: var(--light-text);
}

/* Notification Success States */
.notification-btn.success {
  background: linear-gradient(135deg, #4caf50, #66bb6a);
  pointer-events: none;
}

.notification-btn.declined {
  background: linear-gradient(135deg, #9e9e9e, #757575);
  pointer-events: none;
}

.notification-card.new {
  animation: pulse 2s;
}

.notification-card {
  animation: slideInRight 0.5s ease;
}

/* Responsive Design */
@media (max-width: 480px) {
  .notification-card {
    padding: 12px;
    margin-bottom: 8px;
  }
  
  .notification-avatar {
    width: 40px;
    height: 40px;
  }
  
  .notification-avatar span {
    font-size: 20px;
  }
  
  .notification-actions {
    flex-direction: column;
    gap: 6px;
  }
  
  .notification-btn {
    padding: 10px 14px;
    font-size: 12px;
  }
}

/* Glassmorphism Effect Enhancement */
@supports (backdrop-filter: blur(20px)) {
  .notification-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
}

/* Dark theme specific adjustments */
@media (prefers-color-scheme: dark) {
  .notification-card {
    border-color: rgba(255, 255, 255, 0.15);
  }
}

/* User Profile Page */
.user-profile-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--dark-bg);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  overflow-y: auto;
}

.user-profile-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.user-profile-modal {
  width: 100%;
  min-height: 100vh;
  background: var(--dark-bg);
  display: flex;
  flex-direction: column;
  max-width: 50%;
  margin: 0 auto;
}

@media (max-width: 1000px) {
  .user-profile-modal {
    max-width: 100%;
  }
}

.user-profile-header {
  height: 200px;
  background: var(--blue);
  position: relative;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.user-profile-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 20px;
  color: white;
}

.user-profile-back {
  position: fixed;
  top: 20px;
  left: 20px;
  background: transparent;
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  transition: all 0.2s;
}

.user-profile-actions {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: var(--card-bg);
  padding: 16px;
  border-bottom: 1px solid var(--card-border);
  flex-shrink: 0;
}

.action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 12px;
  border-radius: 8px;
  transition: all 0.2s;
  gap: 8px;
}

.forum-icon span {
  color: var(--blue);
  font-size: 24px;
}

.bond-button-container {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px !important;
}

.bond-btn {
  background: transparent !important;
  border: 1px solid #ff3333 !important;
  color: #ff3333 !important;
  padding: 8px 16px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  transition: all 0.2s !important;
}

.bond-btn:hover {
  opacity: 0.8;
}

.bonds-count-icon span:first-child {
  color: #ff3333;
  font-size: 24px;
}

.bonds-count {
  color: var(--white-text);
  font-weight: bold;
  font-size: 18px;
}

.action-icon:hover {
  opacity: 0.8;
}

.user-profile-posts {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--dark-bg);
}

.loading-posts {
  text-align: center;
  padding: 40px;
  color: var(--light-text);
}

.no-posts {
  text-align: center;
  padding: 40px;
  color: var(--dark-text);
}

/* Posts Grid Layout */
.user-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  padding: 0;
}

@media (max-width: 768px) {
  .user-posts-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
  }
}

.user-post-card {
  aspect-ratio: 1;
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--card-border);
  position: relative;
  display: flex;
  flex-direction: column;
}

.user-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 112, 255, 0.15);
  border-color: var(--blue);
}

.user-post-image {
  flex: 1;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.user-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-post-placeholder {
  width: 100%;
  height: 100%;
  background: var(--card-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--dark-text);
}

.user-post-title {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--light-text);
  font-weight: 500;
  line-height: 1.3;
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .user-post-title {
    font-size: 11px;
    padding: 6px 8px;
  }
}

/* Profile Bonds Modal */
.profile-bonds-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10001;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.profile-bonds-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.profile-bonds-modal {
  width: 100%;
  max-width: 500px;
  height: 80vh;
  background: var(--card-bg);
  border-radius: 16px 16px 0 0;
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.profile-bonds-modal-overlay.active .profile-bonds-modal {
  transform: translateY(0);
}

.profile-bonds-modal-header {
  padding: 16px;
  border-bottom: 1px solid var(--card-border);
  flex-shrink: 0;
}

.profile-bonds-search-container {
  display: flex;
  align-items: center;
  background: var(--card-hover);
  border-radius: 8px;
  padding: 0 12px;
  border: 1px solid var(--card-border);
}

.profile-bonds-search-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 8px;
  color: var(--light-text);
  font-size: 14px;
}

.profile-bonds-search-input:focus {
  outline: none;
}

.profile-bonds-search-cancel {
  background: none;
  border: none;
  color: var(--blue);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-bonds-modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.profile-bonds-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-bonds-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--card-hover);
  border-radius: 8px;
  border: 1px solid var(--card-border);
  cursor: pointer;
  transition: all 0.2s;
}

.profile-bonds-list-item:hover {
  background: var(--card-bg);
  border-color: var(--blue);
}

.profile-bonds-item-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
  overflow: hidden;
}

.profile-bonds-item-info {
  flex: 1;
  min-width: 0;
}

.profile-bonds-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--white-text);
  margin: 0;
}

.profile-bonds-item-username {
  font-size: 12px;
  color: var(--blue);
  margin: 2px 0 0 0;
}

/* Unbond Modal */
.unbond-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.unbond-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.unbond-modal {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  color: var(--white-text);
  max-width: 400px;
  margin: 0 16px;
}

.unbond-actions {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  justify-content: center;
}

.unbond-yes, .unbond-no {
  background: transparent;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s;
}

.unbond-yes {
  color: #4caf50;
}

.unbond-yes:hover {
  background: rgba(76, 175, 80, 0.1);
}

.unbond-no {
  color: #ff3333;
}

.unbond-no:hover {
  background: rgba(255, 51, 51, 0.1);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.feed-post-bond-pill.bonded {
  background: #4caf50 !important;
  border-color: #4caf50 !important;
  color: white !important;
}

.feed-post-bond-pill.requested {
  background: #ff9800 !important;
  border-color: #ff9800 !important;
  color: white !important;
  pointer-events: none !important;
}

.feed-post-bond-pill.not-bonded {
  cursor: pointer;
}

.feed-post-bond-pill.not-bonded:hover {
  background: rgba(255, 51, 51, 0.1);
}

.accept-bond-btn, .decline-bond-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.accept-bond-btn {
  background: #4caf50;
  color: white;
}

.accept-bond-btn:hover {
  background: #45a049;
}

.decline-bond-btn {
  background: #f44336;
  color: white;
}

.decline-bond-btn:hover {
  background: #da190b;
}

.accept-bond-btn:disabled, .decline-bond-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.event-three-dots, .selected-event-three-dots {
  background: transparent;
  border: none;
  color: var(--blue) !important;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.event-three-dots:hover, .selected-event-three-dots:hover {
  background: rgba(94, 130, 240, 0.1);
}

.event-menu, .selected-event-menu {
  position: relative;
  z-index: 1;
}

.event-menu-popup, .selected-event-menu-popup {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  opacity: 0;
  min-width: 100px;
  visibility: hidden;
  transform: translateY(-5px);
  transition: all 0.2s ease;
  z-index: 2;
}

[data-theme="light"] .event-menu-popup, 
[data-theme="light"] .selected-event-menu-popup {
  background: var(--card-bg);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.event-menu-popup.active, .selected-event-menu-popup.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.event-menu-item, .selected-event-menu-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--white-text);
  font-size: 14px;
}

[data-theme="light"] .event-menu-item,
[data-theme="light"] .selected-event-menu-item {
  color: var(--dark-text);
}

.event-menu-item:first-child, .selected-event-menu-item:first-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .event-menu-item:first-child,
[data-theme="light"] .selected-event-menu-item:first-child {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.event-menu-item:hover, .selected-event-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .event-menu-item:hover,
[data-theme="light"] .selected-event-menu-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.event-menu-item.delete, .selected-event-menu-item.delete {
  color: #f44336;
}

.event-item {
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: rgba(20, 19, 19, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 8px;
  position: relative;
  z-index: auto;
}

[data-theme="light"] .event-item {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.event-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.event-content {
  flex: 1;
}

.add-event-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
}

@media (max-width: 1000px) {
  #notificationsFeedContainer {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
  }
}

.gif-bubble {
  padding: 4px !important;
  background: transparent !important;
  border: 1px solid var(--card-border) !important;
  border-radius: 12px !important;
}

.gif-message {
  max-width: 200px;
  max-height: 200px;
  width: auto;
  height: auto;
  border-radius: 8px;
  display: block;
}

.gif-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  transition: all 0.3s ease;
}

.gif-modal-overlay.show {
  display: flex;
}

.gif-modal {
  width: 100%;
  height: 80vh;
  background: var(--card-bg);
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gif-modal-overlay.show .gif-modal {
  transform: translateY(0);
}

@media (min-width: 1000px) {
  .gif-modal {
    width: 50%;
    border-radius: 16px;
    margin-bottom: 20px;
  }
}

.gif-modal-header {
  padding: 16px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.media-tabs {
  display: flex;
  gap: 24px;
}

.media-tab {
  background: none;
  border: none;
  padding: 8px 0;
  color: var(--light-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.media-tab.active {
  color: var(--blue);
}

.media-tab.active::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--blue);
  border-radius: 1px;
}

.gif-search-container {
  padding: 16px;
  border-bottom: 1px solid var(--card-border);
}

.gif-search-input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--dark-bg);
  color: var(--light-text);
  outline: none;
}

.gif-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--light-text);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.gif-modal-close:hover {
  background: var(--card-hover);
}

.gif-categories {
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gif-categories::-webkit-scrollbar {
  display: none;
}

.gif-category {
  padding: 8px 16px;
  background: var(--card-hover);
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 12px;
  color: var(--light-text);
  transition: background 0.2s;
  flex-shrink: 0;
}

.gif-category:hover {
  background: var(--blue);
  color: white;
}

.gif-results {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  grid-auto-rows: 100px; /* Add this - fixed row height */
  gap: 8px;
  align-content: start;
  height: 0; /* Add this - forces flex child to respect flex-basis */
}

.gif-item {
  width: 100%; /* Add this */
  height: 100%; /* Add this */
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
  background: var(--card-hover);
  position: relative; /* Add this */
}

.gif-item:hover {
  transform: scale(1.05);
}

.gif-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute; /* Add this */
  top: 0;
  left: 0;
}

.gif-btn .material-symbols-outlined{
color: var(--blue);
}

.sticker-bubble {
  padding: 4px !important;
  background: transparent !important;
  border: none !important;
}

.sticker-message {
  max-width: 150px;
  max-height: 150px;
  width: auto;
  height: auto;
  border-radius: 8px;
  display: block;
}

.sticker-btn .material-symbols-outlined{
  color: var(--blue);
}

.call-logs-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  transition: all 0.3s ease;
}

.call-logs-modal-overlay.show {
  display: flex;
}

.call-logs-modal {
  width: 100%;
  height: 80vh;
  background: var(--card-bg);
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.call-logs-modal-overlay.show .call-logs-modal {
  transform: translateY(0);
}

@media (min-width: 1000px) {
  .call-logs-modal {
    width: 50%;
    border-radius: 16px;
    margin-bottom: 20px;
  }
}

.call-logs-header {
  padding: 20px;
  border-bottom: 1px solid var(--card-border);
}

.call-logs-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--light-text);
  font-weight: 600;
}

.call-logs-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.call-log-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--card-border);
}

.call-log-item:last-child {
  border-bottom: none;
}

.call-log-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  color: white;
  font-size: 18px;
}

.call-log-icon.video {
  background: var(--blue);
}

.call-log-icon.voice {
  background: #4caf50;
}

.call-log-icon.missed {
  background: #f44336;
}

.call-log-icon.declined {
  background: #ff9800;
}

.call-log-info {
  flex: 1;
}

.call-log-type {
  font-size: 14px;
  font-weight: 500;
  color: var(--light-text);
  margin-bottom: 4px;
}

.call-log-time {
  font-size: 12px;
  color: var(--dark-text);
}

.call-logs-loading {
  text-align: center;
  padding: 40px;
  color: var(--dark-text);
}

.call-logs-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--dark-text);
}

.call-logs-empty .material-symbols-outlined {
  font-size: 64px;
  color: var(--blue);
  margin-bottom: 16px;
  display: block;
}

.call-history-message.missed-call,
.call-history-message.missed-call * {
  color: #f44336 !important;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-info {
  flex: 1;
  min-width: 0;
}

.contact-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.mood-images-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.mood-upload-btn {
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.mood-upload-btn span {
  font-size: 25px;
  color: rgba(106, 106, 106, 0.8);
}

.mood-images-preview {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mood-image-item {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.mood-image-item:nth-child(2) {
  transform: rotate(-5deg) translateX(-8px);
  z-index: 2;
}

.mood-image-item:nth-child(3) {
  transform: rotate(8deg) translateX(-16px);
  z-index: 1;
}

.mood-image-remove {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  background: #f44336;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
  opacity: 1;
  transition: all 0.2s;
  z-index: 10;
}

.mood-image-remove:hover {
  background: #d32f2f;
  transform: scale(1.1);
}

    .mood-images-section::-webkit-scrollbar {
      display: none;
    }
    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

.feed-post-card {
  background: transparent;
  border-bottom: 1px solid var(--card-border);
  margin: 0;
  border-radius: 0;
}

.feed-post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px 0 16px;
  margin-bottom: 12px; /* Back to 12px for small gap */
}

.feed-post-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feed-post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  overflow: hidden;
}

.feed-post-name {
  font-weight: 600;
  color: var(--white-text);
  font-size: 15px;
}

.feed-post-time {
  color: #888; /* Always grey */
  font-size: 13px;
  font-weight: 400;
}

.post-options-menu {
  position: relative;
}

.post-options-btn {
  background: none;
  border: none;
  color: var(--blue);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-options-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  min-width: 150px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.post-options-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.post-option-item {
  padding: 12px 16px;
  color: var(--white-text);
  cursor: pointer;
  border-bottom: 1px solid var(--card-border);
  font-size: 14px;
  transition: background 0.2s;
}

.post-option-item:last-child {
  border-bottom: none;
}

.feed-post-card:last-child{
  border-bottom: none;
}

.post-option-item.report {
  color: #f44336;
}

.feed-post-images {
  position: relative;
  width: 100%;
  margin: 0;
}

.feed-images-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.feed-images-scroll::-webkit-scrollbar {
  display: none;
}

.feed-image-item {
  min-width: 100%;
  min-height: 100px;
  scroll-snap-align: start;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: transparent;
}

.feed-image-dashes {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 10;
}

.feed-post-actions {
  display: flex;
  gap: 5px;
  padding: 0 16px;
  margin: 8px 0;
}

.post-action-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.feed-post-content {
  padding: 0 16px 8px 16px;
}

.feed-post-title {
  align-self: center;
  color: var(--white-text);
  font-size: 16px;
  line-height: 1.4;
  margin: 0;
  margin-bottom: 2px; /* Small gap below title */
}

.feed-post-desc{
  color: var(--white-text);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  margin: 0;
}

.title-show-more {
  color: var(--blue);
  cursor: pointer;
  font-weight: 500;
}

/* Make icons smaller */
.feed-like-btn svg,
.feed-comment-btn svg {
  width: 18px;
  height: 18px;
}

.post-preview-item {
  background: transparent !important;
}

.create-simple-container {
  padding: 20px;
  max-width: 500px;
  margin: 0 auto;
}

.create-images-section {
  margin-bottom: 20px;
}

.create-add-images-btn {
  width: 60px;
  height: 60px;
  border: 2px dashed var(--card-border);
  background: transparent;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 12px;
}

.create-add-images-btn:hover {
  border-color: var(--blue);
  background: rgba(94, 130, 240, 0.1);
}

.create-add-images-btn span {
  font-size: 28px;
  color: var(--blue);
}

.create-images-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0px;
}

.create-image-item {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--card-border);
}

.create-image-item:nth-child(2) { transform: rotate(-2deg); }
.create-image-item:nth-child(3) { transform: rotate(2deg); }
.create-image-item:nth-child(4) { transform: rotate(-1deg); }
.create-image-item:nth-child(5) { transform: rotate(1deg); }

.create-image-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: rgba(244, 67, 54, 0.9);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}

.create-input-section {
  margin-bottom: 50px;
  position: relative;
}

.create-title-input {
  font-family: 'Merriweather', serif;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--white-text);
  font-size: 16px;
  font-weight: 500;
}

.create-description-input {
  font-family: 'Merriweather', serif;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--white-text);
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
}

.create-title-counter,
.create-desc-counter {
  font-family: 'Merriweather', serif;
  position: absolute;
  bottom: -20px;
  right: 0;
  font-size: 12px;
  color: var(--light-text);
}

.create-submit-btn {

  width: 100%;
  padding: 16px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'Merriweather', serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.create-submit-btn:hover {
  background: #5e82f0;
}

.create-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.user-profile-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  overflow-y: auto;
}

.user-profile-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.user-profile-modal-overlay .main-container {
  width: 60%;
  min-height: 100vh;
  background: transparent;
  display: flex;
  flex-direction: column;
}

.user-profile-modal-overlay .profile-section {
  height: 25vh;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 20px;
  gap: 15px;
}

.user-profile-modal-overlay .profile-info {
  text-align: center;
  position: relative;
  z-index: 2;
}

.user-profile-modal-overlay .profile-name {
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin-bottom: 5px;
  font-family: 'Merriweather', serif;
}

.user-profile-modal-overlay .profile-id {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 300;
  font-family: 'Merriweather', serif;
}

.user-profile-modal-overlay .profile-row {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  z-index: 2;
}

.user-profile-modal-overlay .profile-image {
  width: 150px;
  height: 150px;
  background-color: #363434a7;
  backdrop-filter: blur(10px);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  position: relative;
}

.user-profile-modal-overlay .left-stats {
  position: absolute;
  left: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 120px;
}

.user-profile-modal-overlay .message-icon {
  color: #64b5f6;
  font-size: 28px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.user-profile-modal-overlay .message-icon:hover {
  color: #42a5f5;
  transform: scale(1.1);
}

.user-profile-modal-overlay .bonds-text {
  color: var(--blue);
  font-size: 18px;
  font-weight: 400;
  text-align: center;
  line-height: 1.2;
  font-family: 'Merriweather', serif;
}

.user-profile-modal-overlay .bonds-count {
  font-size: 28px;
  font-weight: 700;
  color: #64ffda;
  cursor: pointer;
}

.user-profile-modal-overlay .right-actions {
  position: absolute;
  right: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 120px;
}

.user-profile-modal-overlay .review-icon {
  color: #64b5f6;
  font-size: 28px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.user-profile-modal-overlay .review-icon:hover {
  color: #42a5f5;
  transform: scale(1.1);
}

.user-profile-modal-overlay .bond-button {
  padding: 12px 24px;
  border: 2px solid #1976d2;
  background: transparent;
  color: #1976d2;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Merriweather', serif;
}

.user-profile-modal-overlay .bond-button:hover {
  background: #1976d2;
  color: white;
}

.user-profile-modal-overlay .mood-section {
  height: 25vh;
  min-height: 200px;
  padding: 20px;
  position: relative;
}

.user-profile-modal-overlay .mood-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 10, 0.1) 20%, rgba(10, 10, 10, 0.3) 40%, rgba(10, 10, 10, 0.6) 70%, rgba(10, 10, 10, 0.9) 100%);
  pointer-events: none;
  z-index: 2;
}

.user-profile-modal-overlay .mood-container {
  height: 100%;
  padding: 20px 0;
  overflow-y: auto;
  position: relative;
}

.user-profile-modal-overlay .mood-text {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 300;
  text-align: justify;
  font-family: 'Merriweather', serif;
}

.user-profile-modal-overlay .posts-section {
  min-height: 50vh;
  padding: 20px;
  flex: 1;
}

.user-profile-modal-overlay .posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  padding-bottom: 40px;
}

.user-profile-modal-overlay .post-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  height: 200px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
  background-size: cover;
  background-position: center;
}

@media (max-width: 1200px) {
  .user-profile-modal-overlay .main-container {
    width: 100%;
  }
  
  .user-profile-modal-overlay .left-stats {
    left: 20px;
  }
  
  .user-profile-modal-overlay .right-actions {
    right: 20px;
  }
}

@media (max-width: 768px) {
  .user-profile-modal-overlay .profile-section {
    padding: 10px;
    min-height: 200px;
  }
  
  .user-profile-modal-overlay .left-stats {
    left: 10px;
  }
  
  .user-profile-modal-overlay .right-actions {
    right: 10px;
  }
  
  .user-profile-modal-overlay .profile-image {
    width: 100px;
    height: 100px;
  }

  .user-profile-modal-overlay .profile-name {
    font-size: 20px;
  }

  .user-profile-modal-overlay .profile-id {
    font-size: 12px;
  }
  
  .user-profile-modal-overlay .bonds-count {
    font-size: 20px;
  }
  
  .user-profile-modal-overlay .bonds-text {
    font-size: 14px;
  }
  
  .user-profile-modal-overlay .bond-button {
    padding: 8px 16px;
    font-size: 14px;
  }

  .user-profile-modal-overlay .message-icon,
  .user-profile-modal-overlay .review-icon {
    font-size: 24px;
  }
}

.message {
  position: relative;
  z-index: auto;
}

.message-bubble {
  position: relative;
  transition: padding 0.3s ease;
  cursor: pointer;
  z-index: 1;
}

.message-bubble:has(.message-popup-menu.active) {
  z-index: 100998;
}


.message-bubble.expanded {
  padding-top: 35px;
  padding-bottom: 35px;
}

.message-bubble.expanded .message-header,
.message-bubble.expanded .message-footer {
  opacity: 1;
}

.message-bubble.expanded .message-header {
  pointer-events: auto;
}

.message-header {
  position: absolute;
  top: 8px;
  right: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.message-more-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  position: relative;
  z-index: 1;
}

.message-more-btn .material-symbols-outlined,
.message.sent .message-more-btn .material-symbols-outlined,
.message.received .message-more-btn .material-symbols-outlined {
  font-size: 20px;
}

.message.sent .message-more-btn .material-symbols-outlined,
.message.sent .message-footer {
  color: #fff;
}

.message.received .message-more-btn .material-symbols-outlined,
.message.received .message-footer {
  color: var(--blue);
}

.message-popup-menu.active {
  display: block;
}

.message-popup-menu div {
  padding: 10px 16px;
  cursor: pointer;
  color: var(--blue);
  font-size: 14px;
  border-bottom: 1px solid var(--blue);
  transition: background 0.2s;
}

.message-popup-menu div:hover {
  background: rgba(0, 136, 255, 0.15);
}

.message-footer {
  position: absolute;
  bottom: 8px;
  left: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  font-size: 11px;
}

.reply-badge {
  background: var(--card-bg);
  padding: 6px 10px;
  border-radius: 30px;
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
  display: inline-block;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-badge::before {
  color: var(--blue);
}

.chat-action-badge .action-icon {
  color: var(--blue);
  font-size: 18px;
  flex-shrink: 0;
}

.chat-action-badge .action-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-action-badge .close-btn {
  cursor: pointer;
  color: var(--blue);
  padding: 4px;
  flex-shrink: 0;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-action-badge .close-btn:hover {
  background: rgba(33, 150, 243, 0.1);
  border-radius: 50%;
}

.message-time {
  display: none;
}

.chat-input-wrapper {
  display: flex;
  flex-direction: column;
}

.chat-input-wrapper > div:last-child {
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 3px;
}

.chat-action-badge {
  width: 100%;
  max-width: 100%;
  background: var(--card-bg);
  padding: 10px 16px;
  border-radius: 24px;
  color: var(--blue);
  font-size: 14px;
  display: none;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  overflow: hidden;
  max-height: 0;
}

.chat-action-badge.active {
  display: flex;
  max-height: 60px;
}

.chat-action-close {
  background: none;
  border: none;
  color: var(--blue);
  cursor: pointer;
  margin-left: auto;
}

.message-popup-menu {
  position: absolute;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0px 0;
  min-width: 120px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 100999;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95);
  transition: all 0.2s ease;
  right: 0;
  top: 100%;
  margin-top: 4px;
}

.message-popup-menu :last-child{
  border-bottom: none;
}

.message-popup-menu.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  z-index: 100999;
}

.message.received .message-popup-menu {
  left: 0;
  right: auto;
}

.message-bubble {
  position: relative;
  overflow: visible;
}

.message {
  position: relative;
  overflow: visible;
}

#groupChatBox {
  transition: padding-bottom 0.3s ease;
}

#commentSendBtn{
  background: transparent;
  color: var(--blue);
}

#moodCommentSendBtn{
  background: transparent;
  color: var(--blue);
}

.image-stack-bubble {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  display: inline-block !important;
  width: auto !important;
  max-width: 100% !important;
  overflow: visible !important;
}

.image-stack-bubble .message-header {
  opacity: 1 !important;
  visibility: visible !important;
  position: absolute !important;
  top: 8px;
  right: 8px;
  z-index: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.image-stack-bubble .message-popup-menu {
  z-index: 100999 !important;
}

.image-stack-bubble .message-footer {
  display: none !important;
}

.stacked-images {
  position: relative;
  display: inline-block;
  margin: 0;
  padding: 0;
  z-index: 0;
}

.stacked-images img {
  display: block;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  object-fit: contain;
  cursor: pointer;
  border: 3px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 0;
}

.images-count-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  z-index: 1;
}

.message.sent .stacked-images img {
  border-color: rgba(255, 255, 255, 0.25);
}

.message.received .stacked-images img {
  border-color: rgba(0, 120, 255, 0.3);
}

.image-preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
}

.image-preview-overlay.active {
  display: flex;
}

.image-preview-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.image-preview-slider {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.image-preview-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.image-preview-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.image-preview-slide img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
}

.image-preview-close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 40px;
  cursor: pointer;
  z-index: 100000;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.image-preview-close:hover {
  opacity: 1;
}

.modal-header {
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: grab;
  user-select: none;
  padding: 8px 0;
  background: var(--card-bg);
}

.modal-header:active {
  cursor: grabbing;
}

.modal-notch {
  width: 40px;
  height: 4px;
  background: var(--blue);
  border-radius: 2px;
}

.likes-modal .modal-header {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.likes-modal .modal-body {
  display: flex;
  flex-direction: column;
}

.comment-media-btn {
  background: transparent;
  border: none;
  color: var(--blue);
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
}

#gifModalOverlay {
  z-index: 15000 !important;
}

.comments-modal {
  z-index: 10000;
}

.likes-modal {
  z-index: 10000;
}

#moodcommentMediaBtn,
#commentMediaBtn
{
  background: transparent;
  color: var(--blue);
}

#moodCommentInput,
#commentInput
{
  font-family: 'Merriweather', serif;
  font-size: 15px;
  min-width: 50px;
  padding: 5px;
  height: 20px;
}

.chat-messages {
  overflow-x: hidden !important;
  overflow-y: auto;
}

.chat-messages::-webkit-scrollbar {
  display: none;
}

.chat-messages {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.chat-panel {
  overflow-x: hidden !important;
}

.message-bubble.swiping {
  transition: transform 0.1s ease !important;
}

.mood-card {
  position: relative;
}

.mood-images-backdrop {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  z-index: 2;
}

[data-theme="dark"] .mood-images-backdrop {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
}

[data-theme="light"] .mood-images-backdrop {
  background: linear-gradient(to top, rgba(255, 255, 255, 0.9), transparent);
}

.mood-footer-row {
  height: 50px;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-top: 1px solid var(--card-border);
  position: relative;
}

[data-theme="dark"] .mood-footer-row {
  background: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .mood-footer-row {
  background: rgba(255, 255, 255, 0.6);
}

.mood-content-row::-webkit-scrollbar {
  width: 3px;
}

.mood-content-row::-webkit-scrollbar-track {
  background: transparent;
}

.mood-content-row::-webkit-scrollbar-thumb {
  background: var(--blue);
  border-radius: 2px;
}

.mood-text-content {
  scrollbar-width: thin;
  scrollbar-color: var(--blue) transparent;
}

.mood-text-content::-webkit-scrollbar {
  width: 3px;
}

.mood-text-content::-webkit-scrollbar-track {
  background: transparent;
}

.mood-text-content::-webkit-scrollbar-thumb {
  background: var(--blue);
  border-radius: 2px;
}

.moods-scroll::-webkit-scrollbar {
  display: none;
}

.moods-scroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

.mood-like-btn.wiggle i {
  animation: wiggle 0.5s ease;
}