/* ----------------------------
   THEME ROOT SECTION
   ---------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Light Theme Variables */
html.light, html[data-theme="light"] {
  /* Restore default accent; focus-ring control will be scoped per-element */
  --bg-accent: var(--button-primary);
  --border-radius-lg: 1rem;
  --border-radius-sm: .25rem;

  color-scheme: light;

    --chat-active: green;
    --chat-active-rgb: 0, 128, 0;
    --text-white: #ffffff;
    --text-red: red;
    --text-orange: orange;
    --text-green: green;
    --max-width: 1130px;
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f4;
    --bg-glass: rgba(219, 228, 255, 0.81);
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-tertiary: rgba(159, 177, 189, 0.99);
    --border-color: rgba(93, 93, 93, 0.09);
    --border-frosted: rgba(255,255,255,0.18);
    --search-border-color: #ddd;
    --border-light: #dee2e6;
    --border-radius: 1.6875rem;
    --border-radius-small: 0.3rem;
    --primary-color: #1d9bff;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --button-primary: #1d9bf0;
    --button-primary-hover: #0d7fc7;
    --button-secondary: #6c757d;
    --button-secondary-hover: #5a6268;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --text-inverse: #ffffff;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-heavy: rgba(0, 0, 0, 0.3);
    --input-bg: #fff;
    --input-border: #dee2e6;
    --input-focus: #1d9bff;
    --border-radius-small: 0.3rem;
    --link-color: #1d9bff;
    --link-hover: #0d7fc7;
    --transition: 0.3s ease;
    --font-family: 'Arial', -apple-system, BlinkMacSystemFont, 'IBM Plex Sans', 'Source Sans Pro', 'Lora', 'Merriweather', Arial, sans-serif;
    --dark-gray: #666;
    --light-gray: rgb(148, 148, 148);
    --focus-blue: rgb(69, 159, 189);
    --like-btn: red;
}

/* Dark Theme Variables */
html.dark, html[data-theme="dark"] {
  /* Restore default accent; focus-ring control will be scoped per-element */
  --bg-accent: var(--button-primary);
  --border-radius-lg: 1rem;
  --border-radius-sm: .25rem;

  color-scheme: dark;

    --chat-active: green;
    --chat-active-rgb: 0, 128, 0;
    --text-white: #ffffff;
    --text-red: red;
    --text-orange: orange;
    --text-green: green;
    --max-width: 1130px;
    --bg-primary: #1e1e1e;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #23272b;
    --bg-glass: rgba(63, 72, 101, 0.32);
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #8a8a8a;
    --border-color: rgba(93, 93, 93, 0.25);
    --border-frosted: rgba(255,255,255,0.18);
    --search-border-color: #282828;
    --border-light: #282828;
    --border-radius: 1.6875rem;
    --border-radius-small: 0.3rem;
    --primary-color: #1d9bff;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --button-primary: #1d9bff;
    --button-primary-hover: #0d7fc7;
    --button-secondary: #6c757d;
    --button-secondary-hover: #5a6268;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --text-inverse: #ffffff;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.5);
    --shadow-heavy: rgba(0, 0, 0, 0.7);
    --input-bg: #23272b;
    --input-border: #404040;
    --input-focus: #1d9bff;
    --link-color: #1d9bff;
    --link-hover: #66bfff;
    --transition: 0.3s ease;
    --font-family: 'Arial', -apple-system, BlinkMacSystemFont, 'IBM Plex Sans', 'Source Sans Pro', 'Lora', 'Merriweather', Arial, sans-serif;
    --dark-gray: #666;
    --light-gray: rgb(148, 148, 148);
    --focus-blue: rgb(69, 159, 189);
    --like-btn: red;
}

html {
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

html::-webkit-scrollbar {
  display: none;
}

body {
    font-family: 'Arial', -apple-system, BlinkMacSystemFont, 'IBM Plex Sans', 'Source Sans Pro', 'Lora', 'Merriweather', Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    min-height: 100%;
    background: var(--bg-secondary);
    color: var(--text-primary);
    display: flex;
    justify-content: center; 
    align-items: flex-start;
    margin: auto;
    width: 100%;
    max-width: 1130px;
    letter-spacing: 0.5px;
}

img, video {
    max-width: 100%;
    height:auto
}

video {
    border: none;
    background: black;
    border-radius: 15px;
    cursor: pointer;
}

/* Post highlight animation for new posts */
.highlight-new-post {
    animation: highlightPulse 3s ease-in-out;
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 0 20px rgba(29, 155, 255, 0.3) !important;
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.5);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(29, 155, 255, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.3);
    }
}

#playVideo {
    width:100%;
    height:auto;
    display:block;
    border:none;
}

/* Theme Switcher */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    font-size: 28px;
    background: none;
    border: none;
}
@media only screen and (max-width: 379px) {
    .theme-toggle {
        display: none;
    }
}
.sidebar-item, header, .left-sidebar, .content-area, .main-content {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.post-verification-notice, .temp-user-encouragement {
    background: var(--warning-color);
    color: var(--text-primary);
}

.user-type-permanent {
    background: var(--success-color);
    color: var(--text-primary);
}

.user-type-temporary {
    background: var(--warning-color);
    color: var(--text-primary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    justify-content: space-between;
}

.user-type-badge {
    padding: 4px 8px;
    border-radius: var(--border-radius);
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.post-verification-notice {
    background: var(--bg-glass);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem;
    text-align: center;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-primary);
    max-width: 530px;
}
@media screen and (max-width: 800px) {
    .post-verification-notice {
        margin: 1.2rem 0.5rem 0 0.5rem;
    }
}
@media screen and (min-width: 800px) {
    .post-verification-notice {
        font-size: 16px;
    }
}
.temp-user-encouragement {
    background: linear-gradient(135deg, var(--primary-color), #0d7fc7);
    color: var(--text-primary);
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 20px;
    text-align: center;
}

/* Box model and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ====================================
   Login Authentication Model
   ==================================== */

/* Unified Auth Modal Styles */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 22, 34, 0.45);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.auth-modal.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.auth-modal-content {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 0;
    max-width: 450px;
    width: 100%;
    max-height: 99vh;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transform: translateY(50px) scale(0.9);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-modal.active .auth-modal-content {
    transform: translateY(0) scale(1);
}

.auth-modal-header {
    padding: 25px 10px 20px 10px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    position: relative;
}

.auth-modal-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.auth-modal-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.auth-modal-close:hover {
    background: none;
    color: var(--text-primary);
    transform: scale(1.1);
}

.auth-modal-body {
    padding: 30px;
}

/* Auth Info Card */
.auth-info-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-frosted);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.auth-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.auth-mode-title {
    margin: 0 0 12px 0;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.auth-info-text {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
}

/* Auth Mode Selection */
.auth-mode-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.auth-mode-selector .icon {
    width:20px; 
    height: 20px; 
    padding-bottom: 4px;
    margin: 0;
}

.auth-mode-btn {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 27px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-align: center;
}

.auth-mode-btn.active {
    border-color: var(--primary-color);
    background: rgba(29, 155, 255, 0.1);
    color: var(--primary-color);
}

.auth-mode-btn:hover:not(.active) {
    border-color: var(--text-secondary);
    background: var(--bg-tertiary);
}

@media screen and (min-width: 199px) {
        #hide {
            display:none!important;
        }
    }
@media screen and (min-width: 199px) {
    .auth-mode-btn, .auth-mode-btn.active {
        border-top: none;
        border-right: none;
        border-left: none;
        background: none;
        border-radius: 0;
    }
}
/* Form Sections */
.auth-section {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.auth-section.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.form-input,
.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 27px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    line-height: 1.5;
}

.input-icon-wrapper input {
    padding-left: 50px!important;
}

/* Add left and right padding for icons only when inside icon wrapper */
.input-icon-wrapper .form-input,
.input-icon-wrapper .form-control {
    padding-left: 44px;
    padding-right: 44px;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    height: 1.5em;
    pointer-events: none;
    z-index: 2;
}
.input-icon .icon {
    width: 1.25em;
    height: 1.25em;
    display: block;
    color: var(--text-secondary);
}

.eye-btn {
    position: absolute;
    right: 10px;
    top: 0;
    bottom: 0;
    background: none;
    border: none;
    padding: 0 8px;
    font-size: 2em;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    transition: color 0.2s, background 0.2s;
}

.eye-icon .icon {
    width: 2em;
    height: 2em;
    display: block;
    opacity: 0.5;
}

.eye-btn:hover,
.eye-btn:focus {
    color: var(--primary-color);
    background: none;
}

.input-icon-wrapper input::placeholder {
    color: var(--text-secondary);
    opacity: 1;
    vertical-align: middle;
}

.form-input:focus {
    outline: none;
    /* Keep existing border to avoid double-border look */
    border-color: inherit;
    background: var(--bg-tertiary);
    /* Subtle glow without visible border ring */
    box-shadow: 0 0 0 3px rgba(29, 155, 255, 0.12);
}

.form-input::placeholder {
    color: var(--text-secondary);
}

.form-input.error {
    border-color: var(--danger-color);
    animation: shake 0.4s ease;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Buttons */
.auth-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 27px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.auth-btn-primary {
    background: var(--primary-color);
    color: white;
    min-height: 3.5rem;
}

.auth-btn-primary:hover {
    background: #0d7fc7;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(29, 155, 255, 0.3);
}

.auth-btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.auth-btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--text-secondary);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-btn .loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 1px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

.auth-btn.loading .loading-spinner {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Links and Actions */
.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 14px;
}

.auth-link:hover {
    color: #0d7fc7;
    text-decoration: underline;
}

.auth-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
    z-index: 1;
}

.auth-divider span {
    background: var(--bg-secondary);
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

/* Status Messages */
.status-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-message.success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.status-message.error {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.status-message.warning {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(255, 193, 7, 0.3);
}

/* Mobile Responsiveness for Auth Modal */
@media (max-width: 799px) {
    .auth-modal-content {
        margin: 10px;
        width: calc(100% - 20px);
        overflow-y: auto;
        max-height: 100vh;
        height: 98%;
    }

    .auth-modal-body {
        padding: 20px 10px;
    }

    .auth-mode-selector {
        flex-direction: row;
        gap: 10px;
    }
}
/* Hide old modal elements */
#emailModal, #loginModal, #registerModal, #postModal {
    display: none;
}

/* ====================================
   LOADING STATES
   ==================================== */
.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--border-color);
  border-top: 2px solid var(--bg-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4000;
  backdrop-filter: blur(2px);
}

.loading-spinner {
  width: 3rem;
  height: 3rem;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--bg-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ====================================
   TYPOGRAPHY
   ==================================== */

h1, h2, h3, h4, h5, h6 {
  padding: 1rem 0;
  font-weight: 600;
  line-height: 1.5;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--link-hover);
  text-decoration: none;
}

code {
  font-family: var(--font-mono);
  background-color: var(--bg-tertiary);
  padding: 0.125rem 0.25rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.875em;
}

.text-content {
    margin-top: 20px; font-family: sans-serif; font-size: 1.2em; line-height: 1.5em; width: 99%; text-align: justify; word-spacing: -2px; letter-spacing: 0.6px; overflow-x: hidden; word-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; -ms-hyphens: auto; hyphens: auto; font-weight: 300;
}

/* ====================================
   LAYOUT COMPONENTS
   ==================================== */

.container {
    display: flex;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.container-fluid {
  width: 100%;
  padding: 0 1rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.5rem;
}

.col {
  flex: 1;
  padding: 0 0.5rem;
}

.col-auto {
  flex: 0 0 auto;
  padding: 0 0.5rem;
}

/* ====================================
   ADMIN DASHBOARD
   ==================================== */
.admin-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
}

.admin-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: 0 2px 8px var(--shadow-light);
}

.admin-stat {
  font-size: 2rem;
  font-weight: bold;
  color: var(--bg-accent);
  margin-bottom: 0.5rem;
}

.admin-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.like-count,
.flag-count,
.comment-count {
    margin-left: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.flag-btn.flagged {
    color: var(--warning-color);
}
@media only screen and (max-width: 799px) {
    .username {
        display: none;
    }
}

/* Emoji Picker Container */
.emoji-picker {
  position: absolute;
  bottom: 38%;
  left: 35px;
  margin-bottom: 20px;
  /*border: 1px solid #222;*/
  background-color: var(--bg-secondary);
  padding: 8px 12px;
  border-radius: 25px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  opacity: 0;
  transform: scale(0.95);
  transform-origin: bottom left;
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
  z-index: 10001;
}

/* Visible State */
.emoji-picker.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* Individual Emojis */
.emoji-picker .emoji {
  display: inline-block;
  font-size: 22px;
  margin: 2px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.emoji-picker .emoji:hover {
  transform: scale(1.4);
}

/* Emoji Toggle Button */
.emoji-toggle {
  font-size: 20px;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.comment-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  animation: jeniFade 0.35s ease;
  z-index: 9999;
}


@keyframes jeniFade {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes jeniFadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

.comment-modal-content {
  background: inherit;
  color: inherit;
  border-radius: 25px;
  max-width: 500px;
  width: 100%;
  padding: 20px;
  position: relative;
  z-index: 10000;
}

.comment-modal-close {
  position: absolute;
  top: -20px;
  right: 20px;
  background: var(--bg-secondary);
  color: #fff;
  border: none;
  font-size: 24px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1;
}

.comment-modal-box {
  background: inherit;
  color: inherit;
  padding: 30px;
  border: 1px solid #222;
  border-radius: 25px;
  max-width: 500px;
  width: 100%;
  animation: zoomIn 280ms ease;
  position: relative;
}

.comment-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.comment-thread {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
    position: relative;
    color: var(--text-primary);
}

.comment-bubble.align-right {
    align-self: flex-end;
    background: #d2f1ff;
    border-bottom-right-radius: 0;
}

.comment-bubble.align-left {
    align-self: flex-start;
    background: #eee;
    border-bottom-left-radius: 0;
}

.comment-bubble strong {
    display: inline;
    font-weight: 600;
    margin-right: 6px;
    color: #555;
}

.comment {
    color: var(--text-primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.comment-count {
    color: var(--text-secondary);
    font-size: 14px;
}

.comment-input {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 10px;
    background-color: inherit;
    color: inherit;
    padding: 10px;
    width: 100%;
    font-size: 14px;
    margin-bottom: 6px;
    resize: vertical;
}

.comment-send {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: white;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
}

/* Post highlight animation for new posts */
.highlight-new-post {
    animation: highlightPulse 3s ease-in-out;
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 0 20px rgba(29, 155, 255, 0.3) !important;
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.5);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(29, 155, 255, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.3);
    }
}

.comment-send:hover {
    background-color: #129ed9;
}

.comment-status {
    margin-top: 4px;
    font-size: 13px;
}

#loading {
    text-align: center;
    padding: 20px;
}
#loading::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--button-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

div .inner-left {
    margin-top: 50px;
    font-size: 0.9em;
    line-height: 1.3em;
    width: 100%;
    max-width: 360px;
    text-align: justify;
    word-spacing: -2px;
    color: #66FF00;
    overflow-x: hidden;
    word-wrap: break-word;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    font-weight: 300;
}

#content-wrapper {
    position: relative;
}

.content-wrapper-p {
    text-align: justify;
    word-spacing: -2px;
    color: #66FF00;
    font-size: 14px;
    font-weight: 100;
    overflow-x: hidden;
    word-wrap: break-word;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    padding: 30px;
    max-width: 400px;
    top: 0;
    left: 0;
    margin: 0 auto;
}

section #posts-feed {
     margin-top: 20px
}

/* Modal close button */
.formclose {
    position: fixed;
    top: 30px;
    right: 30px;
    font-size: 35px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 10000;
    opacity: 0.5;
}

.formclose:hover {
    opacity: 1;
}

/* Responsive close button */
@media screen and (max-width: 799px) {
    .formclose {
        top: 10px;
        right: 10px;
    }
}
        
.post-footer {
  border-top: 1px solid var(--border-color);
  padding: 0 10px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  height: 75px;
  gap: 12px
}

.image-btn {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}
.image-btn .icon {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}
.image-btn:hover {
    transform: translateY(-2px);
}

.image-upload {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-top: 5px;
  color: #1da1f2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.imagepreview {
  display: none;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  border: 1px solid #1cb7ffc1;
  object-fit: cover;
  padding: 0;
  align-self: center;
}

.progress-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: conic-gradient(#1da1f2 0deg, #444 0deg 360deg);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  margin: 0;
  padding: 0;
}

/* ----------------------------
   POST SECTION
   ---------------------------- */
#content-wrapper {
    display: flex;
    width: 100%;
    padding: 5px;
    border-radius: 8px;
    margin: 0 auto;
    justify-content: center;
    align-items: center;
    min-height: 220px;
}

.post-panel {
    max-width: 1040px;
    width: 100%;
    background-color: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.post-form {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid #222;
    width: 100%;
    max-width: 1040px;
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    padding: 20px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.form-header {
    display: flex;
    align-items: flex-start;
    padding: 0;
}

.verified-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 12px;
    margin-top: -3px;
}

.input-container {
    flex-grow: 1;
}
.post-input {
    background-color: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    width: 100%;
    padding: 10px 0;
    outline: none;
    min-height: 100px;
    resize: none;
}

.post-footer {
    border-top: 1px solid var(--border-color);
    padding: 8px 0 0 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.image-upload {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #1da1f2;
    display: flex;
    align-items: center;
}

/* Hide Image Preview Initially */
#imgPreview {
    display: none;
}

.post-button {
    background-color: var(--button-primary);
    color: var(--text-primary);
    border: none;
    border-radius: 27px;
    padding: 10px 10px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.12s ease;
    margin-top: 1.5rem;
    max-width: 150px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    box-sizing: border-box;
}

.post-button:hover {
    background-color: #2992d8;
}

.post-input:not(:placeholder-shown) ~ .post-button {
    background-color: #1da1f2;
    cursor: pointer;
}

/* Post highlight animation for new posts */
.highlight-new-post {
    animation: highlightPulse 3s ease-in-out;
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 0 20px rgba(29, 155, 255, 0.3) !important;
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.5);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(29, 155, 255, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.3);
    }
}

/* Left Panel (Posts) */
#post-panel-section {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /*border-right: 1px solid #222;*/
    width: 100%;
}

/* Ensure the Form is Centered */
#post-panel-section > .post-form {
    width: 100%;
    max-width: 100%;
}

/* Right Panel (Headstart Section) */
#headstart-section {
    flex: 0 0 40%;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    margin: 0 auto;
}

/* ====================================
   FORMS
   ==================================== */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  outline: 0;
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.form-control::placeholder {
  color: var(--input-placeholder);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

.form-check {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.form-check-input {
  margin-right: 0.5rem;
}
.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  padding-right: 2.5rem;
  appearance: none;
}

/* Masonry Layout for Local Posts */
.post-feed {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    column-gap: 5px;
}

@media (min-width: 600px) and (max-width: 799px) {
    .post-feed {
        display: block;
        column-count: 1;
        column-gap: 10px;
        width: 100%;
    }
}

/* Post Layout & Meta Data */

.post-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 10px;
    padding: 0 5px 0 5px;
    /*border-top: 1px solid var(--border-color);*/
}

.username {
    color: var(--text-secondary);
}

.timestamp {
    color: var(--text-secondary);
}

.image-container {
    width: 100%;
    max-width: 1024px;
    margin: 10px auto;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-container img {
    width: 100%;
    height: auto;
    max-height: 769px;
    object-fit: contain;
    cursor: pointer;
    border-radius: 8px;
}

.video-container {
    width: 100%;
    max-width: 1024px;
    margin: 10px auto;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
}

/* Fullscreen Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.image-modal img {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* Post highlight animation for new posts */
.highlight-new-post {
    animation: highlightPulse 3s ease-in-out;
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 0 20px rgba(29, 155, 255, 0.3) !important;
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.5);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(29, 155, 255, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.3);
    }
}


/* ----------------------------
   STYLE SECTION
   ---------------------------- */

/* style.css */
.imgwrap {
    max-height: 350px;
    margin-top: -20px;
    margin-left: 0;
    margin-right: 0;
    border-radius: 8px;
    width: 100%;
    max-width: 1200px;
    background-image: url('../../assets/img/bg.jpg');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
}
@media screen and (max-width: 799px) {
    .imgwrap {
        max-height: 350px;
        margin-left:0;
        margin-top: -20px;
        margin-right: 0;
        border-radius: 0;
        background-size: cover;
        background-position: bottom;
        background-repeat: no-repeat;
    }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-secondary);
    visibility: hidden;
    opacity: 0;
    z-index: 10002;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

.modal-overlay.active .post-form {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    width: 95%;
    max-width: 450px;
    max-height: 90%;
    border-radius: 25px;
}
/* When modal is active, hide the rest of the page */
  body.modal-active #pageContent {
    visibility: hidden;
  }

.container-1200 {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    position: relative;
}

.new-post-btn {
    position: fixed;
    bottom: 10px;
    left: 40px;
    background-color: var(--button-primary);
    color: #fff;
    border: none;
    padding: 0 15px 6px 15px;
    border-radius: 50%;
    font-size: 25px;
    cursor: pointer;
    z-index: 10002;
    opacity: 1;
}

@media only screen and (max-width: 799px) {
    .new-post-btn {
        position: fixed;
        bottom: 4px;
        left: 9px;
        background-color: var(--button-primary);
        color: #fff;
        border: none;
        padding: 0 15px 6px 15px;
        border-radius: 50%;
        font-size: 25px;
        cursor: pointer;
        z-index: 10002;
        opacity: 0.9;
    }
}

.new-post-btn:hover {
    opacity: 0.9;
}

.close {
    color: #007bff;
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* Post highlight animation for new posts */
.highlight-new-post {
    animation: highlightPulse 3s ease-in-out;
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 0 20px rgba(29, 155, 255, 0.3) !important;
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.5);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(29, 155, 255, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.3);
    }
}
.close:hover {
color: #fff;
}

/* Two-column layout */
#postsFeedLarge { 
    display: flex; 
    gap: 20px;
    width: 100%;
}

#postsFeedLarge .post-column { 
    flex: 1;
    display: block;
    flex-direction: column;
}

/* Two-column layout for posts feed on large screens */
@media (min-width: 800px) {
  #postsFeedLarge {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
  }
}

/* Single-column layout for posts feed on small screens */
@media (max-width: 799px) {
  #postsFeedLarge {
    display: block;
    width: 100%;
  }
}

/* Columns showing sticky info on top of the verification and post section */
.row-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

/* Hide wide and tall images by default */
.hidden-image {
    display: none;
}

/* Hide wide and tall images by default */
.hidden-image {
    display: none;
}

/* Hide wide image on small screens */
@media only screen and (max-width: 799px) {
    #wide-img {
        display: none;
    }
}

/* Hide tall image on large screens */
@media only screen and (min-width: 800px) {
    #tall-img {
        display: none;
    }
}

/* Fullscreen overlay styles */
.fullscreen-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease-in-out;
    z-index: 1000;
}

.fullscreen-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    transition: transform 0.3s ease-in-out;
}

.fullscreen-overlay.active {
    opacity: 1;
    display: flex;
}

.fullscreen-overlay:not(.active) {
    opacity: 0;
}


/* ----------------------------
   SEARCH SECTION
   ---------------------------- */
.searchbox {
  --target-size: 48px;
  --box-height: var(--target-size);
  --border-radius: calc(var(--box-height) / 2);
  --border-width: 2px;
  --icon-size: calc(var(--box-height) * 3/4 );
  --side-margin: calc(var(--border-radius) / 2);
  --icon-vertical-margin: calc( ( var(--box-height) - var(--icon-size) ) / 2 );
}

/* PDF Card Styles (moved from app.js) */
.post-pdf { margin-top: 8px; position: relative; overflow: visible; z-index: 0; }
.post-pdf .pdf-card {
  position: relative; display: block; width: 100%;
  height: 150px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)),
    linear-gradient(0deg, rgba(200,200,200,0.05), rgba(200,200,200,0.05));
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: box-shadow .18s ease;
  contain: layout paint;
  isolation: isolate;
}
.post-pdf .pdf-card:hover { box-shadow: 0 12px 26px rgba(0,0,0,0.24); }
.post-pdf .pdf-card .pdf-thumb {
  position: absolute; inset: 0;
  background:
    radial-gradient(700px 180px at var(--mx, 30%) -20%, rgba(255,255,255,0.22), transparent 46%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.035) 0 2px, rgba(255,255,255,0.02) 2px 4px),
    linear-gradient(180deg, rgba(22,22,22,0.5), rgba(18,18,18,0.62));
  pointer-events: none;
}
.post-pdf .pdf-card .pdf-shimmer {
  position: absolute; top: -40%; left: -20%; width: 60%; height: 180%;
  background: linear-gradient(108deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: rotate(8deg); pointer-events: none; opacity: .9; transition: none;
}
.post-pdf .pdf-card:hover .pdf-shimmer { animation: pdfShine 1s ease-in-out 1 both; animation-delay: 0s; }
.post-pdf .pdf-card .pdf-badge {
  position: absolute; top: 10px; left: 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  padding: 4px 8px; border-radius: 10px; color: #fff;
  background: linear-gradient(135deg, rgba(180,180,180,.25), rgba(220,220,220,.18));
  border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(6px);
}
.post-pdf .pdf-card .pdf-icon {
  position: absolute; right: 12px; bottom: 12px; width: 24px; height: 24px;
  color: #e84c3d !important; opacity: .95; filter: drop-shadow(0 6px 14px rgba(0,0,0,.35));
  display: block; pointer-events: none;
}
.post-pdf .pdf-card .pdf-icon path { fill: currentColor !important; }
.post-pdf .pdf-fill { width: 100%; height: 150px; border-radius: 12px; }
@keyframes pdfShine { 0% { transform: translateX(-120%) rotate(8deg); } 60% { transform: translateX(180%) rotate(8deg); } 100% { transform: translateX(180%) rotate(8deg); } }

/* ----------------------------
   PDF OVERLAY (centralized)
   ---------------------------- */
.pdf-overlay { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 2147483000; overflow: auto; opacity: 0; transition: opacity .3s ease; isolation: isolate; }
.pdf-overlay:not(.active) { display: none !important; pointer-events: none !important; visibility: hidden !important; }
.pdf-overlay.active { display: flex; opacity: 1; pointer-events: auto; }
body.pdf-overlay-active { overflow: hidden; }
.pdf-modal { width: min(1100px, 100vw); height: 100vh; background: rgba(20,20,20,.6); border: 1px solid rgba(255,255,255,.18); border-radius: 0; box-shadow: 0 10px 30px rgba(0,0,0,.35); display: flex; flex-direction: column; overflow: auto; transform: scale(0.9); opacity: 0; transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .3s ease; }
.pdf-overlay.active .pdf-modal { transform: scale(1); opacity: 1; }
.pdf-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 12px 30px; border-bottom: 1px solid rgba(255,255,255,.15); color: #fff; }
.pdf-modal-title { font-weight: 700; }
.pdf-modal-close { background: transparent; border: none; color: #fff; border-radius: 10px; padding: 6px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.pdf-modal-close .icon { margin: 0; transition: transform .18s ease, opacity .18s ease; }
.pdf-modal-close:hover .icon { transform: scale(1.08) rotate(90deg); opacity: .9; }
.pdf-content { position: relative; flex: 1; overflow: auto; background: #111; display: flex; align-items: center; justify-content: center; min-height: 0; }
.pdf-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #111; color: #fff; font-size: 1.1rem; opacity: 1; transition: opacity .5s ease; z-index: 1; animation: pdfLoadingPulse 1.5s ease-in-out infinite; }
@keyframes pdfLoadingPulse { 0%,100% { opacity: 1 } 50% { opacity: 0.6 } }
@keyframes spin { 0% { transform: rotate(0deg) } 100% { transform: rotate(360deg) } }
.pdf-embed { position: relative; display: block; width: 100%; height: 100%; border: 0; outline: none; box-shadow: none; background: transparent; opacity: 0; transition: opacity .4s ease; z-index: 2; }
.pdf-overlay:not(.active) .pdf-embed { display: none !important; pointer-events: none !important; opacity: 0 !important; }
.pdf-embed.loaded { opacity: 1; }
.pdf-embed.loaded + .pdf-loading { opacity: 0; pointer-events: none; }
@media (max-width: 768px){
  .pdf-overlay { align-items: stretch; justify-content: stretch; }
  .pdf-modal { width: 100vw; height: 100svh; border-radius: 0; }
  .pdf-modal-header { padding: 12px 10px 12px 30px; }
  .pdf-content { overflow: auto; -webkit-overflow-scrolling: touch; }
  .pdf-embed { position: relative; width: 100%; height: auto; min-height: 100%; }
  .pdf-embed-mobile { 
    position: relative !important; 
    width: 100% !important; 
    height: 100vh !important; 
    min-height: 100vh !important;
    border: none !important;
    background: white !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  .pdf-mobile-viewer {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  }
  
  .pdf-mobile-header {
    text-align: center;
    margin-bottom: 20px;
  }
  
  .pdf-mobile-icon {
    font-size: 3rem;
    margin-bottom: 15px;
  }
  
  .pdf-mobile-header h3 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 1.5rem;
  }
  
  .pdf-mobile-header p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
  }
  
  .pdf-mobile-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .pdf-mobile-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .pdf-mobile-view-btn {
    background: #007AFF;
    color: white;
  }
  
  .pdf-mobile-view-btn:hover {
    background: #0056CC;
    transform: translateY(-2px);
  }
  
  .pdf-mobile-download-btn {
    background: #34C759;
    color: white;
  }
  
  .pdf-mobile-download-btn:hover {
    background: #28A745;
    transform: translateY(-2px);
  }
  
  .pdf-mobile-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    min-height: 200px;
  }
  
  .pdf-mobile-loading {
    text-align: center;
    color: #666;
  }
  
  .pdf-mobile-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e9ecef;
    border-top: 3px solid #007AFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
  }
  
  .pdf-mobile-fullscreen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    display: flex;
    flex-direction: column;
    z-index: 1000;
  }
  
  .pdf-mobile-controls {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
  }
  
  .pdf-mobile-control-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .pdf-mobile-control-btn:first-child {
    background: #dc3545;
    color: white;
  }
  
  .pdf-mobile-control-btn:first-child:hover {
    background: #c82333;
  }
  
  .pdf-mobile-control-btn:last-child {
    background: #007AFF;
    color: white;
  }
  
  .pdf-mobile-control-btn:last-child:hover {
    background: #0056CC;
  }
  
  .pdf-mobile-content {
    flex: 1;
    position: relative;
  }
  
  .pdf-mobile-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
  }
  
  .pdf-mobile-embed {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    background: white !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
  }
  
  /* Fix mobile PDF scrolling */
  .pdf-content {
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  .pdf-embed {
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  .pdf-mobile-viewer-container {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .pdf-mobile-pages {
    padding: 20px;
  }
  
  .pdf-mobile-info, .pdf-mobile-error {
    text-align: center;
    padding: 40px 20px;
  }
  
  .pdf-mobile-icon-large {
    font-size: 4rem;
    margin-bottom: 20px;
  }
  
  .pdf-mobile-info h4, .pdf-mobile-error h4 {
    color: #333;
    margin: 0 0 15px 0;
    font-size: 1.3rem;
  }
  
  .pdf-mobile-info p, .pdf-mobile-error p {
    color: #666;
    margin: 0 0 25px 0;
    line-height: 1.5;
  }
  
  .pdf-mobile-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
  }
  
  .pdf-mobile-actions .pdf-mobile-btn {
    flex: none;
    min-width: 120px;
  }
  
  .pdf-mobile-canvas-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  
  .pdf-mobile-canvas-wrapper {
    flex: 1;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .pdf-mobile-object {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
  }
  
  .pdf-mobile-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 20px;
    text-align: center;
  }
  
  .pdf-mobile-pages-wrapper {
    padding: 20px;
  }
  
  .pdf-mobile-counter {
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 20px;
    z-index: 100;
    backdrop-filter: blur(10px);
  }
  
  .pdf-mobile-page-container {
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
  }
  
  .pdf-mobile-page-header {
    background: #f8f9fa;
    padding: 10px 15px;
    border-bottom: 1px solid #dee2e6;
  }
  
  .pdf-mobile-page-number {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
  }
  
  .pdf-mobile-page {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
  }
  
  /* Futuristic PDF Viewer Styles */
  .pdf-mobile-futuristic-viewer {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
  }
  
  .pdf-mobile-iframe-futuristic,
  .pdf-mobile-object-futuristic,
  .pdf-mobile-embed-futuristic {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 15px;
    background: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  }
  
  .pdf-mobile-futuristic-fallback,
  .pdf-mobile-futuristic-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 20px;
  }
  
  .pdf-mobile-hologram {
    position: relative;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  }
  
  .pdf-mobile-hologram::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #00ff88, #0088ff, #8800ff, #ff0088);
    border-radius: 22px;
    z-index: -1;
    animation: hologramBorder 3s linear infinite;
  }
  
  .pdf-mobile-hologram-content {
    position: relative;
    z-index: 1;
  }
  
  .pdf-mobile-icon-large {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: hologramGlow 2s ease-in-out infinite alternate;
  }
  
  .pdf-mobile-hologram h4 {
    color: white;
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  }
  
  .pdf-mobile-hologram p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 25px 0;
    line-height: 1.6;
    font-size: 1rem;
  }
  
  .pdf-mobile-quantum-loader {
    display: flex;
    justify-content: center;
    gap: 8px;
  }
  
  .pdf-mobile-quantum-dot {
    width: 12px;
    height: 12px;
    background: linear-gradient(45deg, #00ff88, #0088ff);
    border-radius: 50%;
    animation: quantumPulse 1.5s ease-in-out infinite;
  }
  
  .pdf-mobile-quantum-dot:nth-child(2) {
    animation-delay: 0.3s;
  }
  
  .pdf-mobile-quantum-dot:nth-child(3) {
    animation-delay: 0.6s;
  }
  
  .pdf-mobile-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
  }
  
  .pdf-mobile-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #0088ff);
    border-radius: 2px;
    animation: progressFlow 2s ease-in-out infinite;
  }
  
  @keyframes hologramBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  
  @keyframes hologramGlow {
    0% { filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3)); }
    100% { filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8)); }
  }
  
  @keyframes quantumPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
  }
  
  @keyframes progressFlow {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
  }
}

/* shaping the box */
.searchbox {
  height: var(--box-height);
  max-width: 320px;
}
.searchbox input[type="search"] {
  border: var(--border-width) solid var(--dark-gray);
  border-radius: var(--border-radius);
  height: 100%;
  width: 100%;
}

.searchbox svg {
  fill: rgba(136, 136, 136, 0.32);
  height: var(--icon-size);
  width: var(--icon-size);
}
.searchbox input[type="search"] {
  -webkit-appearance: none;
  color: var(--dark-gray); 
  font-family: 'Noto Sans', Verdana, sans-serif;
  font-size: 1rem;
}
.searchbox input[type="search"]::placeholder {
  color: var(--light-gray);

}

 /* positioning inner elements */
.searchbox {
  position: relative;
}
.searchbox svg {
  position: absolute;
  left: var(--side-margin);
  top: var(--icon-vertical-margin);
  bottom: var(--icon-vertical-margin);
}
.searchbox input[type="search"] {
  padding-left: calc( var(--side-margin) + var(--icon-size) + 4px);
  padding-right: var(--side-margin);
}
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

/* Ensuring that tapping the icon focuses the search box */
.searchbox svg {
  z-index: -1;
}
.searchbox input[type="search"] {
  background: transparent;
  color:  var(--light-gray);
}

/* Styling focus state */
.searchbox input[type="search"]:focus {
  border-color: var(--focus-blue);
  box-shadow: 0px 0px 5px var(--focus-blue);
  outline: 1px solid transparent;
}

.searchbox input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgb(148, 148, 148)' %3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z' /%3E%3C/svg%3E%0A");
  height: calc(var(--box-height) / 2);
  width: calc(var(--box-height) / 2);
}

input[type="search"] {
  -webkit-tap-highlight-color: transparent;
}


/* Positioning the search box */
body .searchbox {
  width: 100%;
  top: 0;
  margin-bottom: 2rem;
}

/* ----------------------------
   CONTENT SECTION
   ---------------------------- */

/* ===== General Styling for Sections ===== */
section .section {
    color: var(--text-primary);
    font-family: 'Anvir Next', -apple-system, BlinkMacSystemFont, 'IBM Plex Sans', 'Source Sans Pro', 'Lora', 'Merriweather', Arial, sans-serif;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0;
}

/* ===== Prevent Unwanted Scrollbars ===== */
section .section {
    scrollbar-width: none;
}

section .section::-webkit-scrollbar,
section .section .scrollable-content::-webkit-scrollbar {
    width: 0px;
}

/* ===== Scrollable Content Adjustments ===== */
.scrollable-content {
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 0;
    scrollbar-width: none;
    color: #fff;
    justify-content: center;
    align-items: center;
    transform: scale(0.9);
    opacity: 0.85;
    animation: expandCenter 1s ease-out forwards, fadeInDark 0.8s ease-out forwards;
    /*will-change: transform, opacity;*/
}

/* Expand from Center Animation */
@keyframes expandCenter {
    from {
        transform: scale(0.5);
    }
    to {
        transform: scale(1);
    }
}

/* Darker Fade-In Effect */
@keyframes fadeInDark {
    from {
        opacity: 0.85;
        filter: brightness(0.8);
    }
    to {
        opacity: 1;
        filter: brightness(1);
    }
}

/* Hide Scrollbar for WebKit Browsers */
.scrollable-content::-webkit-scrollbar {
    width: 0;
}

/* ===== Section for Page Content (Adjusted for Fixed Header & Sidebar) ===== */
section .section {
    flex-grow: 1;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 150px 20px;
    line-height: 1.6;
    max-width: 1200px;
    width: 100%;
    margin: auto;
    touch-action: pan-y;
    padding-left: 60px;
    padding-top: 90px;
}

@media screen and (min-width: 1050px) {
    section .section {
        padding-left: 130px;
    }
}

/* Adjust for smaller screens */
@media only screen and (max-width: 799px) {
    section .section {
        padding: 100px 10px;
    }
}

/* ===== Headings & Typography ===== */
section .section h1 {
    font-family: 'Helvetica Neue', 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'IBM Plex Sans', 'Source Sans Pro', 'Lora', 'Merriweather', Helvetica, Arial, sans-serif;
    font-size: 3em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5em;
    line-height: 1.2;
}

section .section h2 {
    font-family: 'Helvetica Neue', 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'IBM Plex Sans', 'Source Sans Pro', 'Lora', 'Merriweather', Helvetica, Arial, sans-serif;
    font-size: 2em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5em;
    line-height: 1.2;
}

section .section h3 {
    font-family: 'Helvetica Neue', 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'IBM Plex Sans', 'Source Sans Pro', 'Lora', 'Merriweather', Helvetica, Arial, sans-serif;
    font-size: 1.8em;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.4em;
    line-height: 1.2;
}

section .section h4 {
    font-family: 'Helvetica Neue', 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'IBM Plex Sans', 'Source Sans Pro', 'Lora', 'Merriweather', Helvetica, Arial, sans-serif;
    font-size: 1.4em;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.3em;
    line-height: 1.2;
}

section .section p {
    font-size: 1em;
    color: var(--text-primary);
    margin-bottom: 1em;
    line-height: 1.6;
}

ul, ol {
    line-height: 1.5rem;
    color: var(--text-primary);
    padding-left: 30px;
    list-style-type: circle;
}

ul li, ol li {
    line-height: 1.5rem;
    color: var(--text-primary);
}
/* ===== Adjust List Margins & Styling ===== */
section .section ul,
section .section ol {
    margin-left: 0;
    margin-bottom: 1em;
    color: var(--text-primary);
    padding-left: 30px;
}

section .section li {
    margin-bottom: 0.5em;
    color: var(--text-primary);
    padding-left: 30px;
}

/* Adjustments for Smaller Screens */
@media only screen and (max-width: 799px) {
    section .section ul,
    section .section ol {
        margin-left: 0;
    }
}

/* ===== Justified Text with Hyphenation ===== */
.justified-hyphenated {
    text-align: justify;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    word-wrap: break-word;
    text-justify: inter-word;
    font-kerning: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Language-Specific Hyphenation */
.justified-hyphenated.lang-en,
.justified-hyphenated.lang-fr {
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

/* ===== Links & Hover Effects ===== */
section .section a {
    color: var(--text-primary);
    text-decoration: none;
}

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

/* ===== Article Content (Ensures Proper Text Formatting) ===== */
.article-content p {
    text-align: justify;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    word-wrap: break-word;
    text-justify: inter-word;
    font-kerning: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ----------------------------
   HEADER SECTION
   ---------------------------- */
.hidden {
    display: none;
}

* {
    touch-action: manipulation;
}

header {
    width: 100%;
    max-width: 1130px;
    position: sticky;
    top: 0;
    height: 80px;
    padding: 10px 0;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: space-around;
    transition: left 0.3s ease, width 0.3s ease;
    z-index: 999;
    touch-action: none;
    pointer-events: auto;
    margin: 0 auto;
}

/* Header Layout and spacing */
header nav {
  display: flex;
  width: 100%;
  max-width: 1130px;
  justify-content: center;
  position: relative;
}
/* --- Header Navigation Styles --- */
.main-header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 32px;
  height: 64px;
  background: var(--bg-secondary);
  width: 100%;
  max-width: 1130px;
  justify-content: space-around;
  position: relative;
  border-bottom: 1px solid var(--border-color);
}
nav .header-link,
.header-link {
  position: relative;
  font-size: clamp(1.1rem, 1.25vw, 1.4rem);
  font-weight: 600 !important;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0 12px;
  height: 64px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
  border-bottom: none;
}

nav .header-link.active,
nav .header-link.posts-link.active,
.header-link.active,
.header-link.posts-link.active {
  border-bottom: none;
}
nav .header-link.posts-link.active::after,
nav .header-link.dynamic-link.active::after,
.header-link.posts-link.active::after,
.header-link.dynamic-link.active::after {
  content: '';
  display: block;
  position: absolute;
  left: 0; 
  right: 0; 
  bottom: 0;
  height: 2px;
  background: var(--button-primary);
  border-radius: 3px 3px 0 0;
  z-index: 2;
}
body.dark-theme nav .header-link.posts-link.active::after,
body.dark-theme nav .header-link.dynamic-link.active::after,
body.dark-theme .header-link.posts-link.active::after,
body.dark-theme .header-link.dynamic-link.active::after {
  background: #60a5fa;
}

.header-link::after {
  background: none;
  height: 0;
  content: none;
}

/* Active indicators for ALL header links including dynamic menu options */
nav .header-link.menu-option.active::after,
.header-link.menu-option.active::after {
  content: '';
  display: block;
  position: absolute;
  left: 0; 
  right: 0; 
  bottom: 0;
  height: 2px;
  background: var(--button-primary);
  border-radius: 3px 3px 0 0;
  z-index: 2;
}

body.dark-theme nav .header-link.menu-option.active::after,
body.dark-theme .header-link.menu-option.active::after {
  background: #60a5fa;
}

.theme-switcher {
align-items: center;
justify-content: center;
background: var(--bg-secondary, #f8f9fa);
cursor: pointer;
transition: background 0.2s, border 0.2s, box-shadow 0.2s, color 0.2s;
color: var(--primary-color, #1d9bff);
z-index: 10;
border: none;
background: none;
}
.theme-switcher svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: var(--primary-color, #1d9bff);
  transition: fill 0.2s;
}
.theme-switcher:hover, .theme-switcher:focus {
  color: var(--text-primary);
}
.theme-switcher:hover svg, .theme-switcher:focus svg {
  fill: #fff;
}
[data-theme="dark"] .theme-switcher {
  background: var(--bg-secondary, #222);
  border-color: var(--primary-color, #1d9bff);
  color: var(--primary-color, #1d9bff);
}
[data-theme="dark"] .theme-switcher svg {
  fill: var(--primary-color, #1d9bff);
}
[data-theme="dark"] .theme-switcher:hover, [data-theme="dark"] .theme-switcher:focus {
  background: var(--primary-color, #1d9bff);
  color: #fff;
  border-color: #fff;
}
[data-theme="dark"] .theme-switcher:hover svg, [data-theme="dark"] .theme-switcher:focus svg {
  fill: #fff;
}

/* ===== Hide Elements ===== */
@media screen and (max-width: 799px) {
    #tdg {
        display: none;
    }
}

@media screen and (min-width: 800px) {
    #tdgsmall {
        display: none;
    }
}

/* ======================
   Gatekeper
   ====================== */
.access-container {
    text-align: left;
    max-width: 300px;
    width: 100%;
    min-height: 80vh;
}
.input::placeholder {
  color: #0f0;
  background-color: transparent;
}
/* Autofilled (Chrome, Safari, Edge) */
.input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0px 1000px #000 inset;
  -webkit-text-fill-color: #0f0;
}
.input:focus,
.input:focus-visible {
    outline: none;
    box-shadow: none;
}
.access-input {
    font-size: 1.2rem;
    padding: 12px 27px;
    margin: 5px 0;
    border: 1px solid #0f0;
    background-color: var(--bg-secondary);
    color: #0f0;
    text-align: left;
    max-width: 300px;
    width: 100%;
    display: block;
    margin-left: -18%;
    height: 40px;
    border-top-right-radius: 75px;
    border-bottom-right-radius: 75px;
    border-left: 75px solid #ff4500;
    width: 80%;
}
.access-input::placeholder {
  color: #0f0;
  background-color: transparent;
}
/* Autofilled state (Chrome, Safari, newer Edge) */
.access-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0px 1000px #000 inset;
  -webkit-text-fill-color: #0f0;
}
/* Autofilled state (Firefox) */
@-moz-document url-prefix() {
  .access-input:-moz-autofill {
    background-color: #000;
    color: #0f0;
  }
}
.access-input:focus,
.access-input:focus-visible {
    outline: none;
    box-shadow: none;
}
.access-button-top {
    font-size: 1.2rem;
    padding: 24px 18px;
    margin: 0 auto;
    border: 1px solid #0f0;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 0;
    border-top-left-radius: 15px;
    border-bottom-left-radius: 0;
    border-left: 2px solid orange;
    background-color: var(--bg-secondary);
    color: #0f0;
    cursor: pointer;
    width: 40%;
    display: block;
    text-align: center;
}
.button-top {
    font-size: 1.2rem;
    padding: 24px 21px;
    margin-left: 15px;
    border: 1px solid #0f0;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 0;
    border-top-left-radius: 15px;
    border-bottom-left-radius: 0;
    border-left: 2px solid orange;
    background-color: var(--bg-secondary);
    color: #0f0;
    cursor: pointer;
    display: block;
    width: 35%;
    text-align: center;
    
}
.access-button-bottom {
    font-size: 1.2rem;
    padding: 24px 12px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
    border-top-right-radius: 0;
    border-bottom-right-radius: 15px;
    border-top-left-radius: 0; 
    border-bottom-left-radius: 15px;
    border-left: 2px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-color);
    cursor: pointer;
    width: 40%;
    display: block;
    text-align: center;
}
.access-message {
    margin-bottom: 50px;
}
.error-message {
    padding-top: 30px;
    color: var(--text-primary);
    transform: skewY(30deg);
}
.access-container > * {
    transform: skewY(-30deg);
}
/* Align all elements to the same left starting point */
.access-button-top,
.access-button-bottom {
    margin-left: 5%;
    width: 150px;
}

/* ----------------------------
   TOOLTIP SECTION
   ---------------------------- */

/* General tooltip */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

/* General tooltip implementation */
.tooltip::after {
    content: attr(data-tooltip);
    visibility: hidden;
    opacity: 0;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    text-align: center;
    padding: 5px 10px;
    border: 1px solid var(--border-color, #555);
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out, transform 0.3s ease-in-out;
    z-index: 999999;
}

.tooltip::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: var(--border-color, #555) transparent transparent transparent;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 999999;
    margin-bottom: 3px;
}

.tooltip:hover::after,
.tooltip:hover::before {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
}

/* Post highlight animation for new posts */
.highlight-new-post {
    animation: highlightPulse 3s ease-in-out;
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 0 20px rgba(29, 155, 255, 0.3) !important;
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.5);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(29, 155, 255, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.3);
    }
}

/* Tooltip text - LEFT SIDE */
.tooltip-left::after {
    content: attr(data-tooltip);
    visibility: hidden;
    opacity: 0;
    background-color: var(--bg-secondary);
    color: #fff;
    text-align: left;
    padding: 5px 10px;
    border: 1px solid #555;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;

    position: absolute;
    bottom: 130%;
    left: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out, transform 0.3s ease-in-out;
    z-index: 999999;
}

/* Tooltip arrow for LEFT SIDE */
.tooltip-left::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 10px;
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 999999;
}

/* Show left tooltip */
.tooltip-left:hover::after,
.tooltip-left:hover::before {
    visibility: visible;
    opacity: 1;
    transform: scaleX(1);
}

/* Tooltip text - RIGHT SIDE */
.tooltip-right::after {
    content: attr(data-tooltip);
    visibility: hidden;
    opacity: 0;
    background-color: var(--bg-secondary);
    color: #fff;
    text-align: right;
    padding: 5px 10px;
    border: 1px solid #555;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    position: absolute;
    bottom: 130%;
    right: 0;
    transform: scaleX(0);
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out, transform 0.3s ease-in-out;
    z-index: 999999;
}

/* Tooltip arrow for RIGHT SIDE */
.tooltip-right::before {
    content: "";
    position: absolute;
    bottom: 100%;
    right: 10px;
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 999999;
}

/* Show right tooltip */
.tooltip-right:hover::after,
.tooltip-right:hover::before {
    visibility: visible;
    opacity: 1;
    transform: scaleX(1);
}

/* Blurred image wrapper */
#postsContainer img {
    transition: filter 0.3s ease;
    will-change: filter;
    display: block;
    max-width: 100%;
    border-radius: 25px;
    overflow: hidden;
    position: relative;
    object-fit: cover;
}

.imageinput {
    display: none;
}

h1 {
  font-size: 2.5em;
  color: var(--button-primary);
  margin-bottom: 20px;
}
h2 {
  font-size: 2em;
  color: var(--button-primary);
  margin-bottom: 20px;
}
h3, h4 {
    color: var(--button-primary);
    /*border-bottom: 1px solid #000;*/
    padding-bottom: 5px;
    font-size: 1.3em;
}
.highlight {
    background: var(--bg-tertiary);
    padding: 10px;
    border-left: 10px solid var(--button-primary);
    font-style: italic;
    color: var(--text-secondary);
    font-weight: 900;
}
p {
  margin-bottom: 15px;
}

/* =========================
   Left Sidebar - Sticky
   ========================= */
.left-sidebar {
    position: sticky;
    top: 0;
    min-height: 100vh;
    max-height: 100vh;
    height: 100vh;
    overflow-y: auto;
    width: 100%;
    max-width: 230px;
    background: var(--bg-secondary);
    padding: 1rem;
    border-right: 1px solid var(--border-color);
    z-index: 1000;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.left-sidebar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.left-sidebar::-webkit-scrollbar {
    display: none;
}

.brand-logo {
    margin-top: 0;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    width: 130px;
    height: auto;
    gap: 15px;
    text-decoration: none;
}

.brand-logo .icon {
  margin: 0;
  padding: 0;
}

@media screen and (max-width: 768px) {
  .brand-logo {
        margin-left: -5px;
        margin-bottom: 0.5rem;
        align-items: center;
        min-width: 35px;
        min-height: 35px;
        gap: 15px;
        text-decoration: none;
    }
  
    .brand-logo .icon {
      margin: 0;
      padding: 0;
    }
}
.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 200px;
}

.text-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: calc(230px - 65px);
}

.brand-top {
    font-size: 1.6rem;
    font-weight: bold;
    letter-spacing: 0.35em;
    color: orange;
    white-space: nowrap;
}

.brand-bottom {
    margin-top: -10px;
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.6em;
    color: green;
    white-space: nowrap;
}

.sidebar-item {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  transition: border-bottom-width 0.2s ease;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-item:last-child {
  border-bottom: none;
}

.sidebar-item img {
    margin: 2rem 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
}

.sidebar-item svg {
    margin: 2rem 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
}

.sidebar-item span {
    font-size: 19px;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

.sidebar-item:hover {
    opacity: 0.8;
    transition: background-color 0.2s ease;
}

/* Center Content */
.content-area {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1130px;
    margin: 0 auto;
    flex-grow: 1;
    background: var(--bg-secondary);
    color: #efefef;
    border-right: 1px solid var(--border-color);
}

@media only screen and (max-width: 860px) {
    .content-area {
        border-right: none;
    }
    .container {
        padding: 0;
    }
}
/* Main Content */
.main-content {
    margin: 0 auto;
    flex-grow: 1;
    max-width: 720px;
    width: 100%;
    /* Prevent last lines from being obscured by surrounding layout */
    padding-bottom: 120px;
}

.inner-contents {
  margin: 0 auto;
  padding: 1rem;
  justify-content: center;
  align-items: center;
  transform: scale(0.9);
  opacity: 0.85;
  animation: expandCenter 0.4s ease-out forwards, fadeInDark 0.2s ease-out forwards;
  max-width: 860px;
  box-sizing: border-box;
  /* Provide extra breathing room at bottom for long content pages */
  margin-bottom: 2rem;
}

/* Expand from Center Animation */
@keyframes expandCenter {
    from {
        transform: scale(0.5);
    }
    to {
        transform: scale(1);
    }
}

/* Darker Fade-In Effect */
@keyframes fadeInDark {
    from {
        opacity: 0.85;
        filter: brightness(0.8);
    }
    to {
        opacity: 1;
        filter: brightness(1);
    }
}

.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
    max-width: 555px;
}

#postsContainer {
    padding: 1rem 1rem 4rem 1rem;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    transform: scale(0.9);
    opacity: 0.85;
    animation: expandCenter 0.4s ease-out forwards, fadeInDark 0.2s ease-out forwards;
    /*will-change: transform, opacity;*/
}

/* Expand from Center Animation */
@keyframes expandCenter {
    from {
        transform: scale(0.5);
    }
    to {
        transform: scale(1);
    }
}

/* Darker Fade-In Effect */
@keyframes fadeInDark {
    from {
        opacity: 0.85;
        filter: brightness(0.8);
    }
    to {
        opacity: 1;
        filter: brightness(1);
    }
}

#postsFeedLarge {
    display: flex;
    width: 100%;
    max-width: 555px;
    gap: 25px;
}

.post-column {
    width: 100%;
    /*border-radius: 15px;*/
    background: var(--bg-secondary);
}

/* Right Sidebar */
.right-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    width: 100%;
    max-width: 320px;
    background: var(--bg-secondary);
    padding: 1rem;
    flex-shrink: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding-bottom: 80px;
}

/* Add Widget Section */
.add-widget-section {
    margin-bottom: 3rem!important;
    text-align: center;
    width: 100%;
}

.add-widget-btn {
    width: 100%;
    border: none;
    cursor: pointer;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.add-widget-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.right-sidebar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.right-sidebar::-webkit-scrollbar {
    display: none;
}
.searchbox {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: inherit;
}

.searchbox input[type="search"] {
    border: 2px solid var(--border-color);
}

.widget {
    background: var(--bg-secondary);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
    max-height: 400px;
}

.widget img {
    border-radius: var(--border-radius);
}

.widget p {
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
}

/* Editable Widget Styles */
.editable-widget {
    position: relative;
    transition: all 0.3s ease;
}

.editable-widget[draggable="true"] {
    cursor: move;
}

.editable-widget[draggable="false"] {
    cursor: default;
}

.editable-widget:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.editable-widget.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.editable-widget.drag-over {
    border: 2px dashed var(--button-primary);
}

.widget-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    text-align: center;
    width: 100%;
}

.widget-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.5;
  word-wrap: break-word;
  max-width: 100%;
  padding: 5px 0 10px 0;
  width: 100%;
}

.widget-actions {
    display: flex;
    gap: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    margin-top: 1rem;
    /* margin-bottom: 0.5rem; */
    justify-content: center;
    width: 100%;
    max-width: 250px;
    padding: 1rem 0 0.5rem 0;
    border-top: 1px solid var(--border-color);
}

.widget-title[contenteditable="true"] {
    background: var(--input-bg);
    border: 1px solid var(--input-focus);
    border-radius: var(--border-radius-small);
    padding: 0.25rem 0.5rem;
    outline: none;
}

.editable-widget:hover .widget-actions {
    opacity: 1;
}

.widget-content {
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.widget-media {
    position: relative;
    margin-bottom: 1rem;
}

.widget-media-input {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.5rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius-small);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.widget-media-input:focus {
    border-color: var(--button-primary);
    box-shadow: 0 0 0 2px rgba(29, 155, 255, 0.2);
    outline: none;
}

.widget-text p[contenteditable="true"] {
    background: var(--input-bg);
    border: 1px solid var(--input-focus);
    border-radius: var(--border-radius-small);
    padding: 0.5rem;
    outline: none;
    min-height: 60px;
    transition: all 0.3s ease;
}

.widget-text p[contenteditable="true"]:focus {
    border-color: var(--button-primary);
    box-shadow: 0 0 0 2px rgba(29, 155, 255, 0.2);
}

.widget-title[contenteditable="true"]:focus {
    border-color: var(--button-primary);
    box-shadow: 0 0 0 2px rgba(29, 155, 255, 0.2);
}

/* Widget Text Overlay */
.widget-text {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 2rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.6;
    z-index: 10;
    transform: translateY(100%);
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    max-height: 90%;
    min-height: 120px;
    overflow-y: auto;
    opacity: 0;
}

.widget-text.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.widget-text p {
    margin: 0;
    color: var(--text-primary);
}

.widget-text-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: bold;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.widget-text-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Widget Media Container */
.widget-media {
    position: relative;
    margin-bottom: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.widget-media img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.widget-media img:hover {
    transform: scale(1.02);
}

/* Add a subtle indicator that images are clickable */
.widget-media {
    position: relative;
}

/* Search widget specific styling */
.widget .searchbox {
    margin: 0;
    padding: 1rem;
    background: var(--input-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.widget-media::before {
    content: "ℹ";
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    pointer-events: none;
}

.widget-media:hover::before {
    opacity: 1;
}

.widget-edit-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Drag and Drop Visual Feedback */
.right-sidebar.drag-active {
    background: var(--bg-tertiary);
    transition: background-color 0.3s ease;
}

.right-sidebar.drag-active .editable-widget:not(.dragging) {
    opacity: 0.7;
}

.editable-widget.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
    transition: all 0.3s ease;
    z-index: 1000;
}

.editable-widget.drag-over {
    border: 2px dashed var(--button-primary);
    background: var(--bg-tertiary);
    transition: all 0.2s ease;
}

/* Widget Spacing for Buttons */
.editable-widget {
    padding: 0.5rem;
    margin-bottom: 1rem;
}

.editable-widget .widget-header {
    margin-bottom: 0.5rem;
}

.editable-widget .widget-content {
    margin: 0;
}

/* Button Size Adjustments for Sidebar */
.editable-widget .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    line-height: 1.2;
}

.editable-widget .widget-actions .btn {
    min-width: 70px;
    max-width: 80px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: var(--button-primary);
    color: var(--text-white);
}

/* Move Icon Styling */
.icon-move {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    cursor: move;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border-radius: var(--border-radius-small);
    background: transparent;
}

.icon-move:hover {
    color: var(--button-primary);
    transform: scale(1.1);
}

.icon-move .icon {
    width: 20px;
    height: 20px;
}

.icon-move svg {
    width: 20px;
    height: 20px;
}

/* Widget Actions Layout */
.editable-widget[draggable="true"]:hover .widget-actions {
    opacity: 1;
}

.editable-widget[draggable="false"]:hover .widget-actions {
    opacity: 0;
}

/* Edit Actions Layout */
.widget-edit-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.widget-edit-actions .btn {
    min-width: 80px;
    font-weight: 500;
}

/* Success Message Styling */
.widget-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 300px;
    word-wrap: break-word;
}
    
.doge-content {
    max-height: 500px;;
    overflow: hidden;
}

.twitter-timeline {
    max-height: 500px;
    min-height: 300px;
}

/* Banner for Posts Column */
.banner {
    width: 100%;
    max-width: 555px;
    background: var(--button-primary);
    color: #fff;
    text-align: center;
    padding: 10px 15px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 25px;
    margin-top: 1.5em;
    margin-bottom: 2em;
}

@media (max-width: 799px) {
    .right-sidebar {
        display: none;
    }
}

/* Responsive Design */
@media (max-width: 799px) {
    #hide-sm-logo {
        display: none
    }
    .brand-top {
        position: relative;
        text-indent: -9999px; /* Hides text */
    }
    .brand-top::after {
        content: "";
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;  /* Adjust size as needed */
        height: 40px;
        background: url("assets/img/logo.png") no-repeat center;
        background-size: contain;
    }
    .brand-bottom {
        display: none;
    }
    .left-sidebar {
        min-width: 50px;
        max-width: 50px;
        align-items: center;
    }
    .sidebar-item {
        margin-left: -0.35rem;
        width: 28px;
    }
    .left-sidebar {
        overflow-y: auto;
    }
    .brand-bottom {
        display: none;
    }
    .sidebar-item span {
        display: none;
    }
    /* Keep post button text visible on small screens */
    .openPostModal span {
        display: inline !important;
        font-weight: bold;
        color:var(--text-primary);
    }
    /* Post feed toggle now behaves like other sidebar items on small screens */
    /* Make post button more prominent on mobile */
    .openPostModal {
        background: var(--bg-secondary);
        /*border-radius: 8px;*/
        /*padding: 6px 0 10px 10px;*/
        /*margin-top: 2.5rem;*/
        /*border: 1px solid var(--link-color);*/
        /*border-radius: 100%;*/
        /*margin-right: 0.15rem;*/
    }
    
    .openPostModal .icon {
        width: 32px;
        height: 32px;
        margin: 0;
        margin-top: 2rem;
    }
    header {
        position: sticky;
        padding: 10px 0;
        height: 60px;
    }
    .content-area {
    margin: 0 auto;
    flex-grow: 1;
    align-items: center;
    }
}

@media (min-width: 900px) {
    .right-sidebar {
        display: block;
    }
}

@media (min-width: 900px) {
    #hide-lg-logo {
        display: none
    }
    .left-sidebar {
        min-width: 180px;
    }
    .inner-contents {
        min-width: 400px;
    }
    .main-content {
        min-width: 400px;
    }
}

/* Override min-width constraints for small screens */
@media (max-width: 779px) {
    .inner-contents {
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 0.5rem !important;
    }
    .main-content {
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    .section-block {
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .comments-section {
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    .post {
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    .post-feed {
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}
@media (max-width: 899px) {
    .right-sidebar {
        display: none;
    }
}
/* Text-based Post and Expand Section */
.post {
    background: var(--bg-secondary);
    border: 1px solid #222;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    min-width: 100px;
    max-width: 100%;
    padding: 1rem;
    margin-bottom: 1.5rem;
    transition: height 1.3s ease-in-out;
}

.text-post {
    background: var(--bg-secondary);
    border-radius: 25px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #222;
    font-size: 1rem;
    line-height: 1.6;
    overflow: hidden;
    transition: max-height 1.3s ease-in-out;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

/* Post btn */
.post-btn {
    background-color: var(--button-primary);
    color: var(--text-white);
    font-weight: 600;
    border: none;
    border-radius: 27px;
    padding: 15px 5px;
    font-size: clamp(16px, 2vw, 28px);
    cursor: pointer;
    transition: background-color 0.12s ease;
    margin-top: 2rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; 
    position: relative;
    box-sizing: border-box;
    max-height: 55px;
}

.verification-required .icon {
    max-width: 28px;
    max-height: 28px;
}
.post-btn:hover {
    background-color: #2992d8;
}

.post-btn-plus {
    background-color: var(--button-primary);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-weight: 600;
    font-size: 26px;
    cursor: pointer;
    transition: background-color 0.12s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    display: none;
    margin-top: 1.5rem;
    padding: 0 17px 3px 17px;
}
        
.reward-submit-btn {
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    background: #1d9bff;
    color: #fff;
    border: none;
    border-radius: 27px;
    cursor: pointer;
    margin-top: 10px;
    width: auto;
    position: static;
    display: inline-block;
    text-align: center;
    align-content: right;
}

.reward-submit-btn:hover {
    background-color: var(--text-orange);
    color: #ffffff;
}

.post-btn-plus:hover {
    background-color: var(--button-primary);
    color: #ffffff;
    opacity: 0.7;
}

@media (max-width: 799px) {
    .post-btn {
        display: none;
    }
    
    .post-btn-plus {
        display: flex;
    }
    #postsContainer {
        padding: 0.5rem;
        gap:0;
    }
}

/* ----------------------------
   MAIN SECTION
   ---------------------------- */
#postsContainer #hideMe {
    display: none;
}

.space {
    padding-top: 30px;
}

/* Submit Button */
.submit-btn-css {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
}

/* Hover Effect */
.submit-btn-css:hover svg polygon {
    fill: var(--button-primary);
}

.post {
    margin-top: 10px;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    color: #A8A8B4;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Positioned with sidebar and header */
.post-button {
    background-color: rgb(239, 243, 244);
    color: #000;
    border: none;
    padding: 10px 25px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.8px;
}

.post-button:hover {
    background-color: var(--bg-secondary);
    color: #A8A8B4;
    border: 1px solid #A8A8B4;
}

/* Random CSS Header.php */

#doge-wide {
    display: none;
}

@media (max-width: 799px) {
    #doge-wide {
        display: none;
    }

    #doge-tall {
        display: block;
    }
}

@media (min-width: 800px) {
    #doge-tall {
        display: none;
    }

    #doge-wide {
        display: block;
    }
}

/* Fixed Top Navigation */
#topNavigation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: var(--bg-secondary);
    border-bottom: 2px solid #222;
    z-index: 10001;
}

/* ----------------------------
   POST SECTION
   ---------------------------- */
.posttrack {
    margin: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    min-width: 320px;
    max-width: 100%;
    width: 100%;
    padding: 1.5rem;
    display: inline-block;
    overflow-wrap: break-word;
    color: var(--color);
    margin-top: 10px;
    transition: height 0.3s ease-in-out;
    box-sizing: border-box;
}
@media screen and (max-width: 799px) {
    .posttrack {
        padding: 1rem;
    }
}
.post-expanded-content {
    display: none;
    max-height: 0;
    min-height: 0;
    opacity: 0;
    padding: 0;
    transform: translateY(40px);
    transition: opacity 0.35s cubic-bezier(0.4,0,0.2,1), transform 0.35s cubic-bezier(0.4,0,0.2,1);
    will-change: opacity, transform, max-height;
}
.post-expanded-content.slide-in {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.post-expanded-content.slide-out {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}

.posttrack.expanded .post-expanded-content {
    max-height: 420px;
    min-height: 120px;
    opacity: 1;
    overflow-y: auto;
    padding: 16px 0 0 0;
}

.posttrack.expanded .post-expanded-content::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

.posttrack.expanded .post-expanded-content {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.clamp-preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    max-height: calc(1.5em * 3);
    transition: max-height 0.4s cubic-bezier(.4,0,.2,1);
    position: relative;
}

.text-post.expanded .post-text {
    max-height: none;
}

.posttrack.expanded .post-text {
    -webkit-line-clamp: unset;
    max-height: 1000px;
    transition: max-height 0.4s cubic-bezier(.4,0,.2,1);
}

.expand-text {
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 300;
    float: right;
    background: none;
    padding: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.post-text-animate-out {
    animation: jeniFadeOut 0.9s ease forwards;
}

.posttrack.expanded .post-text {
    max-height: none;
}

.post-text-wrapper {
    max-height: 120px;
    overflow: hidden;
    transition: max-height 0.9s ease-in-out;
    position: relative;
    min-height: 2.2em;
    will-change: max-height;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.posttrack.expanded .post-text-wrapper {
    max-height: 1500px;
}

.post-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 1rem;
    line-height: 1.6;
    overflow-wrap: break-word;
    width: 100%;
    max-width: 779px;
    box-sizing: border-box;
}

.post-content img {
    cursor: pointer;
    border-radius: 25px;
}

.post-image {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    cursor: pointer;
    display: block;
    border-radius: var(--border-radius);
    margin: 0.5rem 0;
    box-shadow: 0 2px 8px var(--shadow-light);
}
.post-image .blurred-image {
  border-radius: var(--border-radius)!important;
}
.post-text {
    font-size: 1rem;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    word-break: break-all;
    overflow-wrap: break-word;
    transition: max-height 1.3s ease-in-out;
    opacity: 1;
    transform: translateY(0);
    will-change: opacity, transform;
}

/* ----------------------------
   FOOTER SECTION
   ---------------------------- */
.footer {
    position: fixed;
    height: 50px;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    border-top: 1px solid var(--border-color);
    box-sizing: border-box;
    overflow: hidden;
    pointer-events: none;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    /*will-change: transform, opacity;*/
}

.footer-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    max-width: 1130px;
    color: var(--color-primary);
    box-sizing: border-box;
    transition: transform 0.3s ease;
    pointer-events: auto;
    padding: 0 20px;
}

.footer-left,
.footer-right {
    flex: 1;
    box-sizing: border-box;
    width: 100%;
}

.footer-center {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-width: 200px;
}

.footer-left {
    display: flex;
    justify-content: flex-start;
}

.footer-center .footer-nav {
    justify-content: center;
}

.footer-center a {
    text-align: center;
    display: inline-block;
}

.footer-right {
    display: flex;
    justify-content: flex-end;
    color: var(--color-secondary);
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-nav {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    color: var(--text-secondary);
}

.footer-nav a {
    text-decoration: none;
    color: var(--color-secondary);
    font-size: 14px;
    font-weight: 600;
    opacity: 0.7;
    transition: color 0.3s ease;
    flex: 1;
    text-align: center;
}

/* Hover Effect */
.footer-nav a:hover {
    color: var(--link-hover);
}

/* Credit Link */
.credit-link {
    cursor: pointer;
}

/* Post highlight animation for new posts */
.highlight-new-post {
    animation: highlightPulse 3s ease-in-out;
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 0 20px rgba(29, 155, 255, 0.3) !important;
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.5);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(29, 155, 255, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.3);
    }
}

@media screen and (max-width: 799px) {
    .footer {
        display: none;
    }
}

.edit-save-btn .icon, .edit-cancel-btn .icon {
  width: 20px;
  height: 20px;
  margin: 0;
}
#creditPopup {
    position: fixed;
    bottom: 50px;
    left: 50%;


    background-color: var(--bg-secondary);
    z-index: 1001;
    box-sizing: border-box;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.9s ease;
}

/* Show the popup */
#creditPopup.show {
    visibility: visible;
    opacity: 1;
}

/* Style the content inside the popup */
#creditPopup .credit-content {
    background-color: inherit;
    padding: 40px 20px;
    border-radius: 5px;
    max-width: 799px;
    width: 100%;
    color: #fff;
    background: var(--bg-secondary);
    position: relative;
    border-top: 1px solid var(--border-color);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    line-height: 1.3em;
    box-sizing: border-box;
}

/* Close button styling */
#creditPopup .close-btn {
    position: absolute;
    top: 5px;
    right: 20px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

/* Post highlight animation for new posts */
.highlight-new-post {
    animation: highlightPulse 3s ease-in-out;
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 0 20px rgba(29, 155, 255, 0.3) !important;
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.5);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(29, 155, 255, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.3);
    }
}

#creditPopup .close-btn svg {
    width: 30px;
    height: 30px;
    stroke: #fff;
}

/* ====================================
   DELETE BUTTON STYLING
   ==================================== */
.delete-btn {
    position: relative;
    border: none !important;
    outline: none;
}

/* Modal slide-in animation */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ====================================
   MODAL COMPONENTS
   ==================================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  backdrop-filter: blur(4px);
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 2.2rem 1.5rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Modal */
.maker-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-secondary);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999999;
}

.maker-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-wrapper {
  position: relative;
  max-width: 700px;
  width: 90%;
  background: var(--bg-secondary);
  border-radius: 10px;
  color: #fff;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-content {
  padding: 2rem;
  overflow-y: auto;
  max-height: 90vh;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.modal-content::-webkit-scrollbar {
  display: none;
}

.x-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 34px;
  color: #fff;
  font-weight: 100;
  cursor: pointer;
  z-index: 1001;
}

.modal-content h2 {
  margin-top: 0;
  color: #ffc107;
}

.modal-content img {
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
  border-radius: 8px;
}

.copy-address {
  padding: 10px;
  border-radius: 27px;
  cursor: pointer;
  text-align: center;
  margin-top: 10px;
  font-weight: bold;
  background: var(--bg-glass);
  color: var(--text-primary);
  word-break: break-all;
}

.copy-address:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
  text-decoration: underline;
}

.open-link {
  color: #0056b3;
  text-decoration: underline;
  cursor: pointer;
}

/* Post highlight animation for new posts */
.highlight-new-post {
    animation: highlightPulse 3s ease-in-out;
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 0 20px rgba(29, 155, 255, 0.3) !important;
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.5);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(29, 155, 255, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.3);
    }
}

/* Feedback */
.feedback {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--button-primary);
    color: #ffffff;
    border: none;
    border-radius: 27px;
    padding: 10px 10px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.12s ease;
    max-width: 120px;
    width: 100%;
}

.feedback:hover {
    opacity: 0.9;
}

#feedbackBalloon {
  position: fixed;
  bottom: 60px;
  padding-right: 20px;
  right: max(15px, calc(50% - 565px));
  color: white;
  cursor: pointer;
  z-index: 1000;
  animation: pulse-fade 10s 1 forwards;
}

@media (max-width: 799px) {
  #feedbackBalloon {
    bottom: 20px;
    right: 0;
  }
}

@keyframes pulse-fade {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
}

/* Modern Feedback Modal Styles */
#feedbackModal {
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.6);
}

#feedbackModal .modal-content {
  position: relative;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  border-radius: 24px;
  box-shadow: 
    0 32px 64px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  animation: feedbackModalSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 2px solid var(--border-color);
  transform: translateY(0);
}

#feedbackModal .modal-header {
  background: transparent;
  color: var(--text-primary);
  padding: 24px 32px 16px 32px;
  border-radius: 24px 24px 0 0;
  position: relative;
  border-bottom: 1px solid var(--border-color);
}

#feedbackModal .modal-header h2 {
  color: var(--text-primary);
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  position: relative;
}

#feedbackModal .modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

#feedbackModal .modal-close:hover {
  background: var(--hover-bg);
  border-color: var(--text-secondary);
  transform: scale(1.1);
}

#feedbackModal .modal-close svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

#feedbackModal .modal-body {
  padding: 32px;
  background: var(--bg-primary);
}

#feedbackModal .form-group {
  margin-bottom: 24px;
}

#feedbackModal .form-group label {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 1rem;
}

#feedbackModal textarea {
  width: 100%;
  min-height: 120px;
  padding: 16px 20px;
  border: 2px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.6;
  resize: vertical;
  transition: all 0.3s ease;
  font-family: inherit;
  box-sizing: border-box;
}

#feedbackModal textarea:focus {
  outline: none;
  border-color: #1d9bff;
  box-shadow: 0 0 0 4px rgba(29, 155, 255, 0.1);
  background: var(--bg-primary);
}

#feedbackModal textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

#feedbackModal .char-counter {
  text-align: right;
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

#feedbackModal .form-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

#feedbackModal .btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

#feedbackModal .btn-secondary:hover {
  background: var(--hover-bg);
  border-color: var(--text-secondary);
  transform: translateY(-2px);
}

#feedbackModal .btn-primary {
  background: linear-gradient(135deg, #1d9bff 0%, #0d7cd6 100%);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(29, 155, 255, 0.3);
}

#feedbackModal .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(29, 155, 255, 0.4);
}

#feedbackModal .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 12px rgba(29, 155, 255, 0.2);
}

/* Animations */
@keyframes feedbackModalSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}
/* Responsive Design */
@media (max-width: 768px) {
  #feedbackModal .modal-content {
    width: 95%;
    margin: 20px;
    border-radius: 20px;
  }
  
  #feedbackModal .modal-header {
    padding: 20px 24px;
    border-radius: 20px 20px 0 0;
  }
  
  #feedbackModal .modal-body {
    padding: 24px;
  }
  
  #feedbackModal .form-actions {
    flex-direction: column;
    gap: 12px;
  }
  
  #feedbackModal .btn-secondary,
  #feedbackModal .btn-primary {
    width: 100%;
    justify-content: center;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.donation {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px 20px 10px 20px;
    max-width: 520px;
    text-align: center;
    margin: 20px auto;
    color: var(--text-primary);
    box-sizing: border-box;
    float: none;
    display: block;
}
.copy-address {
    text-align:center; 
    padding:20px 20px;
    font-weight:900; 
    border-radius: 50px;
    cursor: pointer;
}

/* Post highlight animation for new posts */
.highlight-new-post {
    animation: highlightPulse 3s ease-in-out;
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 0 20px rgba(29, 155, 255, 0.3) !important;
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.5);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(29, 155, 255, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.3);
    }
}
.copy-address:hover {
    color: var(--text-primary);
}

.download-card {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #222;
    color: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(255, 255, 255, 0.2);
    text-align: center;
    width: 220px;
    font-family: Arial, sans-serif;
}
.download-card h4 {
    margin: 0;
    color: var(--button-primary);
    font-size: 16px;
}
.download-card p {
    font-size: 14px;
    margin: 10px 0;
    color: #ccc;
}
.download-btn {
    display: inline-block;
    background-color: var(--button-primary);
    color: #ffffff;
    padding: 10px 25px;
    border-radius: 27px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.12s ease;
    box-sizing: border-box;
}
.download-btn:hover {
    background-color: var(--text-secondary);
    color: #ffffff;
    transition: background-color 0.12s ease;
}

/* ====================================
   BUTTONS
   ==================================== */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--border-radius);
  transition: all var(--transition);
  user-select: none;
  min-width: 80px;
}

.btn:hover {
  text-decoration: none;
}

.rightside {
    margin:20px 0; 
    display:flex; 
    justify-content:flex-end;
}

.leftside {
    margin:20px 0; 
    display:flex; 
    justify-content:flex-start;
}

.btn:focus {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--button-primary);
  border-color: var(--button-primary);
  color: var(--text-inverse);
}

.btn-primary:hover {
  background-color: var(--button-primary-hover);
  border-color: var(--button-primary-hover);
  color: var(--text-inverse);
}

.btn-secondary {
  background-color: var(--button-secondary);
  border-color: var(--button-secondary);
  color: var(--text-inverse);
}

.btn-secondary:hover {
  background-color: var(--button-secondary-hover);
  border-color: var(--button-secondary-hover);
  color: var(--text-inverse);
}

.btn-outline-primary {
    color: #1d9bff;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid #1d9bff;
    border-radius: 27px;
    padding: 8px 16px;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-outline-primary:hover {
  background-color: var(--button-primary);
  border-color: var(--button-primary);
  color: var(--text-inverse);
}

.btn-success {
  background-color: var(--success);
  border-color: var(--success);
  color: var(--text-inverse);
}

.btn-warning {
  background-color: var(--warning);
  border-color: var(--warning);
  color: var(--text-primary);
}

.btn-danger {
  background-color: var(--danger);
  border-color: var(--danger);
  color: var(--text-inverse);
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.125rem;
}

/* ====================================
   SEARCH RESULTS PAGE
   ==================================== */
/* Results Page Styles */
.results-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.results-error {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

.results-error h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.results-error p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.results-post-details {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin: 2rem 0;
    overflow: hidden;
}

.results-post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem 1rem 0 1rem;
    border-bottom: 1px solid var(--border-color);
}

.results-post-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    margin-right: 2rem;
}

.results-post-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    width: 100%;
}

.results-post-meta > div {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--input-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    white-space: nowrap;
    flex: 1;
    justify-content: center;
}

.results-post-meta > div:first-child {
    justify-content: flex-start;
}

.results-post-meta > div:last-child {
    justify-content: flex-end;
}

.results-post-type {
    color: var(--button-primary);
    background: rgba(29, 155, 255, 0.1);
    border-color: rgba(29, 155, 255, 0.2);
    text-transform: uppercase;
    font-weight: 600;
}

.results-post-content {
    padding: 2rem;
}

.results-post-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--input-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.results-post-author {
    color: var(--text-primary);
    font-weight: 500;
}

.results-post-id {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.results-content-text {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.results-post-image {
    text-align: center;
    margin: 2rem 0;
}

.results-image {
    max-width: 100%;
    max-height: 500px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.results-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.results-image-caption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.results-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: var(--input-bg);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.placeholder-text {
    font-size: 1rem;
    font-weight: 500;
}

.placeholder-debug {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--input-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.placeholder-debug small {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    word-break: break-all;
}

.results-navigation {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin: 2rem 0;
   flex-wrap: wrap;
   gap: 1rem;
}

.results-navigation-btn {
  background: var(--bg-secondary);
  color: var(--bg-accent);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--bg-accent);
  border-radius: 27px;
  padding: 0 16px;
  display: inline-block;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  width: 95px;
  cursor: pointer;
}

.results-navigation-btn:hover {
   background: var(--bg-accent);
   color: white;
   text-decoration: none;
}

.results-navigation-btn .icon {
  width: 26px;
  height: 26px;
  margin: 0;
}

.results-nav-actions {
   display: flex;
   gap: 1rem;
   flex-wrap: wrap;
}

/* Back to Results Button Styling */
.back-to-results-btn {
   color: #1d9bff;
   font-weight: 600;
   text-decoration: none;
   border: 2px solid #1d9bff;
   border-radius: 27px;
   padding: 8px 16px;
   display: inline-block;
   transition: all 0.3s ease;
   font-size: 0.9rem;
   width: 95px;
}

.back-to-results-btn:hover {
   background: #1d9bff;
   color: white;
   text-decoration: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .results-page-container {
        padding: 1rem 0.5rem;
    }
    
    .results-post-header {
        flex-direction: column;
        gap: 0.1rem;
        padding: 0 1rem 1.5rem 1rem;
    }
    
    .results-post-meta {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.25rem;
        justify-content: space-between;
        width: 100%;
    }
    
    .results-post-meta > div {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
        flex: 1;
        text-align: center;
    }
    
    .results-post-meta > div:first-child {
        text-align: left;
    }
    
    .results-post-meta > div:last-child {
        text-align: right;
    }
    
    .results-post-info {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
   .results-navigation {
       flex-direction: row;
       align-items: stretch;
       gap: 1rem;
   }
   
   .results-nav-actions {
       justify-content: center;
   }
   
   .results-navigation .btn {
      width: 95px;
      height: 40px;
      text-align: center;
      margin: 0;
   }
   
   .back-to-results-btn {
       text-align: center;
      width: 95px;
      height: 40px;
       margin: 0;
   }
}
/* ====================================
   CARDS AND CONTENT BLOCKS
   ==================================== */
.card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px var(--shadow-light);
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: 0 4px 8px var(--shadow-medium);
  transform: translateY(-2px);
}

.card-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-tertiary);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  font-weight: 600;
}

.card-body {
  padding: 1rem;
}

.card-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-tertiary);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* ====================================
   POST COMPONENTS
   ==================================== */
.post-container {
  margin-bottom: 2rem;
}

.post-item {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px var(--shadow-light);
  transition: all var(--transition);
}

.post-item:hover {
  box-shadow: 0 4px 16px var(--shadow-medium);
  transform: translateY(-1px);
}

.post-drop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background: var(--bg-glass);
  border-bottom: 1px solid rgba(147, 51, 234, 0.2);
  font-size: 0.6rem;
  color: var(--text-secondary);
  line-height: 1.2;
  margin-bottom: 0.5rem;
  border-radius: 5px;
}

.drop-info-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  order: 1;
}

.drop-icon {
  color: rgba(147, 51, 234, 0.8);
  flex-shrink: 0;
}

.drop-text {
  font-weight: 500;
  color: rgba(147, 51, 234, 1);
  letter-spacing: 0.01em;
  margin-left: 5px;
}

.drop-timestamp {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
  margin-left: auto;
  order: 2;
}

/* Dark mode styles for drop header */
html.dark .post-drop-header,
html[data-theme="dark"] .post-drop-header {
  background: rgba(147, 51, 234, 0.15);
  border-bottom: 1px solid rgba(147, 51, 234, 0.3);
}

html.dark .drop-icon,
html[data-theme="dark"] .drop-icon {
  color: rgba(168, 85, 247, 0.9);
}

html.dark .drop-text,
html[data-theme="dark"] .drop-text {
  color: rgba(168, 85, 247, 1);
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.post-author,
.post-timestamp {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.6rem;
    white-space: nowrap;
    line-height: 1.1;
}

.post-author {
    display: inline-block;
    max-width: 65%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-timestamp {
    margin-left: auto;
    text-align: right;
}

@media (max-width: 480px) {
    .post-author,
    .post-timestamp {
        font-size: 0.70rem;
        letter-spacing: 0.01em;
    }
    .post-author {
        flex: 1 1 auto;
        max-width: 60%;
    }
    .post-timestamp {
        flex: 0 0 auto;
        margin-left: auto;
        text-align: right;
    }
}

.post-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-light);
}

.like-button {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius);
  transition: all var(--transition);
}

.like-button:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.like-button.liked {
  color: var(--danger);
}

.comment-button {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius);
  transition: all var(--transition);
}

.comment-button:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

/* ====================================
   COMMENT SYSTEM
   ==================================== */
.comments-section {
    width: 30%;
    min-width: 469px;
    height: 100%;
    background: var(--bg-z);
    border-left: 1px solid var(--border-color);
    border-top: none;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.05);
}

.comment-form {
  background-color: var(--bg-tertiary);
  padding: 1rem;
  margin-bottom: 1rem;
}

.comment-form-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.comment-form-section textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--input-bg);
  color: var(--text-primary);
  font-size: 0.875rem;
  resize: vertical;
  margin-bottom: 0.5rem;
}

.comments-section input,
.comments-section textarea {
  -webkit-text-size-adjust: 100%;
  border: 1px solid var(--border-color);
}

.comment-form-section textarea:focus {
  outline: none;
  border-color: var(--bg-accent);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.comment-form-section .comment-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comment-form-section .comment-send {
  background-color: var(--bg-accent);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color var(--transition);
}

.comment-form-section .comment-send:hover {
  background-color: var(--bg-accent-hover);
}

.comment-form-section .comment-send:disabled {
  background-color: var(--text-muted);
  cursor: not-allowed;
}
/* Enhanced Comment System */
.comment {
  display: flex;
  gap: 12px;
  padding: 16px;
  margin-bottom: 12px;
  background: var(--bg-secondary);
  border-radius: 18px;
  border: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
  position: relative;
  align-items: flex-start;
}

/* Post author styling - 10px from border */
.comment.post-author {
  padding-left: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

/* Commenter styling - 15px from border */
.comment.commenter {
  padding: 10px 5px 0 10px;
  border-left: 2px solid var(--border-light);
  margin-left: 5px;
}

/* Reply styling - 15px from border */
.comment.reply {
  padding-left: 15px;
  border-left: 2px solid var(--border-light);
  margin-left: 5px;
  background-color: var(--bg-tertiary);
}

/* Vertical line for visual hierarchy */
.comment.commenter::before,
.comment.reply::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 0;
  bottom: 0;
  width: 1px;
  /*background: linear-gradient(to bottom, transparent, var(--border-light), transparent);*/
}
/* Avatar vertical line for visual continuity */
.comment-avatar::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -8px;
  bottom: -8px;
  width: 0px;
  background: var(--bg-glass);
  transform: translateX(-50%);
  z-index: 1;
}

/* Reply avatar vertical line - smaller */
.comment.reply .comment-avatar::before {
  top: -6px;
  bottom: -6px;
}

.comment-avatar::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  background: var(--bg-glass);;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: -2;
}

/* Reply avatar background circle - smaller */
.comment.reply .comment-avatar::after {
  width: 24px;
  height: 24px;
}

/* Enhanced visual hierarchy */
.comment.post-author .comment-username {
  color: var(--bg-accent);
  font-weight: 700;
}

.comment.post-author .comment-avatar {
  border: 2px solid var(--bg-accent);
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.1);
}

.comment.commenter .comment-username {
  color: var(--text-primary);
  font-weight: 600;
}

.comment.reply .comment-username {
  color: var(--text-primary);
  font-weight: 500;
}

/* Subtle hover effects */
.comment.post-author:hover {
  background: linear-gradient(135deg, var(--bg-secondary), rgba(13, 110, 253, 0.08));
  transform: translateX(2px);
}

.comment.commenter:hover {
  background: var(--bg-secondary);
  transform: translateX(1px);
}

.comment.reply:hover {
  background: var(--bg-tertiary);
  transform: translateX(1px);
}

.comment-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.comment-btn svg {
    width: 20px;
    height: 20px;
}

.comment-btn:hover {
    transform: translateY(-2px);
}

.comment {
  transition: all 0.2s ease;
}

/*.comment:last-child {*/
/*  border-bottom: none;*/
/*}*/

.comment:hover {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 16px;
  margin: 0 -16px;
}

.comment-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-accent), var(--primary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  position: relative;
  z-index: 3;
}

.comment-content {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.comment-username {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.comment-timestamp {
  color: var(--text-muted);
  font-size: 12px;
}

.comment-message {
  line-height: 1.5;
  word-wrap: break-word;
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 8px;
}

.comment-actions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.comment-reply-btn,
.comment-like-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.comment-reply-btn:hover,
.comment-like-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.comment-replies {
  margin-top: 12px;
  padding-left: 20px;
  border-left: 1px solid var(--border-light);
}

/* Reply comment styling */
.comment.reply {
  margin-top: 8px;
  padding: 12px;
  background-color: var(--bg-tertiary);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-light);
}

.comment.reply .comment-avatar {
  width: 24px;
  height: 24px;
  font-size: 12px;
  position: relative;
  z-index: 3;
}

.comment.reply .comment-username {
  font-size: 13px;
}

.comment.reply .comment-timestamp {
  font-size: 11px;
}

.comment.reply .comment-message {
  font-size: 13px;
}

.comment.reply .comment-actions {
  gap: 12px;
}

.comment.reply .comment-reply-btn,
.comment.reply .comment-like-btn {
  font-size: 11px;
  padding: 3px 6px;
}

/* Reply indicator styling */
.reply-indicator {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  padding: 2px 0;
}

.reply-to-username {
  color: var(--bg-accent);
  font-weight: 500;
  cursor: pointer;
}

/* Post highlight animation for new posts */
.highlight-new-post {
    animation: highlightPulse 3s ease-in-out;
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 0 20px rgba(29, 155, 255, 0.3) !important;
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.5);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(29, 155, 255, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.3);
    }
}

.reply-to-username:hover {
  text-decoration: underline;
}

/* Comment Input Form */
.comment-form-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.comment-input-wrapper {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.comment-input-container {
  flex: 1;
  min-width: 0;
}

.comment-input-container textarea {
  width: 100%;
  min-height: 40px;
  max-height: 120px;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background-color: var(--input-bg);
  color: var(--text-primary);
  font-size: 14px;
  resize: none;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.comment-input-container textarea:focus {
  border-color: var(--bg-accent);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.comment-input-container textarea::placeholder {
  color: var(--text-muted);
}

.comment-input-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding: 0 4px;
}

.comment-input-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.emoji-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.emoji-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.char-count {
  font-size: 12px;
  color: var(--text-muted);
}

.comment-input-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.comment-cancel {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.comment-cancel:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.comment-submit {
  background-color: var(--bg-accent);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.comment-submit:hover:not(:disabled) {
  background-color: var(--bg-accent-hover);
  transform: translateY(-1px);
}

.comment-submit:disabled {
  background-color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

/* Reply Form */
.reply-form {
  margin-top: 12px;
  padding: 12px;
  background-color: var(--bg-tertiary);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-light);
}

.reply-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.reply-avatar {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-accent), var(--primary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color);
  font-size: 12px;
}

.reply-input-container {
  flex: 1;
  min-width: 0;
}

.reply-input-container textarea {
  width: 100%;
  min-height: 32px;
  max-height: 100px;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background-color: var(--input-bg);
  color: var(--text-primary);
  font-size: 13px;
  resize: none;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.reply-input-container textarea:focus {
  border-color: var(--bg-accent);
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.1);
}

.reply-input-container textarea {
  overflow: auto;        /* Enables scrolling */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
}

.reply-input-container textarea::-webkit-scrollbar {
  display: none;         /* Chrome, Safari, Opera */
}

.reply-input-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  padding: 0 4px;
}

.reply-buttons {
  display: flex;
  gap: 6px;
  align-items: center;
}

.reply-cancel {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.reply-cancel:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: 16px;
  padding: 6px 12px;
}

.reply-submit {
  background-color: var(--bg-accent);
  color: var(--color);
  border: none;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reply-submit:hover:not(:disabled) {
  background-color: var(--bg-accent-hover);
  background-color: var(--bg-accent);
  color: white;
  transition: all 0.2s ease;
}

.reply-submit:disabled {
  background-color: var(--text-muted);
  cursor: not-allowed;
}

/* Focus states */
.comment-form-section.focused .comment-input-container textarea {
  border-color: var(--bg-accent);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
  border: 1px solid var(--border-color);
}

/* ====================================
   COMMENT SYSTEM - IMAGE OVERLAY
   ==================================== */
/* Comments Section - 30% width */

.comments-header {
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.comments-header h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.comments-count {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px 30px;
}
@media (max-width: 799px) {
    .comments-list {
        padding: 10px 10px;
     }
}
.comment-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.comment-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.comment-timestamp {
    font-size: 12px;
    color: var(--text-secondary);
}

.comment-content {
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
}

.no-comments {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 60px 20px;
    font-size: 16px;
}

/* Comment Form */
.comment-form {
    padding: 40px 10px;
    border-top: none;
    background: var(--bg-secondary);
    margin-bottom: 1rem;
}

.comment-form textarea {
    width: 100%;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    min-height: 100px;
    box-sizing: border-box;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
    /*border: var(--border-color);*/
    border-radius: var(--border-radius);
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(29, 155, 255, 0.1);
}

.comment-form textarea::placeholder {
    color: var(--text-secondary);
}

.comment-form textarea {
  overflow: auto; /* Enables scrolling */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
}

.comment-form textarea::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.char-count {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.char-count.near-limit {
    color: var(--danger-color);
    font-weight: 600;
}

.comment-submit-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(29, 155, 255, 0.3);
}

.comment-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(29, 155, 255, 0.4);
}

.comment-submit-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Animations */
@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.like-btn.liked .heart {
    animation: heartBeat 0.6s ease;
}

.comment-like-btn svg.liked {
    color: #e74c3c;
    fill: #e74c3c;
    animation: heartBeat 0.6s ease;
}

.comment-like-count {
    margin-left: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.comment-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.comment-like-btn {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.comment-like-btn:hover {
    background-color: var(--bg-secondary);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-item {
    animation: slideIn 0.3s ease;
}

/* Custom Scrollbar */
.comments-list::-webkit-scrollbar {
    width: 6px;
}
.comments-list::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}
.comments-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Loading states */
.image-display.loading {
    position: relative;
}

.image-display.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid var(--bg-secondary);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================
   IMAGE OVERLAY SYSTEM
   ========================== */
/* Main Overlay Container */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.image-overlay.active {
    opacity: 1;
}

/* Close Button */
.image-overlay-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: none;
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    /*backdrop-filter: blur(10px);*/
}

.image-overlay-close:hover {
    /*background: rgba(255, 255, 255, 0.2);*/
    /*border-color: rgba(255, 255, 255, 0.4);*/
    transform: scale(1.1);
}

.image-overlay-close svg {
    width: 24px;
    height: 24px;
    margin: 0;
}

/* Main Content Container */
.image-overlay-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Image Section - 70% width */
.image-section {
    width: 70%;
    height: 100%;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Image Navigation */
.image-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 10;
    pointer-events: none;
}

.nav-btn {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-btn svg {
    width: 24px;
    height: 24px;
}

/* Image Display Area */
.image-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.image-display img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center; /*center center*/
    border-radius: 0;
    box-shadow: none;
    display: block;
    transition: transform 0.3s ease;
}

.image-display img:hover {
    transform: scale(1.02);
}

/* Image Info Bar */
.image-info {
    background: var(--bg-secondary);
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.image-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    /*margin-bottom: 20px;*/
    font-size: 14px;
}

.image-counter {
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(29, 155, 255, 0.3);
}

.image-username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
}

.image-timestamp {
    color: var(--text-secondary);
    font-size: 13px;
}

.image-actions {
    display: flex;
    gap: 15px;
}

.like-btn,
.flag-btn,
.drop-btn,
.report-btn,
.comment-btn,
.image-btn,
.edit-btn,
.delete-btn {
    display: flex;
    align-items: center;
    gap: 0px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.image-actions .like-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(29, 155, 255, 0.3);
}

.like-btn:hover,
.heart-btn:hover,
.flag-btn:hover,
.drop-btn:hover,
.report-btn:hover {
    transform: translateY(-2px);
}

.like-btn.liked {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.like-btn.liked .heart {
    fill: white;
}

.dislike-btn.disliked {
    background: var(--warning-color);
    border-color: var(--warning-color);
    color: black;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.dislike-btn.disliked .thumbs-down {
    fill: black;
}

.like-btn svg,
.flag-btn svg,
.drop-btn svg,
.report-btn svg,
.comment-btn svg,
.image-btn svg,
.edit-btn svg,
.delete-btn svg,
.dislike-btn svg {
    width: 20px;
    height: 20px;
    margin: 0;
}

/* ====================================
   IMAGE OVERLAY COMPONENT (RESPONSIVE)
   ==================================== */
@media (max-width: 799px) {
  .image-overlay {
    align-items: stretch;
    justify-content: stretch;
    background: var(--bg-glass);
    border:none;
  }
  .image-overlay-content {
    position: relative;
    flex-direction: column;
    width: 100vw;
    max-width: 100vw;
    min-height: 100vh;
    height: 100vh;
    background: var(--bg-glass);
    border:none;
    box-shadow: none;
    z-index: 2;
  }
  .image-section {
    display: none !important;
    border:none;
  }
  .image-overlay-blur-bg {
    display: block !important;
    position: fixed;
    border:none;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    background-position: center;
    background-size: cover;
    filter: blur(18px) brightness(0.7);
    pointer-events: none;
    transition: background-image 0.2s;
  }
  .comment {
      padding: 0;
  }
  .comment-form {
      border-top: none;
  }
  .comments-section {
    position: relative;
    z-index: 2;
    width: 100vw;
    min-width: 350px;
    max-width: 100vw;
    min-height: 100vh;
    height: 100vh;
    background: var(--bg-secondary);
    backdrop-filter: blur(0.5px);
    border:none;
    box-shadow: none;
    padding: 0.5rem 0.3rem 2rem 0.3rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  .comments-header{
    border:none;
    padding: 10px;
  }
  .comment-content {
    border-top: none;
    padding-right: 10px;
  }
  .comment-list {
      border: none;
  }
  .comment-replies {
      padding-right: 10px;
  }
  .comment-reply-btn, .comment-like-btn {
      padding: 3px 0;
  }
  .comment-reply-btn, .comment-like-btn:hover {
      border:none;
      background: none;
      /* border-radius: none; */
  }
  #overlayCommentsList {
      border: none;
  }
  .comment.post-author{
    padding: 20px 0;
    border: none; 
    background: linear-gradient(135deg, var(--bg-secondary), rgba(13, 110, 253, 0.05));
    }
  .image-overlay-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: none;
    color: var(--text-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 24px;
    cursor: pointer;
  }
  .image-overlay-close svg {
    width: 24px;
    height: 24px;
  }
  .image-overlay-comments-thumbnail {
    display: none !important;
  }
}

/* ====================================
   ALERTS AND NOTIFICATIONS (THEME-AWARE)
   ==================================== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-primary, #fff);
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 4px 12px var(--shadow-medium, rgba(0,0,0,0.15));
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
    animation: slideIn 0.3s ease;
    color: var(--text-primary, #222);
    border-left: 4px solid var(--border-color, #3b82f6);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.notification-success {
    border-left-color: var(--success, #10b981);
    background: var(--bg-success, linear-gradient(135deg, #ecfdf5, #f0fdf4));
    color: var(--text-success, #047857);
}
.notification-error {
    border-left-color: var(--danger, #ef4444);
    background: var(--bg-danger, linear-gradient(135deg, #fef2f2, #fef2f2));
    color: var(--text-danger, #b91c1c);
}
.notification-warning {
    border-left-color: var(--warning, #f59e0b);
    background: var(--bg-warning, linear-gradient(135deg, #fffbeb, #fefce8));
    color: var(--text-warning, #b45309);
}
.notification-info {
    border-left-color: var(--info, #3b82f6);
    background: var(--bg-info, linear-gradient(135deg, #eff6ff, #f0f9ff));
    color: var(--text-info, #1e40af);
}
.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-secondary, #666);
    transition: color 0.2s;
}
.notification-close:hover {
    color: var(--text-primary, #222);
}
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ALERTS */
.alert {
  padding: 1rem;
  border-radius: var(--border-radius, 8px);
  margin-bottom: 1rem;
  border: 1px solid transparent;
  background: var(--bg-secondary, #f8f9fa);
  color: var(--text-primary, #222);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.alert-success {
  background-color: var(--bg-success, #ecfdf5);
  border-color: var(--success, #10b981);
  color: var(--text-success, #047857);
}
.alert-warning {
  background-color: var(--bg-warning, #fffbeb);
  border-color: var(--warning, #f59e0b);
  color: var(--text-warning, #b45309);
}
.alert-danger {
  background-color: var(--bg-danger, #fef2f2);
  border-color: var(--danger, #ef4444);
  color: var(--text-danger, #b91c1c);
}
.alert-info {
  background-color: var(--bg-info, #eff6ff);
  border-color: var(--info, #3b82f6);
  color: var(--text-info, #1e40af);
}

/* TOASTS */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: var(--bg-secondary, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: var(--border-radius, 8px);
  padding: 1rem;
  box-shadow: 0 4px 16px var(--shadow-medium, rgba(0,0,0,0.12));
  z-index: 3000;
  max-width: 350px;
  animation: toastSlideIn 0.3s ease-out;
  color: var(--text-primary, #222);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ====================================
   SEARCH AND FILTERS
   ==================================== */
.search-bar {
  position: relative;
  margin-bottom: 1rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  padding-right: 3rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  background-color: var(--input-bg);
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--bg-accent);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.search-button {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 0.5rem 1rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
  font-size: 0.875rem;
}

.filter-tab:hover {
  background-color: var(--bg-accent);
  color: var(--text-inverse);
}

.filter-tab.active {
  background-color: var(--bg-accent);
  color: var(--text-inverse);
  border-color: var(--bg-accent);
}

/* ====================================
   PAGINATION
   ==================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0;
}

.page-button {
  padding: 0.5rem 0.75rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  color: var(--text-primary);
  transition: all var(--transition);
  text-decoration: none;
}

.page-button:hover {
  background-color: var(--bg-accent);
  color: var(--text-inverse);
  text-decoration: none;
}

.page-button.active {
  background-color: var(--bg-accent);
  color: var(--text-inverse);
  border-color: var(--bg-accent);
}

.page-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ====================================
   CHAT SYSTEM (Foundation) - REMOVED DUPLICATE RULE
   ==================================== */
/* This duplicate .chat-container rule has been removed to prevent conflicts */

.chat-header {
    position: relative;
    padding: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: linear-gradient(180deg, var(--secondary-color), var(--link-hover));
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.chat-messages {
  flex: 1;
  overflow: hidden;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chat-message {
  max-width: 70%;
  padding: 0.75rem;
  border-radius: var(--border-radius);
  word-wrap: break-word;
}

.chat-message.own {
  align-self: flex-end;
  background-color: var(--bg-accent);
  color: var(--text-inverse);
}

.chat-message.other {
  align-self: flex-start;
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.chat-input-container {
  padding: 1rem;
  background-color: var(--bg-tertiary);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.5rem;
}

.chat-input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--input-bg);
  color: var(--text-primary);
}

/* ====================================
   MODERN CHAT SYSTEM
   ==================================== */

/* Chat Modal */
.chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chat-modal.active {
    opacity: 1;
    display: block !important;
}

.chat-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
}

.chat-modal-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    max-height: 700px;
    margin: 5vh auto;
    background: var(--bg-secondary);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chat-modal.active .chat-modal-container {
    transform: translateY(0) scale(1);
}


.chat-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.chat-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger-color);
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: var(--success-color);
    animation: none;
}
.chat-encryption-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 500;
}
.chat-encryption-indicator .icon {
    width: 14px;
    height: 14px;
}

.chat-header-right {
    display: flex;
    gap: 10px;
}

.chat-minimize-btn,
.chat-email-invite {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-right: 8px;
    position: relative;
}

.chat-email-invite .icon {
    width: 20px;
    height: 20px;
    margin: 0;
}

.chat-email-invite:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}
.chat-email-invite::after {
    content: "Email Invite";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.chat-email-invite:hover::after {
    opacity: 1;
    color: var(--primary-color);
}

/* Chat header actions */
.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-right: 7px;
}

.chat-email-invite {
    position: relative;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-accent);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(29, 155, 240, 0.3);
    z-index: 1;
}

.chat-email-invite:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 16px rgba(29, 155, 240, 0.4);
    color: var(--text-white);
}

.chat-email-invite .icon {
    width: 18px;
    height: 18px;
}

.chat-email-invite::after {
    content: "Email Invite";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    background: var(--bg-primary);
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.chat-email-invite:hover::after {
    opacity: 1;
}

/* Email invite modal */
.email-invite-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10002;
    display: none;
    align-items: center;
    justify-content: center;
}

.email-invite-modal.active {
    display: flex;
}

.email-invite-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    animation: overlayFadeIn 0.3s ease-out;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.email-invite-modal .modal-content {
    position: relative;
    background: var(--bg-primary);
    border-radius: 20px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px var(--border-color),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid var(--border-color);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9) rotateX(10deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

.email-invite-modal .modal-header {
    padding: 32px 32px 24px;
    background: rgba(0, 187, 254, 0.07);
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.email-invite-modal .modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--button-primary-hover), var(--primary-color));
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.email-invite-modal .modal-title-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.email-invite-modal .modal-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--button-primary-hover));
    border-radius: 12px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(29, 155, 240, 0.3);
    animation: iconPulse 2s infinite;
}

.email-invite-modal .icon {
  margin: 0
}
@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.email-invite-modal .modal-icon .icon {
    width: 24px;
    height: 24px;
    color: white;
}

.email-invite-modal .modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.email-invite-modal .modal-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    opacity: 0.8;
}

.email-invite-modal .modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.email-invite-modal .modal-close:hover {
    background: var(--border-color);
    color: var(--text-primary);
    transform: scale(1.1);
}

.email-invite-modal .modal-body {
    padding: 32px;
}

.email-invite-modal .form-group {
    margin-bottom: 24px;
}

.email-invite-modal .input-container {
    position: relative;
    margin-bottom: 12px;
}

.email-invite-modal .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    z-index: 2;
    transition: color 0.3s ease;
}

.email-invite-modal .form-group input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.email-invite-modal .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 
        0 0 0 4px rgba(29, 155, 240, 0.1),
        0 8px 20px rgba(29, 155, 240, 0.2);
    background: var(--bg-primary);
    transform: translateY(-2px);
}

.email-invite-modal .form-group input:focus + .input-icon {
    color: var(--primary-color);
}

.email-invite-modal .input-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--button-primary-hover));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    filter: blur(8px);
}

.email-invite-modal .form-group input:focus ~ .input-glow {
    opacity: 0.3;
}

.email-invite-modal .form-help {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.8;
}

.email-invite-modal .form-help .icon {
    width: 14px;
    height: 14px;
    color: var(--success-color);
}

.email-invite-modal .form-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
}

.email-invite-modal .btn-cancel,
.email-invite-modal .btn-send {
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.email-invite-modal .btn-cancel {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.email-invite-modal .btn-cancel:hover {
    background: var(--border-color);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.email-invite-modal .btn-send {
    background: linear-gradient(135deg, var(--primary-color), var(--button-primary-hover));
    color: white;
    box-shadow: 0 4px 12px rgba(29, 155, 240, 0.3);
}

.email-invite-modal .btn-send:hover {
    background: linear-gradient(135deg, var(--button-primary-hover), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(29, 155, 240, 0.4);
}

.email-invite-modal .btn-send::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;
}

.email-invite-modal .btn-send:hover::before {
    left: 100%;
}

.email-invite-modal .btn-cancel .icon,
.email-invite-modal .btn-send .icon {
    width: 16px;
    height: 16px;
}

/* Installation Success Notice - Modern Glassy Design */
.installation-success-notice {
    margin: 20px 0;
    padding: 0 20px;
    animation: successSlideIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-card {
    background: var(--bg-glass);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-frosted);
    border-radius: 28px;
    padding: 0;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 32px 64px var(--shadow-heavy),
        0 0 0 1px var(--border-frosted),
        inset 0 1px 0 var(--border-frosted),
        inset 0 -1px 0 var(--shadow-light);
}

.success-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        rgba(34, 197, 94, 0.9) 0%, 
        rgba(16, 185, 129, 0.9) 25%,
        rgba(59, 130, 246, 0.9) 50%,
        rgba(147, 51, 234, 0.9) 75%,
        rgba(236, 72, 153, 0.9) 100%);
    border-radius: 28px 28px 0 0;
}

.success-header {
    display: flex;
    align-items: center;
    padding: 40px 40px 32px 40px;
    gap: 24px;
    position: relative;
    z-index: 2;
}

.success-icon-container {
    position: relative;
    flex-shrink: 0;
}

.success-icon-bg {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, 
        rgba(40, 167, 69, 0.2) 0%, 
        rgba(40, 167, 69, 0.1) 100%);
    border: 2px solid var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 32px var(--shadow-medium),
        inset 0 1px 0 var(--border-frosted);
    animation: successBounce 2s ease-in-out infinite;
}

.success-icon {
    color: var(--success-color);
    filter: drop-shadow(0 4px 8px var(--shadow-medium));
    animation: successPulse 2s ease-in-out infinite;
}

.success-title h2 {
    color: var(--text-primary);
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-shadow: 0 4px 12px var(--shadow-heavy);
    letter-spacing: -0.8px;
    line-height: 1.1;
}

.success-subtitle {
    color: var(--text-secondary);
    font-size: 18px;
    margin: 0;
    font-weight: 400;
    text-shadow: 0 2px 8px var(--shadow-medium);
    line-height: 1.4;
}

.success-content {
    padding: 0 40px 40px 40px;
    position: relative;
    z-index: 2;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.stat-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px 24px;
    text-align: center;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: statSlideUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px var(--shadow-light);
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes statSlideUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-item:hover {
    transform: translateY(-8px) scale(1.02);
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    box-shadow: 
        0 20px 40px var(--shadow-medium),
        0 0 0 1px var(--primary-color),
        inset 0 1px 0 var(--border-frosted);
}

.stat-icon {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 48px;
}

.stat-icon .icon {
    width: 32px;
    height: 32px;
    color: var(--text-secondary);
    filter: drop-shadow(0 2px 8px var(--shadow-light));
    transition: all 0.3s ease;
}

.stat-item:hover .stat-icon .icon {
    color: var(--primary-color);
    transform: scale(1.1);
    filter: drop-shadow(0 4px 12px var(--shadow-medium));
}

.stat-text {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px var(--shadow-medium);
    letter-spacing: -0.2px;
}

.stat-status {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    text-shadow: 0 1px 4px var(--shadow-light);
}

.success-actions {
    text-align: center;
}

.success-message {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 24px 28px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 
        0 8px 32px var(--shadow-light),
        inset 0 1px 0 var(--border-frosted);
}

.success-message {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    text-shadow: 0 2px 8px var(--shadow-medium);
    line-height: 1.4;
}

.success-message span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.success-message span svg {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  text-align: center;
}

@keyframes successSlideIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes successBounce {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 
            0 8px 32px var(--shadow-medium),
            inset 0 1px 0 var(--border-frosted);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 
            0 12px 40px var(--shadow-heavy),
            inset 0 1px 0 var(--border-frosted);
    }
}

@keyframes successPulse {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 4px 8px var(--shadow-medium));
    }
    50% { 
        transform: scale(1.1);
        filter: drop-shadow(0 6px 12px var(--shadow-heavy));
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .success-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 32px 24px 24px 24px;
    }
    
    .success-icon-bg {
        width: 70px;
        height: 70px;
    }
    
    .success-title h2 {
        font-size: 28px;
    }
    
    .success-subtitle {
        font-size: 16px;
    }
    
    .success-content {
        padding: 0 24px 32px 24px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        margin-bottom: 32px;
    }
    
    .stat-item {
        padding: 20px 16px;
    }
    
    .stat-text {
        font-size: 16px;
    }
    
    .stat-status {
        font-size: 14px;
    }
    
    .success-message {
        padding: 20px 24px;
    }
    
    .success-message p {
        font-size: 16px;
    }
}

/* Sidebar icon labels */
.sidebar-icon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.sidebar-item .icon-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1;
    margin-top: 2px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.sidebar-item:hover .icon-label {
    opacity: 1;
    color: var(--primary-color);
}

/* Sidebar Widget Toggle */
.widget-toggle-item {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 1rem !important;
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid var(--border-color) !important;
}
.widget-toggle-item .icon {
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    color: var(--text-primary) !important;
    fill: var(--text-primary) !important;
}

.widget-toggle-item span {
    font-size: 19px !important;
    font-weight: 400 !important;
    letter-spacing: 0.5px !important;
    color: var(--text-primary) !important;
    margin: 0 !important;
}
/* Hide widget toggle on small screens */
@media (max-width: 799px) {
    .widget-toggle-item {
        display: none !important;
    }
}
/* Show as circle icon on larger screens */
@media (min-width: 800px) {
    .widget-toggle-item {
        justify-content: flex-start !important;
        gap: 1.5rem !important;
    }
    
    .widget-toggle-item span {
        display: inline !important;
    }
    
    .toggle-switch-sidebar {
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        background-color: #ccc !important;
        border: none !important;
        cursor: pointer !important;
        transition: background-color 0.3s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .toggle-switch-sidebar input {
        display: none !important;
    }
    
    .toggle-slider-sidebar {
        width: 16px !important;
        height: 16px !important;
        border-radius: 50% !important;
        background-color: white !important;
        transition: all 0.3s ease !important;
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        display: block !important;
    }
    
    /* Blue when widgets shown, gray when hidden */
    .widget-toggle-item:has(input:checked) .toggle-switch-sidebar {
        background-color: var(--button-primary) !important;
    }
    
    .widget-toggle-item:has(input:not(:checked)) .toggle-switch-sidebar {
        background-color: #ccc !important;
    }
}

/* Sidebar Toggle Switch - General styles removed, handled in media queries */

/* Hide right sidebar widgets when toggled */
body.rightsidebar-hidden .right-sidebar {
    display: none !important;
}

body.rightsidebar-hidden .content-area {
    max-width: 100% !important;
    width: 100% !important;
}

/* Center post container when right sidebar is hidden */
body.rightsidebar-hidden .post-container {
    max-width: 800px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.chat-close {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.chat-close .icon {
    width: 24px;
    height: 24px;
    margin: 0;
}
.chat-minimize-btn:hover,
.chat-close:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

/* Chat Header */
.chat-title {
    display: flex;
    align-items: center;
    /*gap: 8px;*/
    font-weight: 600;
}

.chat-title .icon {
    padding-top: 12px;
    width: 45px;
    height: 45px;
    margin-right: 0 auto;
}

@media screen and (min-width: 780px) {
    .chat-title .icon {
        padding-top: 0;
        width: 24px;
        height: 45px;
    }
}

.chat-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.chat-sidebar h3 {
    margin: 0 0 15px 5px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sidebar */
.chat-sidebar {
    width: 300px;
    background: var(--bg-tertiary);
    border-right: 1px solid var(--border-color);
    padding: 7px 15px;
    overflow-y: auto;
    overflow-x: hidden;
}

.chat-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-sidebar-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.online-count {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.online-users-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.no-users {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 40px 20px;
}

/* Online User Items */
.online-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: background 0.2s ease;
    cursor: pointer;
}

/* Post highlight animation for new posts */
.highlight-new-post {
    animation: highlightPulse 3s ease-in-out;
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 0 20px rgba(29, 155, 255, 0.3) !important;
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.5);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(29, 155, 255, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.3);
    }
}

.online-user:hover {
    background: var(--bg-secondary);
}

.user-avatar {
    position: relative;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    color: white;
}

.avatar-circle.verified {
    background: linear-gradient(135deg, var(--success-color), #20c997);
}

.avatar-circle.temporary {
    background: linear-gradient(135deg, var(--warning-color), #fd7e14);
}

.user-status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    border: 2px solid var(--bg-tertiary);
    border-radius: 50%;
    background: var(--success-color);
}

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

.user-id {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
}

.user-type {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Invite Notifications */
.invite-content h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.invite-notification.shake {
    animation: shake 1s ease-in-out;
}

.invite-notification.room-invite {
    min-width: 320px;
    border-left: 4px solid var(--success-color, #28a745);
}

.invite-notification.room-invite .invite-content h4 {
    color: var(--success-color, #28a745);
}

.invite-notification.room-invite .invite-actions button:first-child {
    background: var(--success-color, #28a745);
}

.invite-notification.room-invite .invite-actions button:first-child:hover {
    background: var(--success-hover, #218838);
}

.invite-content p {
    margin: 0 0 12px 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.invite-actions {
    display: flex;
    gap: 8px;
}

.invite-actions button {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.invite-actions button:first-child {
    background: var(--success-color);
    color: white;
}

.invite-actions button:first-child:hover {
    background: #20c997;
}

.invite-actions button:last-child {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.invite-actions button:last-child:hover {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

.invite-btn.single-chat {
    background: var(--primary-color, #007bff);
}

.invite-btn.multi-chat {
    background: var(--success-color, #28a745);
}

.invite-btn.single-chat:hover {
    background: var(--primary-hover, #0056b3);
}

.invite-btn.multi-chat:hover {
    background: var(--success-hover, #218838);
}

.user-list {
    max-height: 300px;
    overflow-y: auto;
}

.user-list .user-item {
    margin-top: 5px;
    display: flex;
    align-items: center;
    padding: 12px;
    min-width: 220px;
    /* border-radius: 27px; */
    margin-bottom: 8px;
    /* background: var(--bg-tertiary, #f8f9fa); */
    /* border: 1px solid var(--border-color, #e1e5e9); */
    transition: all 0.2s ease;
}

.user-list .user-item:hover {
    /*background: var(--bg-secondary, #fff);*/
    /*border-color: var(--primary-color, #007bff);*/
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-list .user-item .user-avatar {
    margin-right: 12px;
}

.user-list .user-item .user-info {
    flex: 1;
}

.user-list .user-item .invite-btn {
    background: none;
    color: var(--bg-accent);
    /* border-radius: none; */
    border-radius: 50%;
    /* padding: 2px 0 0 2px; */
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-list .user-item .invite-btn:hover {
    /*background: var(--success-hover, #218838);*/
    transform: scale(1.05);
}

.no-users {
    text-align: center;
    color: var(--text-secondary, #666);
    padding: 20px;
    font-style: italic;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.invite-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.invite-btn .icon {
    width: 24px;
    height: 24px;
    margin: 0;
}

.invite-btn:hover {
    background: var(--link-hover);
    transform: scale(1.1);
}

/* Main Chat Area */
.chat-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}

/* Welcome Screen */
.chat-welcome {
    text-align: center;
    max-width: 500px;
    padding: 40px;
}

.welcome-icon {
    margin-bottom: 20px;
}

.welcome-icon .icon {
    width: 64px;
    height: 64px;
    color: var(--primary-color);
}

.chat-welcome h2 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 700;
}

.chat-welcome p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 30px;
    font-size: 16px;
}

.welcome-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    color: var(--text-primary);
}

.feature .icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

/* Chat Room Interface */
.chat-room {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
}

.chat-room-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.chat-warning .leave-warning {
    padding: 15px 30px;
}

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

.room-details h4 {
    margin: 0 0 4px 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.room-encryption-status {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--success-color);
    font-size: 12px;
    font-weight: 500;
}

.room-encryption-status .icon {
    width: 12px;
    height: 12px;
}

.room-action-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.room-action-btn:hover {
    background: var(--danger-color);
    color: white;
}

/* Messages Area */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scroll-behavior: smooth;
}

.messages-container::-webkit-scrollbar {
    width: 6px;
}

.messages-container::-webkit-scrollbar-track {
    background: transparent;
}

.messages-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Futuristic Message Bubbles */
.message {
    display: flex;
    animation: slideInMessage 0.3s ease;
    margin-top: 5px;
    margin-bottom: 5px;
    padding: 0;
}

.message.own {
    justify-content: flex-end;
}

.message.other {
    justify-content: flex-start;
}

.message.system {
    justify-content: center;
}

.message-content {
    max-width: 300px;
    position: relative;
    box-sizing: border-box;
    font-size: 18px;
}

.message.own .message-content {
    background: var(--primary-color);
    color: var(--text-white);
    border-radius: 20px;
    padding: 8px 15px;
    float: right;
}

/* Arrow for Own Messages */
.message.own .message-content::before {
    content: "";
    position: absolute;
    bottom: 0;
    right: -8px;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-bottom-left-radius: 15px;
}

.message.own .message-content::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: -10px;
    width: 10px;
    height: 20px;
    background: var(--bg-secondary);
    border-bottom-left-radius: 10px;
}

.message.other .message-content {
    background-color: rgb(235, 235, 235);
    background-color: rgba(235, 235, 235, 1);
    color: #444444;
    border-radius: 15px;
    border: none; /*1px solid var(--border-light);*/
    padding: 8px 15px;
    float: left;
}

/* Arrow for Other Messages */
.message.other .message-content::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: -8px;
    width: 20px;
    height: 20px;
    background-color: rgb(235, 235, 235);
    background: rgba(235, 235, 235, 1);
    border-bottom-right-radius: 15px;
}

.message.other .message-content::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: -10px;
    width: 10px;
    height: 20px;
    background: var(--bg-secondary);
    border-bottom-right-radius: 10px;
}

.message.system .message-content {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 12px;
    font-style: italic;
    text-align: center;
    max-width: none;
}

.message-text {
    line-height: 1.4;
    word-wrap: break-word;
    margin-bottom: 4px;
    font-size: 18px;
}

/* Floating elements */
.message::after {
    content: "";
    display: table;
    clear: both;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    text-align: right;
}

.message.other .message-time {
    text-align: left;
}

@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px 10px;
    color: var(--text-secondary);
    font-size: 12px;
}

.typing-dots {
    display: flex;
    gap: 2px;
}

.typing-dots span {
    width: 4px;
    height: 4px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typingPulse 1.5s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes typingPulse {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    30% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Input Area */
.chat-input-area {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}
.chat-input-container {
    background: var(--bg-tertiary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s ease;
}

.chat-input-container:focus-within {
    border-color: var(--primary-color);
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    padding: 12px 16px;
    gap: 12px;
}

#messageInput {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    min-height: 20px;
    max-height: 120px;
}

#messageInput::placeholder {
    color: var(--text-secondary);
}

.send-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 1;
}

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

.send-btn:not(:disabled):hover {
    background: var(--link-hover);
    transform: scale(1.1);
}

.send-btn .icon {
    width: 18px;
    height: 18px;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    font-size: 11px;
    color: var(--text-secondary);
}

.encryption-notice {
    display: flex;
    align-items: center;
    gap: 4px;
}

.encryption-notice .icon {
    width: 12px;
    height: 12px;
}

/* Invite Notifications */
.invite-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    /*animation: slideInRight 0.3s ease;*/
    max-width: 300px;
}

.invite-content {
    padding: 20px;
}

.invite-icon {
    text-align: center;
    margin-bottom: 12px;
}

.invite-icon .icon {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.invite-details h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.invite-details p {
    margin: 0 0 8px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.invite-message {
    background: var(--bg-tertiary);
    padding: 8px 12px;
    border-radius: 8px;
    font-style: italic;
    color: var(--text-primary);
    font-size: 13px;
    margin-bottom: 16px;
}

.invite-actions {
    display: flex;
    gap: 10px;
}

.accept-btn,
.decline-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.accept-btn {
    background: var(--success-color);
    color: white;
}

.accept-btn:hover {
    background: #20c997;
}

.decline-btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.decline-btn:hover {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Chat Notifications */
.chat-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10001;
    animation: slideInUp 0.3s ease;
}

.chat-notification.success {
    background: var(--success-color);
}

.chat-notification.error {
    background: var(--danger-color);
    color: var(--text-primary);
}

.chat-notification.info {
    background: var(--primary-color);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 800px) {
    .chat-modal-container {
        width: 95%;
        height: 90vh;
        margin: 2.5vh auto;
    }
    
    .chat-sidebar {
        display: none;
    }
    
    .chat-body {
        flex-direction: column;
    }
    
    .welcome-features {
        grid-template-columns: 1fr;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .chat-invite-notification {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .chat-header {
        padding: 15px;
    }
    
    .chat-input-area {
        padding: 15px;
    }
    
    .chat-welcome {
        padding: 20px;
    }
    
    .chat-welcome h2 {
        font-size: 24px;
    }
}

/* ====================================
   SIMPLE SECURE CHAT SYSTEM
   ==================================== */

/* Chat Modal */
.simple-chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.simple-chat-modal.active {
    display: flex;
    opacity: 1;
}

.chat-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.chat-container {
    position: relative;
    width: 90%;
    max-width: 900px;
    height: 80vh;
    max-height: 600px;
    margin: 10vh auto;
    background: var(--bg-secondary);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(30px) scale(0.9);
    transition: transform 0.3s ease;
    /* Ensure proper flex behavior for scrolling */
    min-height: 0; /* Allow shrinking */
}

/* Ensure proper auto-scrolling */
@media (min-width: 770px) {
    .messages-area {
        overflow-y: auto;
        scroll-behavior: smooth;
        padding-bottom: 20px;
    }
    
    .messages-area::-webkit-scrollbar {
        width: 8px;
    }
    
    .messages-area::-webkit-scrollbar-track {
        background: var(--bg-tertiary);
        border-radius: 4px;
    }
    
    .messages-area::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 4px;
    }
    
    .messages-area::-webkit-scrollbar-thumb:hover {
        background: var(--text-secondary);
    }
}

.simple-chat-modal.active .chat-container {
    transform: translateY(0) scale(1);
}

/* User Search */
.user-search {
    margin-bottom: 15px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper .icon {
  width: 24px;
  height: 24px;
  margin: 0;
}

.search-input-wrapper input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 27px;
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1);
}

.search-input-wrapper input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    left: 85%;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Hide search icon when input has text */
.search-input-wrapper:has(input:not(:placeholder-shown)) .search-icon {
    opacity: 0;
}

/* Show clear-search when input has text */
.search-input-wrapper:has(input:not(:placeholder-shown)) .clear-search {
    display: flex;
}

.add-user-search .search-icon {
    left: 15px;
}

.add-user-search .search-input-wrapper input {
    padding: 15px 50px;
    border-radius: 27px;
}

.clear-search {
    position: absolute;
    right: 8px;
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: all 0.2s ease;
}

.clear-search:hover {
    background: none;
    color: var(--text-primary);
}

.clear-search .icon {
    width: 12px;
    height: 12px;
}

/* Mobile User Search Styles */
.mobile-user-search {
    padding: 0 15px 15px 15px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.mobile-user-search .search-input-wrapper input {
    padding: 10px 35px 10px 35px;
    font-size: 16px;
}

.mobile-user-search .search-icon {
    left: 12px;
    width: 18px;
    height: 18px;
}

/* Hide mobile search icon when input has text */
.mobile-user-search:has(input:not(:placeholder-shown)) .search-icon {
    opacity: 0;
}

/* Show mobile clear-search when input has text */
.mobile-user-search:has(input:not(:placeholder-shown)) .clear-search {
    display: flex;
}

.mobile-user-search .clear-search {
    right: 10px;
    width: 24px;
    height: 24px;
}

/*#hideicon .icon {*/
/*    width: 18px;*/
/*    height: 18px;*/
/*}*/
.mobile-user-search .clear-search .icon {
    width: 14px;
    height: 14px;
}

/* Mobile responsive adjustments for search */
@media (max-width: 799px) {
    .user-search {
        margin-bottom: 10px;
    }
    
    .search-input-wrapper input {
        padding: 10px 35px 10px 35px;
        font-size: 16px;
    }
    
    .search-icon {
        left: 12px;
        width: 18px;
        height: 18px;
    }
    
    /* Hide search icon when input has text on mobile */
    .search-input-wrapper:has(input:not(:placeholder-shown)) .search-icon {
        opacity: 0;
    }
    
    /* Show clear-search when input has text on mobile */
    .search-input-wrapper:has(input:not(:placeholder-shown)) .clear-search {
        display: flex;
    }
    
    .clear-search {
        right: 10px;
        width: 24px;
        height: 24px;
    }
    
    .clear-search .icon {
        width: 14px;
        height: 14px;
    }
    
    #hideicon {
        display: none;
    }
}

.online-users {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 270px;
}

.no-users {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 20px 10px;
    font-size: 13px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
    cursor: pointer;
    position: relative;
    padding: 12px 0 12px 0;
}

.user-item.active-chatter {
    /*background: rgba(var(--chat-active-rgb, 0, 128, 0), 0.05);*/
    background: none;
    border-bottom: 1px solid var(--chat-active);
    /*padding-left: 8px;*/
}

.user-item.active-chatter:hover {
    background: rgba(var(--chat-active-rgb, 0, 128, 0), 0.1);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: var(--text-green);
}

.user-avatar.verified {
    /*background: var(--bg-tertiary);*/
    background: none;
}

.user-avatar.verified .icon {
  background: none;
  padding: 0;
  margin: 0;
}

.user-avatar.temp {
    background: linear-gradient(135deg, var(--warning-color), #fd7e14);
}

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

.user-id {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.user-type {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Chat Main Area */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    min-height: 0;
}

.chat-welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
}

.chat-welcome .icon.big {
    width: 48px;
    height: 48px;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.chat-welcome h3 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
}

.chat-welcome p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    font-size: 14px;
}

/* Chat Room */
.chat-room {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
    min-height: 0;
}

.chat-room-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.room-info {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.room-info h4 {
    margin: 0 auto;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 0;
}

.encrypted-badge {
    display: flex;
    gap: 0;
    color: var(--success-color);
    font-size: 12px;
    font-weight: 500;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 1;
}

.encrypted-badge .icon {
    width: 18px;
    height: 18px;
}

.leave-room {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.leave-room .icon {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
}

.leave-room .icon:hover {
    background: none;
    color: var(--danger-color);
}
.leave-btn {
    padding: 10px 20px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.leave-btn:hover {
    background: var(--bg-secondary);
}
/* Messages */
.messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 15px 15px 80px 15px;
    background: var(--bg-primary);
    scroll-behavior: smooth;
    height: 0;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    will-change: scroll-position;
}

.messages-area::-webkit-scrollbar {
    width: 4px;
}

.messages-area::-webkit-scrollbar-track {
    background: transparent;
}

.messages-area::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.messages-area::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.system-message {
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
    font-style: italic;
    margin-bottom: 15px;
    padding: 8px;
    background: none;
    border-bottom: 1px solid var(--border-color);
}

.system-message.countdown {
    color: var(--danger-color);
    font-weight: 600;
    background: rgba(220, 53, 69, 0.1);
    border-bottom: 1px solid var(--danger-color);
    animation: pulse 1s ease-in-out infinite;
}

/* Message Input */
.message-input-area {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    padding: 15px;
    z-index: 10;
}

/* Input wrapper for integrated button */
.input-wrapper {
    flex: 1;
    position: relative;
}

#simpleMessageInput {
    width: 100%;
    min-width: 250px;
    min-height: 50px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 27px;
    padding: 10px 50px 10px 15px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

#simpleMessageInput:focus {
    border-color: var(--primary-color);
}

#simpleMessageInput::placeholder {
    color: var(--text-secondary);
}

#simpleSendBtn {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 0; /* Removed border radius */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#simpleSendBtn:hover {
    color: var(--primary-color);
}

#simpleSendBtn .icon {
    width: 16px;
    height: 16px;
    padding: 0;
}

/* Simple Notifications */
.simple-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 15px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    font-size: 13px;
    z-index: 10001;
    animation: slideInUp 0.3s ease;
    display: flex; 
    align-items: center;
    gap: 8px;
}

.simple-notification .icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

.simple-notification.success {
    background: var(--success-color);
    color: #fff;
}

.simple-notification.error {
    background: var(--danger-color);
    color: #fff;
}

.simple-notification.info {
    background: var(--primary-color);
    color: #fff;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================================
   MOBILE RESPONSIVE CHAT SYSTEM
   ==================================== */

/* Mobile Toggle Button for Online Users */
.mobile-chat-toggle {
    display: none;
    color: var(--text-primary);
    cursor: pointer;
    z-index: 10003;
    transition: all 0.3s ease;
    font-size: 18px;
    align-items: center;
    justify-content: center;
}

.mobile-chat-toggle.icon {
    width: 130px;
    height: 130px;
}

.mobile-chat-toggle:hover {
    transform: scale(1.1);
}

.mobile-chat-toggle.active .icon {
    fill: linear-gradient(135deg, #10b981, #059669);
}

/* Mobile Sidebar Overlay */
.mobile-chat-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.mobile-chat-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-chat-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 85vw;
    height: 100%;
    background: var(--bg-tertiary);
    border-left: 2px solid var(--border-color);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 3px 15px;
}

.mobile-chat-sidebar.active {
    transform: translateX(0);
}

.mobile-chat-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-chat-sidebar-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-chat-sidebar-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    /* border-radius: none; */
    transition: background 0.2s;
}
.mobile-chat-sidebar-close .icon {
    width: 16px;
    height: 16px;
    padding: 0;
    margin: 0;
}
.mobile-chat-sidebar-close:hover {
    transform: scale(1.1)
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 799px) {
    /* Mobile container adjustments */
    .chat-container {
        width: 95%;
        height: 90vh;
        margin: 5vh auto;
    }
    
    /* Adjust chat messages container to account for fixed input */
    .simple-chat-modal .chat-main {
        padding-bottom: 80px; /* Space for fixed input area */
        height: calc(100vh - 60px); /* Account for header height */
        overflow: hidden;
        width: 100%;
        border-left: none;
    }
    
    /* Hide desktop sidebar completely on mobile */
    .simple-chat-modal .chat-sidebar {
        display: none;
    }
    
    /* Expand chat-main to full width when sidebar is hidden */
    .simple-chat-modal .chat-body {
        display: block;
    }
    
    /* Show mobile toggle button */
    .mobile-chat-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Show mobile overlay system */
    .mobile-chat-overlay {
        display: block;
    }
    
    /* Message adjustments */
    .message-content {
        max-width: 90%;
    }
    
    /* Header adjustments */
    .chat-header {
        padding: 12px 15px;
    }
    
    .chat-title {
        font-size: 16px;
    }
    
    /* Input area adjustments - stick to bottom of viewport on mobile */
    .message-input-area {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        padding: 10px 10px 80px 10px;
        z-index: 10001;
        bottom: env(safe-area-inset-bottom, 0);
        /*padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));*/
    }
    
    .messages-area {
        padding: 10px 10px 70px 10px;
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        overscroll-behavior: contain; /* Prevent scroll chaining */
        will-change: scroll-position; /* Optimize for scrolling */
        /* Ensure proper touch scrolling */
        touch-action: pan-y;
    }
    
    /* Ensure proper chat container on mobile */
    .simple-chat-modal .chat-container {
        height: 100vh;
        max-height: 100vh;
    }
    
    #simpleMessageInput {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 14px 50px 14px 16px;
        border-radius: 25px;
        min-height: 44px; /* Touch-friendly size */
    }
    
    #simpleSendBtn {
        right: 25px;
        width: 36px;
        height: 36px;
    }
    
    /* Notification adjustments */
    .invite-notification {
        left: 10px;
        right: 10px;
        max-width: none;
        top: 70px; /* Below the mobile toggle button */
    }
    
    .simple-notification {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .chat-container {
        width: 100%;
        height: 100vh;
        max-height:100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .mobile-chat-sidebar {
        width: 320px;
    }
    
    .message-content {
        max-width: 95%;
    }
    
    .chat-header {
        padding: 10px 12px;
    }
    
    .message-input-area {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 10px 10px 80px 10px;
        z-index: 10001;
    }
    
    .simple-chat-modal .chat-main {
        padding-bottom: 85px;
    }
    
    #simpleMessageInput {
        min-height: 40px;
        padding: 16px 55px 16px 18px;
    }
}

@media (max-width: 480px) {
    .chat-body {
        flex-direction: column;
    }
    
    .chat-sidebar {
        width: 100%;
        height: 150px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .chat-sidebar h3 {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .online-users {
        flex-direction: row;
        overflow-x: auto;
        gap: 5px;
    }
    
    .user-item {
        min-width: 120px;
        flex-shrink: 0;
    }
}

/* CHAT WARNINGS */

.chat-confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.confirm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}
.confirm-content {
    position: relative;
    background: var(--bg-secondary, #fff);
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color, #e1e5e9);
}
.confirm-header h4 {
    margin: 0 0 16px 0;
    color: var(--text-primary, #1a1a1a);
    font-size: 18px;
    font-weight: 600;
}
.confirm-body p {
    margin: 0 0 24px 0;
    color: var(--text-secondary, #666);
    font-size: 14px;
    line-height: 1.5;
}
.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}
.confirm-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.cancel-btn {
    background: var(--bg-tertiary, #f8f9fa);
    color: var(--text-secondary, #666);
}
.cancel-btn:hover {
    background: var(--border-color, #e1e5e9);
}
.leave-btn {
    background: var(--danger-color, #dc3545);
    color: white;
}
.leave-btn:hover {
    background: var(--danger-hover, #c82333);
}
.terminate-btn {
    background: var(--danger-color, #dc3545);
    color: white;
}
.terminate-btn:hover {
    background: var(--danger-hover, #c82333);
}
.accept-btn {
    background: var(--success-color, #28a745);
    color: white;
}
.accept-btn:hover {
    background: var(--success-hover, #218838);
}

/* Chat warning styles */
.chat-warning {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    min-height: 400px;
}
.warning-header h4 {
    margin: 0 0 20px 0;
    color: var(--text-primary, #1a1a1a);
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.warning-content {
    margin-bottom: 30px;
}
.warning-icon {
    margin-bottom: 20px;
}
.warning-content p {
    margin: 0 0 15px 0;
    color: var(--text-secondary, #666);
    font-size: 14px;
    line-height: 1.5;
}
.warning-content ul {
    margin: 15px 0;
    padding-left: 20px;
}
.warning-content li {
    margin: 5px 0;
    color: var(--text-secondary, #666);
    font-size: 14px;
}
.warning-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.warning-actions button {
  flex: 0 0 auto;
  padding: 12px 24px;
  border: none;
  border-radius: 27px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 150px;
}
.creator-warning .warning-header h4 {
    color: var(--danger-color, #dc3545);
}
.leave-warning .warning-header h4 {
    color: var(--warning-color, #ffc107);
}
                
/* ====================================
   RESPONSIVE DESIGN
   ==================================== */

/* Tablet */
@media (max-width: 799px) {
  .container {
    padding-left: 0.3rem;
  }
  .navbar-nav {
    flex-direction: column;
    gap: 0.5rem;
  }
  .post-header {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .post-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .admin-dashboard {
    grid-template-columns: 1fr;
  }
  .filter-tabs {
    justify-content: center;
  }
  .chat-message {
    max-width: 85%;
  }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
}

/* ====================================
   UTILITY CLASSES
   ==================================== */

/* Spacing */
.m-0 { margin: 0; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-3 { margin: 1rem; }
.m-4 { margin: 1.5rem; }
.m-5 { margin: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.ml-0 { margin-left: 0; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 1rem; }
.ml-4 { margin-left: 1.5rem; }
.ml-5 { margin-left: 3rem; }

.mr-0 { margin-right: 0; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 1rem; }
.mr-4 { margin-right: 1.5rem; }
.mr-5 { margin-right: 3rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 1rem; }
.pt-4 { padding-top: 1.5rem; }
.pt-5 { padding-top: 3rem; }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: 0.25rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-3 { padding-bottom: 1rem; }
.pb-4 { padding-bottom: 1.5rem; }
.pb-5 { padding-bottom: 3rem; }

.pl-0 { padding-left: 0; }
.pl-1 { padding-left: 0.25rem; }
.pl-2 { padding-left: 0.5rem; }
.pl-3 { padding-left: 1rem; }
.pl-4 { padding-left: 1.5rem; }
.pl-5 { padding-left: 3rem; }

.pr-0 { padding-right: 0; }
.pr-1 { padding-right: 0.25rem; }
.pr-2 { padding-right: 0.5rem; }
.pr-3 { padding-right: 1rem; }
.pr-4 { padding-right: 1.5rem; }
.pr-5 { padding-right: 3rem; }

/* Display */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Flexbox */
.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.justify-content-start { justify-content: flex-start; }
.justify-content-center { justify-content: center; }
.justify-content-end { justify-content: flex-end; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }
.align-items-start { align-items: flex-start; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }
.align-items-stretch { align-items: stretch; }

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* Text Colors */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: #856404; }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }

/* Background Colors */
.bg-primary { background-color: var(--bg-secondary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-tertiary { background-color: var(--bg-tertiary); }
.bg-success { background-color: var(--success); }
.bg-warning { background-color: var(--warning); }
.bg-danger { background-color: var(--danger); }
.bg-info { background-color: var(--info); }

/* Border */
.border { border: 1px solid var(--border-color); }
.border-top { border-top: 1px solid var(--border-color); }
.border-bottom { border-bottom: 1px solid var(--border-color); }
.border-left { border-left: 1px solid var(--border-color); }
.border-right { border-right: 1px solid var(--border-color); }
.border-0 { border: 0; }

.rounded { border-radius: var(--border-radius); }
.rounded-sm { border-radius: var(--border-radius-sm); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-circle { border-radius: 50%; }
/* Shadow */
.shadow-sm { box-shadow: 0 1px 3px var(--shadow-light); }
.shadow { box-shadow: 0 2px 8px var(--shadow-light); }
.shadow-lg { box-shadow: 0 4px 16px var(--shadow-medium); }
/* Width and Height */
.w-25 { width: 25%; }
.w-50 { width: 50%; }
.w-75 { width: 75%; }
.w-100 { width: 100%; }
.w-auto { width: auto; }
.h-25 { height: 25%; }
.h-50 { height: 50%; }
.h-75 { height: 75%; }
.h-100 { height: 100%; }
.h-auto { height: auto; }
/* Position */
.position-static { position: static; }
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.position-sticky { position: sticky; }
/* Overflow */
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-visible { overflow: visible; }
.overflow-scroll { overflow: scroll; }

/* ====================================
   COMPONENT-SPECIFIC STYLES
   ==================================== */
/* User Type Indicators */
.user-type-indicator {
  display: inline-block;
  padding: 0.125rem 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.user-type-temporary {
  background-color: rgba(255, 193, 7, 0.2);
  color: #856404;
  border: 1px solid var(--warning);
}
.user-type-permanent {
  background-color: rgba(40, 167, 69, 0.2);
  color: var(--success);
  border: 1px solid var(--success);
}

/* ====================================
   DHC TOKEN DISPLAY
   ==================================== */
.pft-balance {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--doge-orange);
  background-color: rgba(255, 140, 0, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--doge-orange);
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success {
  background-color: var(--success);
  color: var(--text-inverse);
}

.badge-warning {
  background-color: var(--warning);
  color: var(--text-primary);
}

.badge-danger {
  background-color: var(--danger);
  color: var(--text-inverse);
}

.badge-info {
  background-color: var(--info);
  color: var(--text-inverse);
}

/* Verification Badge */
.verification-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background-color: rgba(40, 167, 69, 0.1);
  color: var(--success);
  padding: 0.125rem 0.375rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--success);
}

/* Error States */
.has-error .form-control {
  border-color: var(--danger);
}

.has-error .form-control:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
}

.error-message {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Success States */
.has-success .form-control {
  border-color: var(--success);
}

.has-success .form-control:focus {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
}

.success-message {
  color: var(--success);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.dhc-reset {
  border: 1px solid var(--border-color);
}

/* Rate Limit Indicator */
.rate-limit-indicator {
  background-color: rgba(255, 193, 7, 0.1);
  border: 1px solid var(--warning);
  border-radius: var(--border-radius);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #856404;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Search Highlighting */
.search-highlight {
  background-color: var(--doge-gold);
  color: var(--text-primary);
  padding: 0.125rem 0.25rem;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.empty-state-description {
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* ====================================
   ANIMATIONS AND TRANSITIONS
   ==================================== */
/* Fade animations */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fade-out {
  animation: fadeOut 0.3s ease-out;
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Slide animations */
.slide-up {
  animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.slide-down {
  animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulse animation for notifications */
.pulse {
  animation: pulse 50s infinite;
}
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Shake animation for errors */
.shake {
  animation: shake 0.5s ease-in-out;
}
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* ====================================
   ACCESSIBILITY IMPROVEMENTS
   ==================================== */

/* Focus indicators */
.btn:focus,
.form-control:focus,
.nav-link:focus {
  outline: 2px solid var(--bg-accent);
  outline-offset: 2px;
}
.btn {
  transition: all 0.3s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
@media (prefers-reduced-motion: reduce) {
  .next-step-item:hover,
  .card:hover,
  .btn:hover,
  .next-step-item:hover .step-icon {
    transform: none;
  }
}

/* Skip links */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 8px;
  text-decoration: none;
  border-radius: var(--border-radius);
  z-index: 5000;
}
.skip-link:focus {
  top: 6px;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-color: currentColor;
    --shadow-light: transparent;
    --shadow-medium: transparent;
    --shadow-heavy: transparent;
  }
  .btn {
    border-width: 2px;
  }
  .card {
    border-width: 2px;
  }
}

/* ====================================
   SVG Icons & Texts
   ==================================== */
.landing-icon-text {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}
.landing-icon-text .icon {
  width: clamp(20px, 2vw, 28px);
  height: clamp(20px, 2vw, 28px);
  vertical-align: middle;
}
.landing-icon-text strong {
  font-size: clamp(20px, 2vw, 28px);
  line-height: 2;
}

.inline-icon-text {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem; /* Space between icon and text */
  white-space: nowrap; /* Prevents wrapping */
}
/* Icon styling */
.inline-icon-text .icon {
  width: clamp(16px, 2vw, 20px); /* Responsive icon size */
  height: clamp(16px, 2vw, 20px);
  vertical-align: middle; /* Aligns icon with text baseline */
}
/* Text styling */
.inline-icon-text strong {
  font-size: clamp(16px, 2vw, 20px); /* Responsive font size */
  line-height: 1; /* Matches icon height for better alignment */
}

.home-icon .icon, .gate-icon .icon {
  width: clamp(16px, 2vw, 20px);
  height: clamp(16px, 2vw, 20px);
    
}
.icon {
  width: clamp(1.5rem, 2vw, 2.5rem);
  height: clamp(1.5rem, 2vw, 2.5rem);
  margin-right: 0.5rem;
  vertical-align: middle;
  fill: currentColor;
  padding: 0.01rem;
}
.button.icon:before {
  margin-right: 0.5em;
}

/* ====================================
   MODAL OVERLAY + POST FOR PRIVATE POSTING
   ==================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.post-modal-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 32px;
    max-width: 480px;
    width: 90%;
    position: relative;
    text-align: left;
    border: 1px solid rgba(29, 161, 242, 0.1);
}
.formclose {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    z-index: 2;
    opacity: 0.7;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.formclose:hover { 
    opacity: 1; 
    color: #1da1f2; 
    background: rgba(29, 161, 242, 0.1);
}
.post-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: #1a1a1a;
    text-align: center;
}
.post-form-group { 
    margin-bottom: 20px; 
}
.post-textarea {
    width: 100%;
    min-height: 120px;
    max-height: 300px;
    border-radius: 27px;
    border: 1px solid #e1e8ed;
    padding: 16px;
    font-size: 1.1rem;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
}
.post-textarea:focus { 
    border-color: #1da1f2; 
    box-shadow: 0 0 0 3px rgba(29, 161, 242, 0.1);
}
.post-form-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
}
.post-form-footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.image-upload-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(29, 161, 242, 0.1);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}
.image-upload-label:hover {
    /*background: rgba(29, 161, 242, 0.2);*/
    transform: scale(1.05);
}

.time-picker-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--color-frosted);
    border-radius: 50%;
    background: rgba(29, 161, 242, 0.1);
    color: var(--text-primary);
    transition: all 0.2s ease;
}
.box-utility .time-picker-toggle .icon {
    margin: 0;
    color: var(--bg-glass);
    width: 32px;
    height: 32px;
}

.time-picker-toggle:hover {
    /*background: rgba(29, 161, 242, 0.2);*/
    transform: scale(1.05);
}

@media screen and (min-width: 780px) {
    .box-utility .time-picker-container {
        display: none;
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius);
            padding: 1rem;
            margin-bottom: 0;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            z-index: 1000;
            min-height: 300px;
    }
}

.upload-icon { 
    font-size: 1.3rem; 
}
.imagepreview {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #1da1f2;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.2s ease;
}
.imagepreview:hover {
    transform: scale(1.1);
}
.char-counter-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: conic-gradient(#1da1f2 0deg 0deg, #e1e8ed 0deg 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1da1f2;
    position: relative;
    transition: all 0.3s ease;
}
.char-counter-circle.over {
    background: conic-gradient(#ff4757 0deg 0deg, #e1e8ed 0deg 360deg);
    color: #ff4757;
}
.char-counter-circle::before {
    content: '';
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    z-index: -1;
}
.post-button {
    background: linear-gradient(135deg, #1da1f2, #0d8bd9);
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 12px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(29, 161, 242, 0.3);
}
.post-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 161, 242, 0.4);
}
.post-button:disabled { 
    opacity: 0.6; 
    cursor: not-allowed; 
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
@media (max-width: 799px) {
    .post-modal-card { 
        padding: 24px 20px; 
        width: 95%;
    }
    .post-form-title { 
        font-size: 1.3rem; 
    }
    .post-form-footer {
        flex-direction: column;
        gap: 12px;
    }
    .post-form-footer-left {
        width: 100%;
        justify-content: center;
    }
}

/* --- Reward Toast and Highlight Styles --- */
.reward-toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: #10b981;
  color: #fff;
  padding: 18px 32px;
  border-radius: 27px;
  box-shadow: 0 8px 32px rgba(16,185,129,0.2);
  font-size: 1.1rem;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(40px);
  transition: opacity 0.3s, transform 0.3s;
  display: flex;
  align-items: center;
  gap: 18px;
}
.reward-toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.reward-toast-link {
  color: #fff;
  background: #1d9bff;
  padding: 6px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  margin-left: 12px;
  transition: background 0.2s;
}
.reward-toast-link:hover {
  background: #2992d8;
}
.reward-highlight {
  animation: rewardPulse 1.2s 2;
  box-shadow: 0 0 0 4px #10b98155, 0 2px 16px #10b98133;
  border-left: 6px solid #10b981;
  background: linear-gradient(90deg, #e6fff6 0%, #f0fff9 100%);
}
@keyframes rewardPulse {
  0% { box-shadow: 0 0 0 0 #10b98155; }
  50% { box-shadow: 0 0 0 12px #10b98133; }
  100% { box-shadow: 0 0 0 0 #10b98155; }
}

/* === Inline Input Icons for Admin Login === */
.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25em;
  color: var(--text-secondary);
  pointer-events: none;
  z-index: 2;
}
.input-icon.user-icon {
  left: 16px;
}
.input-icon.lock-icon {
  left: 16px;
}
.input-icon + input.form-control {
  padding-left: 44px;
}

.input-icon-wrapper input[type="password"],
.input-icon-wrapper input[type="text"] {
    padding-right: 44px;
}

/* === User Dashboard Styles === */
.submit-btn {
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    background: #1d9bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    height: 41px;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
}

.usrmgm {
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    border-radius: 8px;
    margin-top: 10px;
    cursor: pointer;
    background-color: #000;
    color: green;
    width: 100%;
    box-sizing: border-box;
}

.reward-submit-btn {
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    background: #1d9bff;
    color: #fff;
    border: none;
    border-radius: 27px;
    cursor: pointer;
    margin-top: 10px;
    min-width: 140px;
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.reward-submit-btn:hover {
    background-color: var(--text-orange);
    color: #ffffff;
}

.error { 
    /*margin-top: 0.5rem;*/
    color: #f55;
    /*margin-bottom: 1rem;*/
    padding: 20px;
}

.section-block {
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
/* User Dashboard Mobile Responsive */
@media only screen and (max-width: 799px) {
    #trademark {
        width: 64px;
        height: 64px;
        font-size: 14px;
        margin-top: -10px;
        margin-bottom: 10px;
    }
    
    h3 {
        font-size: 18px;
        margin-top: 0;
        margin-bottom: 0;
    }
    
    #trademark img {
        margin-top: 0!important
    }
    
    .submit-btn,
    .reward-submit-btn {
        width: 100%;
        margin-bottom: 10px;
        position: static;
    }
    
    .usrmgm {
        width: 100%;
    }
    
    .password-form .usrmgm {
        margin-bottom: 10px;
    }
    
    .form-input {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .input-icon-wrapper .form-input {
        padding-left: 40px;
        padding-right: 40px;
    }
    
    .password-form div[style*="justify-content: flex-end"] {
        justify-content: flex-start;
    }
}

/* Overlay Interactions Image (no image post) */
.overlay-interactions-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 340px;
  min-height: 340px;
  max-height: 340px;
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 2px 16px rgba(29,155,255,0.15);
  position: relative;
  background: none;
  object-fit: cover;
}

.overlay-interactions-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #1d9bff;
    font-size: 2.2rem;
    font-weight: bold;
    letter-spacing: 2px;
    pointer-events: none;
    border: 2px solid var(--border);
    border-radius: 18px;
    padding: 32px 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
        
.reward-submit-btn {
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    background: #1d9bff;
    color: #fff;
    border: none;
    border-radius: 27px;
    cursor: pointer;
    margin-top: 10px;
    width: auto;
    position: static;
    display: inline-block;
    text-align: center;
    align-content: right;
}

.reward-submit-btn:hover {
    background-color: var(--text-orange);
}

.post-btn-plus:hover {
    background-color: #2992d8;
}

@media (max-width: 799px) {
    .post-btn {
        display: none;
    }
    
    .post-btn-plus {
        display: flex;
    }
}

@media (min-width: 769px) {
    #expose {
        display: none;
    }
}
/* User Status Indicator - Default Hidden */
.user-status {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: gray;
    z-index: 1;
    top: 198px;
    left: 26px;
}

/* Medium screens (tablets) */
@media screen and (min-width: 800px) and (max-width: 1130px) {
    .username {
        display: none;
    }
}

@media screen and (max-width: 799px) {
    .user-status {
        top: 102px;
        left: 16px;
    }
}
/* Green (Verified) - SOLID */
.user-status.verified {
    background-color: #00c853; /* Solid Green */
}

/* Orange (Unverified) - PULSING between Orange and Black */
.user-status.unverified {
    background-color: orange;
    animation: pulseOrange 2s infinite ease-in-out;
}

/* Pulsing Animation for Unverified (Orange to Black to Orange) */
@keyframes pulseOrange {
    0% {
        background-color: orange; /* Orange */
    }
    50% {
        background-color: black; /* Black */
    }
    100% {
        background-color: orange; /* Back to Orange */
    }
}

#themeIcon.icon {
    width: clamp(2.0rem, 2vw, 2.5rem);
    height: clamp(2.0rem, 2vw, 2.5rem);
}
    
@media (max-width: 799px) {
    #themeIcon.icon {
        width: clamp(2.0rem, 2vw, 2.5rem);
        height: clamp(2.0rem, 2vw, 2.5rem);
    }
}

/* === Unified Post Modal Styles === */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(18, 22, 34, 0.45); /* more transparent for glassmorphism */
  z-index: 3000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(16px) saturate(1.5) brightness(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.5) brightness(1.08);
  transition: opacity 0.3s;
}
.modal-dialog {
  background: rgba(40, 48, 72, 0.32); /* glassy, semi-transparent */
  border-radius: 22px;
  box-shadow: 0 8px 40px 0 rgba(0,0,0,0.25), 0 1.5px 8px 0 rgba(29,155,255,0.08);
  max-width: 420px;
  width: 95vw;
  min-height: 22rem;
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  animation: modalSlideIn 0.4s cubic-bezier(.34,1.56,.64,1);
  /*border: 1.5px solid var(--border-frosted);*/
  backdrop-filter: blur(24px) saturate(1.7);
  -webkit-backdrop-filter: blur(24px) saturate(1.7);
}
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  /*background: rgba(255,255,255,0.08);*/
  border: none;
  font-size: 2.1rem;
  color: var(--text-secondary);
  border-radius: 50%;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  z-index: 10;
}
.modal-close:hover {
  /*background: var(--primary-color);*/
  color: #fff;
  transform: rotate(90deg) scale(1.08);
}
.modal-body {
  padding: 2.2rem 1.5rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
#postForm.post-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  background: transparent;
  border: 1px solid var(--border-frosted);
  box-shadow: none;
  padding: 1rem;
}
@media only screen and (max-width: 799px) {
    #postForm.post-form {
        border: none;
        padding: 1rem;
    }
}
#postForm .form-group {
  margin-bottom: 0;
}
#postForm .form-control.post-textarea {
    min-height: 200px;
    font-size: 1.08rem;
    border-radius: var(--border-radius-lg);
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
    box-shadow: 0 1px 4px rgba(29,155,255,0.04);
    padding: 1rem;
    resize: vertical;
    transition: border 0.2s, box-shadow 0.2s;
    margin: 0 auto;
}
#postForm .form-control.post-textarea:focus {
  border: 1.5px solid var(--primary-color);
  box-shadow: 0 0 0 2px rgba(29,155,255,0.12);
  background: var(--bg-glass);
}
#postForm .form-control.post-textarea {
  overflow: auto;/* Enables scrolling */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;/* IE 10+ */
}
#postForm .form-control.post-textarea::-webkit-scrollbar {
  display: none;/* Chrome, Safari, Opera */
}

#postForm .form-group.d-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}
#postForm .d-flex.align-items-center {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.image-upload-label {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  transition: border 0.2s, background 0.2s;
}
.image-upload-label:hover {
  /*border: 1.5px solid var(--primary-color);*/
  background: rgba(29,155,255,0.08);
}
.upload-icon {
  font-size: 1.25rem;
  color: var(--primary-color);
}
.imagepreview {
  display: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--primary-color);
  margin-left: 0.2rem;
}
.char-counter-svg {
  position: relative;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  margin-left: 0.3rem;
  transition: border 0.2s;
}

.char-counter-svg .icon {
    opacity: 0.5;
}

.char-counter-svg svg {
  width: 38px; height: 38px;
  display: block;
}
#char-count-text {
  position: absolute;
  top: 0; left: 0;
  width: 37px; height: 37px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: bold;
  margin: 0 auto;
  pointer-events: none;
}
#postForm .post-button {
  margin-left: 0;
  margin-top: 0;
  min-width: 120px;
  max-width: 120px;
  width: auto;
  height: 45px;
  border-radius: var(--border-radius);
  font-size: 1.08rem;
  font-weight: 600;
  background: linear-gradient(90deg, var(--primary-color) 60%, #0d7fc7 100%);
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(29,155,255,0.08);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  display: flex; align-items: center; justify-content: center;
  gap: 0.5rem;
}
#postForm .post-button:hover {
  background: linear-gradient(90deg, #0d7fc7 0%, var(--primary-color) 100%);
  box-shadow: 0 4px 16px rgba(29,155,255,0.18);
}
@media (max-width: 799px) {
  .modal-dialog {
    min-width: 0;
    overflow-y: auto;
    padding: 0;
    position: relative;
  }
  .box-head {
    padding: 0 0.7rem 0 1.5rem!important;
    min-height: 2.2rem;
    font-size: 1rem;
    position: relative;
  }
  .modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    margin: 0;
    z-index: 10;
  }
  .box-body {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
    padding-bottom: 0.5rem;
    padding-top: 2.5rem; /* ensures space for close button */
    gap: 0.5rem;
  }
  .box-utility {
    padding: 0;
    gap: 0.4rem;
    min-height: 38px;
  }
  .box-utility .image-upload-label, .box-utility .imagepreview, .box-utility .char-counter-svg {
    width: 28px; height: 28px;
  }
  .box-utility .char-counter-svg svg {
    width: 22px; height: 22px;
  }
  .box-utility .post-button {
    min-width: 48px;
    max-width: 80px;
    height: 28px;
    font-size: 0.92rem;
  }
}

/* === Pro Modal Sectioning === */
.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  position: static;
  margin-left: 1rem;
  width: 40px;
  height: 40px;
  /*background: rgba(255,255,255,0.10);*/
  border: none;
  font-size: 2.1rem;
  color: var(--text-secondary);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.22s, color 0.22s, transform 0.22s, box-shadow 0.22s;
  box-shadow: 0 1px 4px rgba(29,155,255,0.04);
}
.modal-close .icon {
  width: 22px;
  height: 22px;
  display: block;
  margin: 0 auto;
  fill: currentColor;
}
.modal-close:hover, .modal-close:focus {
  /*background: var(--primary-color);*/
  color: #fff;
  transform: scale(1.1);
  /*box-shadow: 0 4px 16px rgba(29,155,255,0.18), 0 0 0 4px rgba(29,155,255,0.08);*/
}

/* === Pro Modal Sectioning === */
.modal-dialog {
    background: rgba(40, 48, 72, 0.32);
    border-radius: 0;
    box-shadow: 0 8px 40px 0 rgba(0,0,0,0.25), 0 1.5px 8px 0 rgba(29,155,255,0.08);
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    min-height: 100vh;
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    animation: modalSlideIn 0.4s cubic-bezier(.34,1.56,.64,1);
    backdrop-filter: blur(24px) saturate(1.7);
    -webkit-backdrop-filter: blur(24px) saturate(1.7);
    overflow: hidden;
}

/* Head: 5rem, content centered */
.box-head {
  height: 5rem;
  min-height: 5rem;
  max-height: 5rem;
  display: flex;
  color: var(--text-tertiary);
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: relative;
  flex-shrink: 0;
}

/* Body: 15rem, textarea centered vertically */
.box-body {
  height: 15rem;
  min-height: 15rem;
  max-height: 15rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: 0 1.5rem;
  flex-shrink: 0;
}

.box-body textarea {
    height: 10rem;
    max-height: 15rem;
    margin-top: 6rem;
    font-size: 1.08rem;
    border-radius: var(--border-radius);
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
    box-shadow: 0 1px 4px rgba(29,155,255,0.04);
    padding: 1.1rem 1rem;
    resize: vertical;
    transition: border 0.2s, box-shadow 0.2s;
    display: block;
}

.box-body textarea:focus {
    border: 1.5px solid var(--primary-color);
    box-shadow: 0 0 0 2px rgba(29,155,255,0.12);
    background: var(--bg-glass);
}

.box-utility {
    height: 3rem;
    min-height: 3rem;
    max-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    /* padding: 0 1.5rem; */
    flex-shrink: 0;
}

.box-utility .image-upload-label:hover, .box-utility .imagepreview:hover, .box-utility .char-counter-svg:hover, .box-utility .post-button:hover {
  transform: scale(1.1);
  transition: all 0.7s ease;
  cursor: pointer;
}

/* Post highlight animation for new posts */
.highlight-new-post {
    animation: highlightPulse 3s ease-in-out;
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 0 20px rgba(29, 155, 255, 0.3) !important;
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.5);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(29, 155, 255, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.3);
    }
}
  
.box-utility .image-upload-label,
.box-utility .imagepreview,
.box-utility .char-counter-svg {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.box-utility .icon {
  margin: 0;
  height: 24px;
  width: 24px;
  margin-bottom: 5px;
}

.box-utility .char-counter-svg svg {
  width: 32px;
  height: 32px;
}

.box-utility .char-counter-svg .icon {
    margin: 0;
}
.box-utility .post-button {
  min-width: 30px;
  max-width: 50px;
  height: 36px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
}

/* Chat waiting room styles */
.chat-waiting {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    text-align: center;
}

.waiting-header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.waiting-header h4 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
}

.waiting-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: var(--accent-color);
    color: var(--bg-accent);
    border-radius: 15px;
    font-size: 12px;
}

.waiting-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.waiting-spinner {
    font-size: 48px;
    animation: pulse 2s infinite;
}

.waiting-spinner .icon {
    color: var(--text-primary);
    width: 50px;
    height: 50px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.waiting-content p {
    margin: 5px 0;
    color: var(--text-secondary);
}

.waiting-actions {
    padding: 20px 0 0 20px;
    border-top: 1px solid var(--border-color);
}

.cancel-btn {
    padding: 10px 20px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-btn:hover {
    background: var(--bg-secondary);
}

.terminate-btn {
    padding: 10px 20px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.terminate-btn:hover {
    background: var(--bg-secondary);
}

/* Shake animation for persistent invite notifications */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* =====================
   MULTI-USER CHAT STYLES
   ===================== */

.multi-user .room-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.add-user-btn {
    background: none;
    color: var(--text-secondary);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}
.add-user-btn .icon {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
}

.add-user-btn .icon:hover {
    color: var(--primary-color);
    transform: scale(1.05);
}

.terminate-room {
    background: none;
    color: var(--text-secondary);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}
.terminate-room .icon {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
}

.terminate-room .icon:hover {
    color: var(--primary-color);
    transform: scale(1.05);
}

.participants-list {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-secondary, #666);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* Add User Dialog Styles */
.add-user-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.dialog-content {
    position: relative;
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color, #e1e5e9);
}
.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color, #e1e5e9);
}

.dialog-header h4 {
    margin: 0;
    color: var(--text-primary, #1a1a1a);
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    color: var(--text-secondary, #666);
    transition: all 0.2s ease;
}

.dialog-header .close-btn .icon {
    width: 22px;
    height: 22px;
}
.close-btn:hover {
    color: var(--text-primary, #1a1a1a);
}

.dialog-body p {
    margin: 0 0 16px 0;
    color: var(--text-secondary, #666);
    font-size: 14px;
    line-height: 1.5;
}

/* Mobile responsive adjustments */
@media (max-width: 799px) {
    .dialog-content {
        width: 95%;
        max-width: none;
        margin: 20px;
    }
    
    .user-list .user-item {
        padding: 10px;
    }
    
    .user-list .user-item .user-info {
        font-size: 14px;
    }
    
    .multi-user .room-actions {
        gap: 6px;
    }
    
    .add-user-btn {
        padding: 6px;
    }
    
    .add-user-btn .icon {
        width: 24px;
        height: 24px;
    }
}

/* Rejoin and Sound */
#sound-consent-bar {
position: fixed;
    top: 20px;
    right: 20px;
    background: #2196F3;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    font-family: Arial, sans-serif;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 315px;
    animation: slideIn 0.3s ease-out;
}

#sound-consent-styles{
position: fixed;
    top: 20px;
    right: 20px;
    background: #2196F3;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    font-family: Arial, sans-serif;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 315px;
    animation: slideIn 0.3s ease-out;
}

#enable-sound-btn {
    background: white;
    color: #2196F3;
    border: 1px solid white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
}

#dismiss-sound-btn {
    background: transparent;
    color: white;
    border: 1px solid white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.rejoin-request-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    max-width: 300px;
}
.rejoin-request-content h4 {
    margin: 0 0 10px 0;
    color: #333;
}
.rejoin-request-content p {
    margin: 0 0 15px 0;
    color: #666;
}
.rejoin-request-actions {
    display: flex;
    gap: 10px;
}
.rejoin-request-actions button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
.rejoin-request-actions button:first-child {
    color: #28a745;
    border-color: #28a745;
}
.rejoin-request-actions button:last-child {
    color: #dc3545;
    border-color: #dc3545;
}
.rejoin-request-btn {
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
}
.rejoin-request-btn:hover {
    opacity: 0.8;
}
.rejoin-request-section {
    margin-top: 15px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f8f9fa;
}
.rejoin-request-prompt {
    text-align: center;
}
.rejoin-request-prompt p {
    margin: 0 0 10px 0;
    color: #666;
}

.sound-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  color: var(--button-primary);
  transition: color 0.2s ease;
}
.sound-toggle:hover {
  color: #333;
}
.sound-toggle.muted .icon {
  color: #999;
}

.room-actions .sound-toggle .icon {
    width: 24px;
    height: 24px;
}
/* ====================================
   Table
   ==================================== */
/* Base Table Styles */
.custom-table {
    width: 100%;
    margin: 20px auto;
    font-size: 14px;
}

.custom-table th:first-child {
    max-width: 150px;
    width: 100px;
}

.custom-table th, .custom-table td {
    padding: 10px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

.custom-table tr td {
    border-right: 1px solid var(--border-color);
}

.custom-table td:last-child {
    border-right: none;
}

.custom-table tr:last-child td {
    border-bottom: none;
}

.custom-table td {
    border-left: none;
    border-right: none;
}

.custom-table th {
    font-weight: bold;
    background-color: var(--bg-accent);
    color: #ffffff;
}

.custom-table td {
    color: var(--text-primary);
}

.reward-submit-btn {
	display: inline-block;
	background-color: var(--button-primary);
	color: #ffffff;
	text-decoration: none;
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 12px;
}
.reward-submit-btn:hover {
	opacity: 0.8;
}
/* ====================================
   Table
   ==================================== */      
@media only screen and (max-width: 799px) {
   html, body {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    }
    
    * {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
        touch-action: pan-y;
    }
}

/* ====================================
   Universal
   ==================================== */
a, .btn, .link, .icon {
   cursor: pointer;
}

/* Post highlight animation for new posts */
.highlight-new-post {
    animation: highlightPulse 3s ease-in-out;
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 0 20px rgba(29, 155, 255, 0.3) !important;
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.5);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(29, 155, 255, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(29, 155, 255, 0.3);
    }
}

/* Dropped post badge */
.post-badge.dropped {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 99, 71, 0.2);
  color: #ff6347;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.post-dropped-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.post-dropped-header .dropper {
  font-weight: 600;
  color: var(--text-muted);
}

.post-feed-toggle {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  transition: border-bottom-width 0.2s ease;
  border-bottom: 1px solid var(--border-color);
}

.post-feed-toggle label {
  font-size: 15px;
  letter-spacing: 0.3px;
  color: var(--text-muted);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.post-author {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 12px;
}

.post-timestamp {
    font-size: 12px;
    color: var(--text-secondary);
}
.drop-modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 4000;
}

.drop-modal-overlay.active {
    display: flex;
}

.drop-modal {
    background: var(--bg-secondary);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.35);
    width: min(480px, 90vw);
    padding: 24px;
    color: var(--text-primary);
    position: relative;
    animation: dropModalIn 0.25s ease;
}

.drop-modal h3 {
    margin: 0 0 12px;
    font-size: 1.35rem;
}

.drop-modal p {
    margin: 0 0 16px;
    color: var(--text-secondary);
}

.drop-modal-close {
    position: absolute;
    right: 16px;
    top: 12px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
}

.drop-search {
    position: relative;
}

.drop-search input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 15px;
}

.drop-results {
    margin-top: 12px;
    max-height: 280px;
    overflow-y: auto;
}

.drop-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.drop-result-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    cursor: pointer;
    transition: 0.2s ease;
}

.drop-result-item:hover {
    border-color: var(--primary-color);
    background: rgba(29, 155, 255, 0.08);
}

.drop-result-item.selected {
    border-color: var(--primary-color);
    background: rgba(29, 155, 255, 0.15);
}

.drop-result-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 600;
}

.drop-result-name {
    font-weight: 600;
    color: var(--text-primary);
}

.drop-result-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.drop-hint,
.drop-loading,
.drop-error,
.drop-empty {
    text-align: center;
    padding: 18px;
    color: var(--text-secondary);
}

.drop-error {
    color: var(--danger-color);
}

.drop-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.drop-actions .btn {
    padding: 10px 18px;
    border-radius: 10px;
}

@keyframes dropModalIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.no-posts-message {
  text-align: center;
  padding: 1rem 0;
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
}

.no-posts-content {
    border-bottom: 1px solid var(--border-color);
}
.no-posts-content p {
    padding: 1rem;
}

.welcome-cards-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0.5rem 0;
  margin-bottom: 2rem;
}

.card-display {
  position: relative;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  touch-action: pan-y;
}

.card-indicators {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background: var(--primary-color);
  transform: scale(1.2);
}

.indicator:hover {
  background: var(--primary-color);
  opacity: 0.7;
}

.welcome-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 25px;
  padding: 1.5rem;
  text-align: left;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: none;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  height: 400px;
  overflow: hidden;
  position: relative;
}

.welcome-card.active {
  display: block;
  animation: cardSlideIn 0.5s ease-out;
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.welcome-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.card-icon .icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--primary-color);
}

/* Welcome Cards Section - Independent from widgets */
.welcome-cards-section {
  margin-bottom: 2rem;
  /* Isolate from right sidebar styles */
  position: relative;
  z-index: 1;
}

.welcome-cards-section .welcome-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  text-align: left;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  /* Override any inherited styles */
  width: 100%;
  max-width: none;
  min-height: auto;
  display: block;
}

.welcome-cards-section .welcome-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.welcome-cards-section .welcome-card h4 {
  margin: 0.5rem 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  /* Override any inherited styles */
  line-height: 1.2;
  text-align: center;
}

.welcome-cards-section .welcome-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.4;
  /* Override any inherited styles */
  text-align: left;
}

.welcome-cards-section .card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.welcome-cards-section .card-icon .icon {
  width: 2.25rem;
  height: 2.25rem;
  color: currentColor;
}

/* Dark mode for welcome cards */
[data-theme="dark"] .welcome-cards-section .welcome-card {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] .welcome-cards-section .welcome-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}


.welcome-card h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.welcome-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  max-height: 200px;
}

.mission-card {
  border-left: 4px solid #e74c3c;
}

.about-card {
  border-left: 4px solid #3498db;
}

.privacy-card {
  border-left: 4px solid #2ecc71;
}

.disclaimer-card {
  border-left: 4px solid #f39c12;
}

.terms-card {
  border-left: 4px solid #9b59b6;
}

/* Dark mode styles for welcome cards */
html.dark .welcome-card,
html[data-theme="dark"] .welcome-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

html.dark .welcome-card:hover,
html[data-theme="dark"] .welcome-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary-color);
}

/* ========================================
   FEATURES SHOWCASE - GLASSY CARDS
   ======================================== */

.features-showcase {
  margin-top: 3rem;
  padding: 2rem 0;
  position: relative;
  overflow: hidden;
}

.features-showcase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(0, 212, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.05) 25%, 
    rgba(0, 212, 255, 0.1) 50%, 
    rgba(255, 255, 255, 0.05) 75%, 
    rgba(0, 212, 255, 0.1) 100%);
  animation: shimmer 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.3; transform: translateX(-100%); }
  50% { opacity: 0.8; transform: translateX(100%); }
}

.showcase-header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  z-index: 2;
}

.showcase-title {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), #00a8cc, #0099cc);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
  margin: 0 0 1rem 0;
  text-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.showcase-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin: 0;
  opacity: 0.9;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
  z-index: 2;
}

.feature-card {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  cursor: pointer;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(0, 212, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.05) 50%, 
    rgba(0, 212, 255, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 20px;
}

.feature-card:hover::before {
  opacity: 1;
}

.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, 
    rgba(0, 212, 255, 0.3) 0%, 
    rgba(0, 212, 255, 0.1) 30%, 
    transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0; transform: scale(0.8); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

.feature-card:hover .card-glow {
  opacity: 1;
}

.feature-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 
    0 20px 40px rgba(0, 212, 255, 0.2),
    0 0 0 1px rgba(0, 212, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: rgba(0, 212, 255, 0.4);
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 3;
}

.feature-icon .icon {
  width: 100%;
  height: 100%;
  color: var(--primary-color);
  filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon .icon {
  transform: scale(1.1) rotate(5deg);
  filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.8));
}

.feature-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  position: relative;
  z-index: 3;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.feature-card p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 1.5rem 0;
  position: relative;
  z-index: 3;
  opacity: 0.9;
}

.feature-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--primary-color), #00a8cc);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 3;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
  transition: all 0.3s ease;
}

.feature-card:hover .feature-badge {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

/* Feature-specific styling */
.feature-card[data-feature="privacy"] {
  border-left: 4px solid #00d4ff;
}

.feature-card[data-feature="security"] {
  border-left: 4px solid #ff6b6b;
}

.feature-card[data-feature="transparency"] {
  border-left: 4px solid #4ecdc4;
}

.feature-card[data-feature="freedom"] {
  border-left: 4px solid #45b7d1;
}

.feature-card[data-feature="verification"] {
  border-left: 4px solid #96ceb4;
}

.feature-card[data-feature="community"] {
  border-left: 4px solid #feca57;
}

/* Dark mode enhancements */
[data-theme="dark"] .feature-card {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .feature-card:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(0, 212, 255, 0.5);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .welcome-cards-container {
    padding: 0.5rem 0;
    max-width: 100%;
  }
  
  .features-grid {
    padding: 0 0.3rem;
  }
  
  .welcome-card {
    padding: 1.25rem;
    margin: 0 1rem;
    height: 400px;
  }
  
  .card-icon {
    font-size: 2rem;
  }
  
  .welcome-card h3 {
    font-size: 1.1rem;
  }
  
  .welcome-card p {
    font-size: 0.9rem;
  }
  
  .card-indicators {
    gap: 0.25rem;
  }
  
  .indicator {
    width: 10px;
    height: 10px;
  }
  
  }
}

/* Post modal textarea: avoid double border on focus */
#formModal textarea#message:focus {
  outline: none;
  /* Keep a single border; do not add any glow/ring */
  border-color: var(--primary-color);
  box-shadow: none !important;
}

/* Post blur styles */
.post-blurred .post-content {
  position: relative;
  transition: filter 0.3s ease;
}

.post-blurred .post-content > *:not(.blur-overlay) {
  filter: blur(16px);
  pointer-events: none;
}

.post-blurred .post-content .blur-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: auto;
  filter: none !important;
  border-radius: var(--border-radius);
}

.blur-message {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--danger-color);
  color: white;
  border-radius: var(--border-radius);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-align: center;
  max-width: 90%;
  word-wrap: break-word;
}

.blur-message .icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

.blur-message .guideline-link {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.3s ease;
  position: relative;
}

.blur-message .guideline-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background-color: #fff;
}

.blur-message span {
  text-decoration: none;
}

.blur-message .guideline-link:hover {
  color: #ffeb3b;
}

/* Guideline Overlay Styles */
.guideline-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 20px;
  box-sizing: border-box;
}

.guideline-content {
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
}

.guideline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.guideline-header h2 {
  margin: 0;
  color: var(--color-primary);
  font-size: 1.5rem;
  font-weight: 600;
}

.guideline-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-secondary);
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.guideline-close:hover {
  background: var(--bg-tertiary);
  color: var(--color-primary);
}

.guideline-body {
  padding: 1.5rem;
  color: var(--color-primary);
  line-height: 1.6;
}

.guideline-body p {
  margin: 0;
  font-size: 1rem;
}

/* Mobile optimization for guideline overlay */
@media only screen and (max-width: 768px) {
  .guideline-overlay {
    padding: 10px;
  }
  
  .guideline-content {
    max-height: 90vh;
  }
  
  .guideline-header {
    padding: 1rem;
  }
  
  .guideline-header h2 {
    font-size: 1.25rem;
  }
  
  .guideline-body {
    padding: 1rem;
  }
  
  .guideline-body p {
    font-size: 0.9rem;
  }
}

/* Mobile optimization for blur message */
@media only screen and (max-width: 768px) {
  .blur-message {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    max-width: 95%;
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .blur-message .icon {
    width: 18px;
    height: 18px;
  }
}
