/* Xaffle Dashboard Styles */
:root {
  /* Color tokens */
  --xaffle-dark-blue: #020b19;
  --xaffle-light-bg: #f8fafc;
  --xaffle-turquoise: #40e0d0;
  --xaffle-blue: #29b6f6;
  --xaffle-blue-dark: #0086c3;
  --xaffle-blue-light: #73e8ff;
  --xaffle-gradient: linear-gradient(120deg, var(--xaffle-turquoise), var(--xaffle-blue));

  /* Light theme (default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --hover-bg: #f1f5f9;
  --active-bg: #e2e8f0;
  --input-bg: #ffffff;
  --input-text: #1e293b;
  --header-bg: #ffffff;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --card-radius: 8px;
  --btn-radius: 6px;
  --input-radius: 6px;
  --success-color: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.1);
  --error-color: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.1);
  --warning-color: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --info-color: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.1);
  --table-header-bg: #f1f5f9;
  --navbar-height: 70px;

  --card-radius: 12px;
  --button-radius: 8px;
  --input-radius: 10px;
}

/* Dark theme overrides */
.dark-mode {
  --bg-primary: var(--xaffle-dark-blue);
  --bg-secondary: #1a202c;
  --bg-tertiary: #2d3748;
  --text-primary: #f7fafc;
  --text-secondary: #cbd5e0;
  --border-color: #2d3748;
  --input-bg: rgba(255, 255, 255, 0.08);
  --input-text: #f7fafc;
  --input-placeholder: rgba(255, 255, 255, 0.4);
  --shadow-color: rgba(0, 0, 0, 0.3);
  --error-color: #ff5252;
  --success-color: #68d391;
  --warning-color: #f6ad55;
  --info-color: #63b3ed;
  --hover-bg: #2d3748;
  --table-header-bg: #171f2e;
}

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

body {
  font-family: 'Inter', 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* App Container */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Top Navbar */
.top-navbar {
  height: var(--navbar-height);
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.brand-name {
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--xaffle-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.user-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-profile {
  position: relative;
  cursor: pointer;
}

.user-profile-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-tertiary);
  padding: 6px 12px 6px 6px;
  border-radius: 50px;
  transition: all 0.2s ease;
}

.user-profile:hover .user-profile-trigger {
  background-color: var(--hover-bg);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.username {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.dropdown-arrow {
  width: 14px;
  height: 14px;
  margin-left: 2px;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.user-profile.dropdown-active .dropdown-arrow {
  transform: rotate(180deg);
}

/* User dropdown menu */
.user-dropdown {
  position: absolute;
  top: calc(100% + 25px);
  right: -14px;
  width: 260px;
  background-color: var(--bg-secondary);
  border-radius: var(--card-radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
  border: 1px solid var(--border-color);
}

.user-dropdown.dropdown-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background-color: var(--bg-tertiary);
}

.dropdown-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.dropdown-username {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.dropdown-plan {
  font-size: 0.8rem;
  color: var(--xaffle-blue);
  font-weight: 500;
}

.dropdown-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 0;
}

.dropdown-section {
  padding: 8px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--button-radius);
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background-color: var(--hover-bg);
}

.dropdown-item svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.dropdown-item span {
  font-size: 0.9rem;
  font-weight: 500;
}

.dropdown-item-danger {
  color: var(--xaffle-red, #f44336);
}

.dropdown-item-danger svg {
  color: var(--xaffle-red, #f44336);
}

.navbar-center {
  flex-grow: 1;
  max-width: 500px;
  margin: 0 24px;
}

.home-search-container {
  position: relative;
  width: 100%;
}

.home-search-container svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

.home-search-input {
  width: 100%;
  padding: 10px 10px 10px 40px;
  border-radius: var(--input-radius);
  border: none;
  background-color: var(--input-bg);
  color: var(--input-text);
  font-size: 0.95rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.home-search-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(41, 182, 246, 0.5);
}

.home-search-input::placeholder {
  color: var(--input-placeholder);
}

.navbar-divider {
  height: 30px;
  width: 1px;
  background-color: var(--border-color);
  margin: 0 20px;
}

.nav-link {
    color: transparent;
}

.navbar-right {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--button-radius);
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-item a:hover {
  color: var(--text-primary);
  background-color: var(--hover-bg);
}

.nav-item.active a {
  color: var(--xaffle-blue);
  background-color: rgba(41, 182, 246, 0.1);
}

.nav-item svg {
  width: 18px;
  height: 18px;
}

/* Notifications Button */
.notifications-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
  outline: none;
  position: relative;
}

.notifications-btn:hover {
  background-color: var(--hover-bg);
}

.notifications-btn.active {
  background-color: var(--xaffle-blue);
  color: white;
}

.notifications-btn.active:hover {
  background-color: var(--xaffle-blue-dark);
}

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

.notification-badge {
  position: absolute;
  top: 0px;
  right: 0px;
  background-color: var(--xaffle-blue, #2BB6F6);
  color: white;
  font-size: 10px;
  font-weight: 600;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
  outline: none;
}

.theme-toggle-btn:hover {
  background-color: var(--hover-bg);
}

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

/* Main Content */
.content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 16px;
}

.page-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.action-buttons {
  display: flex;
  gap: 10px;
}

.content-area {
  flex-grow: 1;
  padding: 0 24px 24px;
  overflow-y: auto;
}

/* Dashboard */
/* Data Table */
.data-table-container {
  background-color: var(--bg-secondary);
  border-radius: var(--card-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  margin-bottom: 20px;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th,
.data-table td {
  padding: 14px 20px;
  text-align: left;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.15s ease;
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background-color: var(--hover-bg);
}

.data-table th {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  background-color: var(--table-header-bg);
  padding-top: 16px;
  padding-bottom: 16px;
  letter-spacing: 0.05em;
}

.checkbox-column {
  width: 44px;
}

.options-column {
  width: 120px;
  text-align: right;
}

.account-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-small {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #fff;
  font-weight: 600;
}

.avatar-color-0 {
  background-color: #FF6B6B;
}

.avatar-color-1 {
  background-color: #48BB78;
}

.avatar-color-2 {
  background-color: #4299E1;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.status-badge.success {
  background-color: rgba(72, 187, 120, 0.12);
  color: var(--success-color);
}

.status-badge.warning {
  background-color: rgba(237, 137, 54, 0.12);
  color: var(--warning-color);
}

.status-badge.info {
  background-color: rgba(66, 153, 225, 0.12);
  color: var(--info-color);
}

.group-badge {
  padding: 4px 10px;
  border-radius: 6px;
  background-color: var(--bg-tertiary);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Buttons */
.btn {
  padding: 10px 18px;
  border: none;
  border-radius: var(--button-radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-primary {
  background: var(--xaffle-gradient);
  color: white;
}

.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(64, 224, 208, 0.25);
}

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

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

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  box-shadow: none;
}

.btn-icon svg {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.btn-icon:hover {
  background-color: var(--bg-tertiary);
}

.btn-icon:hover svg {
  color: var(--text-primary);
}

.btn-action {
  background-color: rgba(66, 153, 225, 0.12);
}

.btn-action svg {
  color: var(--info-color);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.page-info {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.btn-pagination {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.hidden {
  display: none;
}

/* Circle Add Button */
.circle-add-btn {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--xaffle-gradient);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 100;
  padding: 0;
}

.circle-add-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.circle-add-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.circle-add-btn svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.5px;
}

/* Modal Dialog */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

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

.modal-container {
  background-color: var(--bg-secondary);
  border-radius: var(--card-radius);
  width: 95%;
  max-width: 450px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transform: translateY(-20px);
  transition: all 0.3s ease;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

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

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

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

.modal-close-btn svg {
  width: 18px;
  height: 18px;
}

.modal-body {
  padding: 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.input-group {
  margin-bottom: 16px;
  width: 100%;
  max-width: 400px;
}

.input-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.modal-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--input-radius);
  border: 1px solid var(--border-color);
  background-color: var(--input-bg);
  color: var(--input-text);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.modal-input:focus {
  outline: none;
  border-color: var(--xaffle-blue);
  box-shadow: 0 0 0 2px rgba(41, 182, 246, 0.2);
}

.modal-input.input-error {
  border-color: var(--error-color);
  animation: shake 0.3s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

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

.modal-footer {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border-color);
}

/* Tweet Modal Specific Styles */
.tweet-modal-container {
  max-width: 800px;
  width: 95%;
  max-height: 90vh;
  overflow: hidden;
}

.tweet-modal-header {
  border-bottom: 1px solid var(--border-color);
}

.tweet-modal-content {
  display: flex;
  flex-direction: row;
  height: calc(90vh - 120px);
  max-height: 700px;
  overflow: hidden;
}

/* Left side - Tweet display */
.tweet-info-container {
  flex: 1;
  padding: 20px;
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.tweet-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.tweet-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

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

.tweet-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.tweet-username {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.tweet-content {
  font-size: 1.1rem;
  line-height: 1.5;
  margin-bottom: 16px;
  color: var(--text-primary);
  word-break: break-word;
}

.tweet-media {
  margin-top: 12px;
  margin-bottom: 16px;
  border-radius: 16px;
  overflow: hidden;
}

.tweet-media img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}

.tweet-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.tweet-stats {
  display: flex;
  gap: 16px;
}

.tweet-stat {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.tweet-stat span {
  font-weight: 600;
  color: var(--text-primary);
}

/* Right side - Options form */
.tweet-options-container {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.tweet-options-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.tweet-input {
  padding: 12px 16px;
  border-radius: var(--input-radius);
  border: 1px solid var(--border-color);
  background-color: var(--input-bg);
  color: var(--input-text);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.tweet-input:focus {
  outline: none;
  border-color: var(--xaffle-blue);
  box-shadow: 0 0 0 2px rgba(41, 182, 246, 0.2);
}

.form-checkbox {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--xaffle-blue);
}

.form-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
}

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

/* Notification styling */
.notification {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  padding: 16px 24px;
  border-radius: var(--card-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2000;
  max-width: 400px;
}

.notification.active {
  transform: translateY(0);
  opacity: 1;
}

.notification-success {
  border-left: 4px solid var(--success-color);
}

.notification-error {
  border-left: 4px solid var(--error-color);
}

.notification-info {
  border-left: 4px solid var(--info-color);
}

/* Toast styling */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--card-radius);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 2500;
  max-width: 400px;
  width: auto;
  border-left: 4px solid var(--info-color);
}

.toast.active {
  transform: translateX(0);
  opacity: 1;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast-message {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  margin-left: 12px;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.toast-close:hover {
  background-color: var(--hover-bg);
  color: var(--text-primary);
}

.toast-close svg {
  width: 16px;
  height: 16px;
}

/* Toast types */
.toast-success {
  border-left-color: var(--success-color);
}

.toast-success .toast-icon {
  color: var(--success-color);
}

.toast-error {
  border-left-color: var(--error-color);
}

.toast-error .toast-icon {
  color: var(--error-color);
}

.toast-info .toast-icon {
  color: var(--info-color);
}

/* Dark mode specific overrides */
.dark-mode .toast {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Image Modal Styles */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.image-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#expandedImage {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

.close-image-modal {
  position: absolute;
  top: -40px;
  right: -40px;
  background: transparent;
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.close-image-modal:hover {
  transform: scale(1.2);
}

.close-image-modal svg {
  width: 24px;
  height: 24px;
}

/* Make tweet images indicate they're clickable */
.tweet-image {
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}

.tweet-image:hover {
  opacity: 0.9;
}

/* Custom Form Input Styles */
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* Action Toggle Buttons */
.action-toggles {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.toggle-item {
  position: relative;
}

.toggle-checkbox {
  display: none;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--input-radius);
  background: var(--input-bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
}

.toggle-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.toggle-checkbox:checked + .toggle-label {
  border-color: var(--xaffle-blue);
  background: var(--xaffle-blue);
  color: white;
}

.toggle-label:hover {
  border-color: var(--xaffle-blue);
  transform: translateY(-1px);
}

/* Custom Textarea */
.custom-input-wrapper {
  position: relative;
}

#custom_reply_section {
  overflow: hidden;
}

.custom-textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: var(--input-radius);
  background: var(--input-bg);
  color: var(--input-text);
  font-size: 14px;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.custom-textarea:focus {
  outline: none;
  border-color: var(--xaffle-blue);
  box-shadow: 0 0 0 3px rgba(41, 182, 246, 0.1);
}

.input-helper {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Number Input with Buttons */
.number-input-wrapper {
  display: flex;
  align-items: center;
  border: 2px solid var(--border-color);
  border-radius: var(--input-radius);
  background: var(--input-bg);
  overflow: hidden;
}

.number-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--hover-bg);
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.number-btn:hover {
  background: var(--active-bg);
}

.number-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--input-text);
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  padding: 8px;
}

.number-input:focus {
  outline: none;
}

/* Groups Selector */
.groups-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.group-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 2px solid var(--border-color);
  border-radius: 20px;
  background: var(--input-bg);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.group-chip.selected {
  border-color: var(--xaffle-turquoise);
  background: var(--xaffle-turquoise);
  color: white;
}

.group-chip:hover {
  border-color: var(--xaffle-turquoise);
  transform: translateY(-1px);
}

/* Custom Slider */
.slider-wrapper {
  position: relative;
  margin: 16px 0;
}

.custom-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border-color);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--xaffle-blue);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.custom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.custom-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--xaffle-blue);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.tag-count {
  color: var(--xaffle-blue);
  font-weight: 600;
}

/* Toggle Switch */
.toggle-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle-switch {
  position: relative;
  width: 50px;
  height: 26px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border-color);
  border-radius: 13px;
  outline: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.toggle-switch:checked {
  background: var(--xaffle-blue);
}

.toggle-switch::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch:checked::before {
  transform: translateX(24px);
}

.toggle-switch-label {
  cursor: pointer;
}

.toggle-switch-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Users to Follow */
.users-to-follow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 2px solid var(--border-color);
  border-radius: 20px;
  background: var(--input-bg);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-chip.selected {
  border-color: var(--xaffle-blue);
  background: var(--xaffle-blue);
  color: white;
}

.user-chip:hover {
  border-color: var(--xaffle-blue);
  transform: translateY(-1px);
}

.user-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

/* Time Input */
.time-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--border-color);
  border-radius: var(--input-radius);
  background: var(--input-bg);
  padding: 8px 12px;
}

.time-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--input-text);
  font-size: 16px;
  font-weight: 500;
}

.time-input:focus {
  outline: none;
}

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

/* Button with Icon */
.btn-icon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  stroke-width: 2;
}

/* User Type Badge */
.user-type-badge {
  font-size: 10px;
  padding: 2px 6px;
  background: var(--xaffle-turquoise);
  color: white;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.group-count {
  font-size: 11px;
  opacity: 0.7;
}

.no-users,
.no-groups {
  padding: 16px;
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  border: 2px dashed var(--border-color);
  border-radius: var(--input-radius);
}

.error-message {
  padding: 12px;
  text-align: center;
  color: var(--error-color);
  background: var(--error-bg);
  border: 1px solid var(--error-color);
  border-radius: var(--input-radius);
  font-size: 13px;
}

/* Responsive layout for mobile */
@media (max-width: 768px) {
  .tweet-modal-content {
    flex-direction: column;
    height: auto;
    max-height: none;
  }

  .tweet-info-container {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    max-height: 350px;
  }

  .action-toggles {
    flex-direction: column;
  }

  .toggle-label {
    justify-content: center;
  }

  .groups-selector,
  .users-to-follow {
    flex-direction: column;
  }
}
