/*!
 * AI Image Generator Chatbot Styles
 * Professional CSS for ThemeForest Standards
 * 
 * Author: Syntia AI Team
 * Version: 1.0.0
 * Description: Comprehensive styles for AI image generator interface
 * Dependencies: Inter font, Space Grotesk font, JetBrains Mono font
 * 
 * Table of Contents:
 * 1. CSS Custom Properties
 * 2. Reset & Base Styles
 * 3. Typography
 * 4. Layout Components
 * 5. UI Components
 * 6. Interactive Elements
 * 7. Responsive Design
 * 8. Animations & Transitions
 */

/* ==========================================================================
   CSS CUSTOM PROPERTIES
   ========================================================================== */
:root {
  /* Brand Colors */
  --primary-color: #008cffa4;
  --primary-glow: rgba(0, 102, 255, 0.6);
  --primary-hover: #0052cc;
  --secondary-color: #00ffcc;
  --secondary-glow: rgba(0, 255, 204, 0.6);

  /* Accent Colors */
  --accent-color-1: #ff3366;
  --accent-color-2: #7b5aff;
  --accent-color-3: #00d9ff;
  --accent-color-4: #ffcc00;

  /* Status Colors */
  --warning-color: #f59e0b;
  --error-color: #ef4444;

  /* Gradient Backgrounds */
  --gradient-bg: linear-gradient(
    135deg,
    rgb(255, 255, 255) 0%,
    #008cffa4 50%,
    rgb(254, 254, 255) 100%
  );

  /* Neutral Colors */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --gray-950: #030712;

  /* Dark Theme Colors */
  --bg-primary: #050510;
  --bg-secondary: #030308;
  --bg-tertiary: rgba(15, 15, 30, 0.5);
  --bg-card: rgba(15, 15, 30, 0.5);
  --bg-hover: rgba(255, 255, 255, 0.05);
  --border-color: rgba(255, 255, 255, 0.1);
  --dropdown-bg: rgba(6, 8, 14, 0.98);
  --dropdown-border: 1px solid rgba(255, 255, 255, 0.12);
  --dropdown-radius: 16px;
  --dropdown-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  --dropdown-item-radius: 12px;
  --dropdown-item-hover-bg: rgba(0, 102, 255, 0.12);
  --dropdown-item-hover-border: rgba(0, 102, 255, 0.35);
  --dropdown-item-selected-bg: rgba(0, 140, 255, 0.2);
  --dropdown-item-selected-border: rgba(0, 140, 255, 0.6);

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);

  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;

  /* Shadow System */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px var(--primary-glow);
  --shadow-glow-secondary: 0 0 20px var(--secondary-glow);
  --shadow-glow-accent: 0 0 15px rgba(123, 90, 255, 0.4);

  /* Animation & Transitions */
  --transition-speed: 0.3s;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Typography System */
  --font-family-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-heading:
    "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --font-family-mono: "JetBrains Mono", "Fira Code", Consolas, monospace;

  /* Layout Variables */
  --sidebar-width: 320px;
  --header-height: 80px;
  --input-height: 60px;
}

/* Custom Dropdown Styles */
.custom-dropdown {
  position: relative;
  display: inline-block;
  width: 45%;
  min-width: 160px;
}

.custom-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  width: 100%;
  min-height: 40px;
}

.custom-dropdown-trigger:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-color);
}

.custom-dropdown-trigger.active {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.custom-dropdown-arrow {
  margin-left: 8px;
  transition: transform 0.2s ease;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.custom-dropdown-trigger.active .custom-dropdown-arrow {
  transform: rotate(180deg);
}

.custom-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--dropdown-bg);
  border: var(--dropdown-border);
  border-radius: var(--dropdown-radius);
  box-shadow: var(--dropdown-shadow);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-speed) ease;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 4px;
  padding: 8px;
}

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

.custom-dropdown-option {
  padding: 10px 12px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  border: 1px solid transparent;
  font-size: 0.875rem;
  border-radius: var(--dropdown-item-radius);
  margin: 5px 0;
}

.custom-dropdown-option:last-child {
  border-bottom: none;
}

.custom-dropdown-option:hover {
  background: var(--dropdown-item-hover-bg);
  border-color: var(--dropdown-item-hover-border);
  color: var(--text-primary);
}

.custom-dropdown-option.selected {
  background: var(--dropdown-item-selected-bg);
  border-color: var(--dropdown-item-selected-border);
  color: var(--text-primary);
  box-shadow: 0 0 14px rgba(0, 102, 255, 0.35);
  font-weight: 500;
}

.custom-dropdown-option.selected::after {
  content: "✓";
  float: right;
  color: var(--text-primary);
  font-weight: bold;
}

/* Advanced Modal Custom Dropdown Styles */
.filter-modal .custom-dropdown-trigger {
  padding: var(--space-md);
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-family-sans);
  min-height: 44px;
}

.filter-modal .custom-dropdown-trigger:hover {
  border-color: var(--primary-color);
  background: var(--bg-card);
}

.filter-modal .custom-dropdown-trigger.active {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(42, 114, 210, 0.1);
}

.filter-modal .custom-dropdown-menu {
  background: var(--dropdown-bg);
  border: var(--dropdown-border);
  border-radius: var(--dropdown-radius);
  box-shadow: var(--dropdown-shadow);
}

.filter-modal .custom-dropdown-option:hover {
  background: var(--dropdown-item-hover-bg);
  border-color: var(--dropdown-item-hover-border);
  color: var(--text-primary);
}

.filter-modal .custom-dropdown-option.selected {
  background: var(--dropdown-item-selected-bg);
  border-color: var(--dropdown-item-selected-border);
  color: var(--text-primary);
  box-shadow: 0 0 14px rgba(0, 102, 255, 0.35);
}

.filter-modal .custom-dropdown-option.selected::after {
  color: var(--text-primary);
}

/* Custom Dropdown Scrollbar */
.custom-dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.custom-dropdown-menu::-webkit-scrollbar-track {
  background: transparent;
}

.custom-dropdown-menu::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.custom-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Responsive adjustments for custom dropdowns */
@media (max-width: 768px) {
  .custom-dropdown-menu {
    max-height: 150px;
  }
}

/* Additional styling for advanced options modal using filter-modal structure */
.filter-modal .style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.filter-modal .style-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.filter-modal .style-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.filter-modal .style-card.selected {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--accent-color);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.filter-modal .style-preview {
  font-size: 2rem;
  margin-bottom: 8px;
}

.filter-modal .style-name {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.filter-modal .style-description {
  color: var(--text-secondary);
  font-size: 0.8rem;
  opacity: 0.8;
}

.filter-modal .settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 12px;
}

.filter-modal .setting-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-modal .setting-group label {
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-modal .setting-group label i {
  color: var(--accent-color);
  font-size: 0.8rem;
}

.filter-modal .advanced-select,
.filter-modal .advanced-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.filter-modal .advanced-select:hover,
.filter-modal .advanced-input:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-color);
}

.filter-modal .advanced-select:focus,
.filter-modal .advanced-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-modal .slider-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.filter-modal .advanced-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.filter-modal .advanced-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.filter-modal .slider-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.filter-modal .slider-value {
  background: var(--accent-color);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

/* Responsive adjustments for advanced options */
@media (max-width: 768px) {
  .filter-modal .style-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
  }

  .filter-modal .settings-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .filter-modal .style-card {
    padding: 12px;
  }

  .filter-modal .style-preview {
    font-size: 1.5rem;
  }
}

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

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-family-sans);
  background: #05070d;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* Heading Styles */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-heading);
  font-weight: 700;
  line-height: 1.2;
}

/* Link Styles */
a {
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition-speed) ease;
}

/* List Styles */
ul {
  list-style: none;
}

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

/* Main App Container */
.image-generator-app {
  display: flex;
  min-height: 100svh;
  height: 100%;
  background: #05070d;
  overflow: hidden;
}

/* Mobile Toggle Button */
.mobile-toggle {
  display: none;
  position: fixed;
  top: var(--space-md);
  left: var(--space-md);
  z-index: 1001;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-toggle:hover {
  background: var(--bg-hover);
  box-shadow: var(--shadow-glow);
}

/* Sidebar Panel */
.sidebar-panel {
  width: var(--sidebar-width);
  background: #05070d;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: visible;
  transition:
    width var(--transition-normal),
    transform var(--transition-normal);
  box-shadow: 20px 0 50px rgba(0, 0, 0, 0.55);
}

/* Sidebar Header */
.sidebar-header {
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #05070d;
  position: relative;
  overflow: hidden;
}

.sidebar-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(42, 114, 210, 0.3),
    transparent
  );
}

.header-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  position: relative;
}

.go-back-section {
  display: flex;
  align-items: center;
}

.go-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0;
  border-radius: 0;
  transition: all var(--transition-fast);
  border: none;
  background: none;
}

.go-back-link:hover {
  color: rgba(255, 255, 255, 0.95);
  background: none;
  border-color: transparent;
  transform: none;
}

.go-back-link i {
  font-size: 0.875rem;
  transition: transform var(--transition-fast);
}

.go-back-link:hover i {
  transform: translateX(-1px);
}

.page-title {
  text-align: center;
}

.page-title h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-family: var(--font-family-heading);
  background: linear-gradient(
    135deg,
    var(--text-primary),
    var(--primary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.page-title p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 400;
  opacity: 0.8;
  letter-spacing: 0.02em;
}

.search-container {
  position: relative;
  margin-bottom: var(--space-lg);
  border-radius: 18px;
  background: rgba(8, 12, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
  transition: all var(--transition-fast);
}

.search-container::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: linear-gradient(
      120deg,
      rgba(0, 140, 255, 0.25),
      transparent,
      rgba(255, 255, 255, 0.06)
    )
    border-box;
  -webkit-mask:
    linear-gradient(#05070d 0 0) padding-box,
    linear-gradient(#05070d 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.search-container:focus-within::after,
.search-container:hover::after {
  opacity: 1;
}

.search-icon {
  position: absolute;
  left: var(--space-sm);
  margin-left: 6px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.875rem;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 2.75rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 18px;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: rgba(0, 140, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 140, 255, 0.15);
}

.new-session-btn {
  width: 100%;
  padding: 12px 16px;
  background: #05070d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.new-session-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 140, 255, 0.55);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.5);
}

.button-text {
  white-space: nowrap;
}

/* Sessions Section */
.sessions-section {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sessions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  position: relative;
}

.sessions-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sessions-actions {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
}

.action-btn {
  padding: var(--space-xs);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.sessions-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 var(--space-lg);
  position: relative;
}

.sessions-empty {
  display: none;
  margin: var(--space-lg) 0;
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 24, 0.6);
  text-align: center;
  color: var(--text-muted);
}

.sessions-empty.active {
  display: block;
}

.sessions-empty-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 102, 255, 0.15);
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
}

.sessions-empty-title {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.sessions-list::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--space-lg);
  right: var(--space-lg);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--border-color),
    transparent
  );
}

.session-item + .session-item {
  position: relative;
}

.session-item {
  margin-bottom: var(--space-sm);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  cursor: pointer;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.session-item:hover {
  background: rgba(12, 18, 32, 0.9);
  border-color: rgba(0, 102, 255, 0.35);
  transform: translateX(2px);
  box-shadow: 0 6px 16px rgba(0, 102, 255, 0.18);
}

.session-item:hover::before {
  transform: scaleY(1);
}

.session-item.active {
  background: linear-gradient(
    135deg,
    rgba(0, 102, 255, 0.16),
    rgba(0, 255, 204, 0.05)
  );
  border: 1px solid rgba(0, 140, 255, 0.7);
  box-shadow:
    0 10px 22px rgba(0, 102, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.session-item:focus {
  outline: 2px solid #2a72d2;
  outline-offset: 2px;
  background: var(--bg-hover);
}

.session-content {
  padding: var(--space-md);
}

.session-icon {
  display: none;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.session-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-xs);
}

.session-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.3;
  margin-bottom: 2px;
  font-family: var(--font-family-heading);
}

.session-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.session-preview {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  line-height: 1.5;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-xs);
}

.session-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(42, 114, 210, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.session-actions {
  display: flex;
  gap: var(--space-xs);
  opacity: 0;
  transition: all var(--transition-normal);
  transform: translateX(4px);
}

.session-item:hover .session-actions,
.session-item:focus .session-actions,
.session-item.active .session-actions {
  opacity: 1;
  transform: translateX(0);
}

.session-actions .action-btn {
  padding: 4px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  transition: all var(--transition-fast);
}

.session-actions .action-btn:hover {
  background: rgba(42, 114, 210, 0.2);
  color: #2a72d2;
  transform: scale(1.1);
}

.session-actions .action-btn:focus {
  outline-offset: 1px;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.quick-settings {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.setting-btn {
  padding: var(--space-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.setting-btn:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

.setting-btn i {
  transition: all var(--transition-normal);
}

.setting-btn:hover i {
  transform: scale(1.1);
}

.sidebar-collapse-btn {
  padding: var(--space-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 12px;
  transition: all var(--transition-normal);
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-collapse-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.dropdown-button {
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.sidebar-panel.collapsed {
  width: 88px;
}

.sidebar-panel.collapsed .sidebar-header {
  padding: var(--space-md);
}

.sidebar-panel.collapsed .header-section {
  margin-bottom: var(--space-md);
  gap: var(--space-md);
  align-items: center;
}

.sidebar-panel.collapsed .go-back-text {
  display: none;
}

.sidebar-panel.collapsed .go-back-link {
  justify-content: center;
  width: 100%;
}

.sidebar-panel.collapsed .search-container {
  margin-bottom: var(--space-md);
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar-panel.collapsed .search-input {
  width: 0;
  padding: 0;
  border: none;
  opacity: 0;
  pointer-events: none;
}

.sidebar-panel.collapsed .search-icon {
  position: static;
  transform: none;
  font-size: 0.9rem;
}

.sidebar-panel.collapsed .new-session-btn {
  justify-content: center;
  padding: 10px;
}

.sidebar-panel.collapsed .button-text {
  display: none;
}

.sidebar-panel.collapsed .sessions-title,
.sidebar-panel.collapsed .session-header,
.sidebar-panel.collapsed .session-preview,
.sidebar-panel.collapsed .session-meta {
  display: none;
}

.sidebar-panel.collapsed .session-content {
  padding: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-panel.collapsed .session-item {
  margin-bottom: var(--space-xs);
}

.sidebar-panel.collapsed .session-icon {
  display: flex;
  margin: 0;
}

.sidebar-panel.collapsed .sessions-header {
  justify-content: center;
  padding: var(--space-md) var(--space-sm);
}

.sidebar-panel.collapsed .sessions-actions {
  gap: var(--space-sm);
  justify-content: center;
  width: 100%;
}

.sidebar-panel.collapsed .sessions-list {
  padding: 0 var(--space-sm);
}

.sidebar-panel.collapsed .sessions-list::before {
  left: var(--space-sm);
  right: var(--space-sm);
}

.sidebar-panel.collapsed .user-profile-btn {
  padding: 6px;
  min-width: 44px;
  justify-content: center;
}

.sidebar-panel.collapsed .user-info,
.sidebar-panel.collapsed .profile-arrow {
  display: none;
}

.sidebar-panel.collapsed .sidebar-footer {
  padding: var(--space-md);
}

.sidebar-panel.collapsed .quick-settings {
  flex-direction: row;
  justify-content: center;
  gap: var(--space-sm);
}

.sidebar-panel.collapsed .user-profile-container {
  margin-right: 0;
}

.sidebar-panel.collapsed .sidebar-collapse-btn {
  width: 44px;
  height: 44px;
}

.sidebar-panel.collapsed .user-profile-dropdown {
  left: calc(100% + 12px);
  top: auto;
  bottom: 0;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* Main Header */
.main-header {
  height: auto;
  min-height: var(--header-height);
  background: #05070d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--space-lg) var(--space-xl) var(--space-md);
  display: flex;
  align-items: flex-start;
  position: relative;
  backdrop-filter: blur(10px);
}

.main-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(42, 114, 210, 0.3),
    transparent
  );
}

.main-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: var(--space-xl);
  right: var(--space-xl);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--border-color),
    transparent
  );
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  height: 100%;
  gap: var(--space-lg);
  position: relative;
}

.header-title {
  flex: 1;
  max-width: 600px;
  height: 100%;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.header-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  transition: transform var(--transition-fast);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.header-logo:hover {
  transform: scale(1.05);
}

.header-title h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-family-heading);
  line-height: 1.2;
  background-clip: text;
  letter-spacing: -0.02em;
  position: relative;
}

.voice-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 13, 0.98);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-normal),
    visibility var(--transition-normal);
  z-index: 1400;
}

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

.voice-overlay-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 24px calc(env(safe-area-inset-bottom, 0px) + 28px);
  gap: 20px;
}

.voice-overlay-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.voice-menu-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 12, 20, 0.9);
  color: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.voice-logo {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.voice-header-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.voice-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.voice-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.voice-visualizer {
  position: relative;
  width: min(250px, 82vw);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  margin-top: 5%;
}

.voice-orb-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  filter: saturate(1.05) brightness(0.95);
  pointer-events: none;
  user-select: none;
}

.voice-orb {
  background:
    radial-gradient(
      circle at 30% 25%,
      rgba(255, 255, 255, 0.35),
      transparent 55%
    ),
    radial-gradient(circle at 70% 70%, rgba(0, 140, 255, 0.5), transparent 60%),
    radial-gradient(
      circle at 50% 50%,
      rgba(8, 12, 20, 0.9),
      rgba(5, 7, 13, 0.98)
    );
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(0, 140, 255, 0.35);
  animation: voiceFloat 6s ease-in-out infinite;
}

.voice-orb-glow {
  background: radial-gradient(circle, rgba(0, 140, 255, 0.35), transparent 65%);
  filter: blur(12px);
  opacity: 0.8;
  animation: voicePulse 4s ease-in-out infinite;
}

.voice-orb-dots {
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.25) 1px,
    transparent 1px
  );
  background-size: 8px 8px;
  mask-image: radial-gradient(circle, rgba(0, 0, 0, 0.9) 45%, transparent 75%);
  opacity: 0.7;
  mix-blend-mode: screen;
  animation: voiceSpin 18s linear infinite;
}

.voice-prompt {
  text-align: center;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  line-height: 1.4;
  max-width: 320px;
}

.voice-controls {
  margin-top: auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.voice-control-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 14, 22, 0.8);
  color: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
}

.voice-main-btn {
  width: 78px;
  height: 78px;
  border: none;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.98),
    rgba(0, 140, 255, 0.85),
    rgba(255, 255, 255, 0.92)
  );
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.35),
    0 20px 50px rgba(0, 140, 255, 0.6),
    0 0 32px rgba(255, 255, 255, 0.35);
  color: var(--white);
  font-size: 1.2rem;
}

.voice-main-btn.recording {
  box-shadow:
    0 0 0 6px rgba(239, 68, 68, 0.2),
    0 20px 50px rgba(0, 0, 0, 0.5);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 14, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-normal),
    visibility var(--transition-normal);
  z-index: 1500;
  backdrop-filter: blur(14px);
  overflow: hidden;
}

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

.image-lightbox::before {
  content: "";
  position: absolute;
  inset: -10%;
  background-image: var(--lightbox-bg);
  background-size: cover;
  background-position: center;
  filter: blur(40px);
  opacity: 0.35;
  transform: scale(1.1);
}

.image-lightbox-surface {
  position: relative;
  width: min(1200px, 92vw);
  height: min(86vh, 860px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 28px);
  z-index: 1;
}

.image-lightbox-media {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: clamp(12px, 2vw, 18px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.image-lightbox-controls {
  position: fixed;
  bottom: clamp(16px, 4vw, 15px);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.image-lightbox-control {
  width: clamp(36px, 7vw, 44px);
  height: clamp(36px, 7vw, 44px);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(10, 14, 22, 0.55);
  color: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.image-lightbox-control.close {
  position: absolute;
  top: clamp(-30px, -4vw, 0px);
  right: clamp(16px, 4vw, 28px);
}

@media (max-width: 768px) {
  .image-lightbox-surface {
    width: 94vw;
    height: 86vh;
  }
}

@keyframes voiceFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes voicePulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

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

.header-title p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
  font-weight: 400;
  opacity: 0.9;
  margin-top: var(--space-md);
}

.header-actions {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
  align-items: center;
  height: 100%;
}

.mobile-actions {
  position: relative;
  display: none;
}

.mobile-actions-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 12, 20, 0.9);
  color: rgba(255, 255, 255, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mobile-actions-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  background: rgba(6, 8, 14, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all var(--transition-normal);
  z-index: 30;
}

.mobile-actions-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-actions-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  font-size: 0.88rem;
}

.mobile-actions-item:hover {
  background: rgba(0, 140, 255, 0.15);
}

.header-btn {
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9rem;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.header-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(42, 114, 210, 0.1),
    transparent
  );
  transition: all var(--transition-normal);
}

.header-btn:hover::before {
  left: 100%;
}

.header-btn:hover {
  background: var(--bg-hover);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow:
    0 8px 25px rgba(42, 114, 210, 0.2),
    0 0 0 1px rgba(42, 114, 210, 0.1);
}

.header-btn.active {
  background: rgba(8, 12, 20, 0.9);
  border-color: rgba(0, 140, 255, 0.6);
  color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 24px rgba(0, 102, 255, 0.3);
}

.header-btn i {
  transition: all var(--transition-normal);
}

.header-btn:hover i {
  transform: scale(1.1);
}

/* Content Container */
.content-container {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xl);
  overflow: hidden;
  position: relative;
  background: #05070d;
}

/* Messages Container */
.messages-container {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow-y: auto;
  padding: clamp(20px, 2vw, 36px);
  min-height: 0;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  box-shadow: none;
}

/* Welcome Screen */
.welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  max-width: 980px;
  margin: 0;
}

.welcome-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-bg);

  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-glow);
  animation: pulse 2s infinite;
}

.welcome-icon i {
  font-size: 2rem;
  color: var(--white);
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: var(--shadow-glow);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--primary-glow);
  }
}

.welcome-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  font-family: "Space Grotesk", var(--font-family-sans);
  line-height: 1.2;
  background: linear-gradient(135deg, #ffffff, #008cffa4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  max-width: 650px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.welcome-suggestions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
  width: 100%;
  max-width: none;
}

.suggestion-card {
  background: rgba(7, 10, 18, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: left;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 14px;
  row-gap: 4px;
  align-items: center;
}

.suggestion-card:hover {
  background: rgba(10, 14, 24, 0.96);
  border-color: rgba(0, 140, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.5);
}

.suggestion-card:active {
  transform: translateY(-2px) scale(1.01);
  transition-duration: 0.1s;
}

.suggestion-icon {
  width: 42px;
  height: 42px;
  background: rgba(0, 140, 255, 0.15);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  grid-row: 1 / span 2;
}

.suggestion-icon i {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
}

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

.suggestion-description {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
}

/* Prompt Helper Panel */
.prompt-helper-panel {
  background: #05070d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  gap: var(--space-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  width: min(360px, 90vw);
  height: calc(100% - 12px);
  position: absolute;
  top: 6px;
  right: 6px;
  transform: translateX(110%);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-normal);
}

.prompt-helper-panel.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.prompt-helper-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 13, 0.75);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  z-index: 2;
}

.prompt-helper-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.prompt-helper-panel {
  z-index: 3;
}
.prompt-helper-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.prompt-helper-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.prompt-helper-header p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.helper-reset {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.helper-reset:hover {
  border-color: rgba(0, 140, 255, 0.5);
  color: rgba(255, 255, 255, 0.9);
  background: rgba(8, 12, 20, 0.9);
}

.prompt-helper-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.helper-section-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
}

.helper-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.helper-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  min-width: 120px;
}

.helper-label i {
  color: rgba(0, 140, 255, 0.8);
}

.helper-dropdown {
  width: 100%;
  max-width: 200px;
}

.helper-dropdown .custom-dropdown-trigger {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(4, 6, 12, 0.95);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
}

.helper-dropdown .custom-dropdown-menu {
  border-radius: var(--dropdown-radius);
  background: var(--dropdown-bg);
  border: var(--dropdown-border);
  padding: 8px;
}

.helper-dropdown .custom-dropdown-option {
  padding: 10px 12px;
  border-radius: var(--dropdown-item-radius);
  font-size: 0.85rem;
}

.helper-dropdown .custom-dropdown-option.selected {
  background: var(--dropdown-item-selected-bg);
  border-color: var(--dropdown-item-selected-border);
  box-shadow: 0 0 14px rgba(0, 102, 255, 0.35);
}

.helper-apply {
  margin-top: auto;
  width: 100%;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(0, 140, 255, 0.45);
  background: rgba(8, 12, 20, 0.9);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.helper-apply:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 140, 255, 0.7);
  box-shadow: 0 16px 36px rgba(0, 102, 255, 0.35);
}

/* Input Area */
.input-area {
  background: #05070d;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--space-lg);
  position: relative;
}

.input-container {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background: #05070d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 8px 12px;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(0, 102, 255, 0.08);
}

/* Typing Indicator */
.typing-indicator {
  position: absolute;
  bottom: 100%;
  left: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition-normal);
  margin-bottom: var(--space-sm);
  z-index: 10;
}

.typing-indicator.active {
  opacity: 1;
  transform: translateY(0);
}

.typing-dots {
  display: flex;
  gap: 3px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2a72d2;
  animation: typingDot 1.4s infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingDot {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

/* Style Selector */
/* Removed style dropdown - now handled in advanced options modal */

/* Input Wrapper */
.input-wrapper {
  flex: 1;
  position: relative;
  background: transparent;
  border: none;
  border-radius: 9999px;
}

.message-input {
  width: 100%;
  align-items: center;
  display: flex;
  background: transparent;
  border: none;
  padding: 10px 6px;
  color: var(--text-primary);
  font-size: 0.95rem;
  resize: none;
  outline: none;
  min-height: 44px;
  max-height: 88px;
  font-family: var(--font-family-sans);
  line-height: 1.4;
  position: relative;
  overflow: hidden;
}

.message-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
  font-style: normal;
}

.message-input:focus::placeholder {
  opacity: 0.7;
}

/* Character Counter */
.character-counter {
  position: absolute;
  bottom: var(--space-xs);
  right: var(--space-md);
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
}

.message-input:focus + .character-counter,
.character-counter.visible {
  opacity: 1;
}

.character-counter.warning {
  color: #f59e0b;
}

.character-counter.error {
  color: #ef4444;
}

/* Input Feedback */
.input-feedback {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.875rem;
  opacity: 0;
  transform: translateY(-10px);
  transition: all var(--transition-normal);
  z-index: 10;
  background: rgba(6, 8, 14, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.input-feedback.active {
  opacity: 1;
  transform: translateY(0);
}

.input-feedback.success {
  color: #10b981;
}

.input-feedback.error {
  color: #ef4444;
}

.input-feedback.info {
  color: #2a72d2;
}

.input-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: 1px solid rgba(0, 102, 255, 0.2);
  background: rgba(4, 6, 12, 0.95);
  color: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  flex-shrink: 0;
}

.input-icon-btn:hover {
  background: rgba(8, 12, 20, 0.98);
  color: var(--white);
  box-shadow: 0 0 12px rgba(0, 102, 255, 0.45);
  transform: translateY(-1px);
}

.input-icon-btn:disabled,
.input-icon-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.prompt-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(0, 102, 255, 0.25);
  background: rgba(4, 6, 12, 0.95);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  font-family: var(--font-family-mono);
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
  flex-shrink: 0;
}

.prompt-mode-btn i {
  font-size: 0.7rem;
  opacity: 0.7;
  transition: transform var(--transition-fast);
}

.prompt-mode-btn:hover {
  border-color: rgba(0, 140, 255, 0.6);
  color: var(--white);
  box-shadow: 0 0 14px rgba(0, 102, 255, 0.35);
}

.prompt-mode-btn.active {
  background: rgba(8, 14, 26, 0.98);
  border-color: rgba(0, 140, 255, 0.7);
  box-shadow: 0 0 18px rgba(0, 102, 255, 0.5);
}

.prompt-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.prompt-dropdown.open .prompt-mode-btn i {
  transform: rotate(180deg);
}

.prompt-dropdown-menu {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  min-width: 260px;
  background: rgba(6, 8, 14, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-normal);
  z-index: 30;
}

.prompt-dropdown.open .prompt-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.prompt-dropdown-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  margin: 5px 0;
}

.prompt-dropdown-item:hover {
  background: rgba(0, 102, 255, 0.12);
  border-color: rgba(0, 102, 255, 0.35);
}

.prompt-dropdown-item.selected {
  background: rgba(0, 140, 255, 0.2);
  border-color: rgba(0, 140, 255, 0.6);
  box-shadow: 0 0 14px rgba(0, 102, 255, 0.35);
}

.prompt-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.prompt-item-desc {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Voice Button States */
.mic-btn.recording {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ef4444;
  animation: pulse 2s infinite;
}

.mic-btn.recording:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #dc2626;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Generate Button */
.generate-button {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0 22px;
  background: linear-gradient(
    135deg,
    rgb(255, 255, 255) 0%,
    #008cffa4 50%,
    rgb(254, 254, 255) 100%
  );
  background-size: 200% 200%;
  border: none;
  border-radius: 9999px;
  color: var(--white);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  height: 44px;
  min-width: 140px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 10px 30px rgba(0, 102, 255, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.generate-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transition: left 0.6s ease;
}

.generate-button::after {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.25),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.generate-button:hover {
  background-position: 100% 0;
  box-shadow:
    0 14px 36px rgba(0, 102, 255, 0.5),
    0 0 18px rgba(0, 102, 255, 0.35);
  animation:
    gradientShift 2.5s ease-in-out infinite,
    glow 2.2s ease-in-out infinite,
    buttonPulse 2s ease-in-out infinite;
  transform: translateY(-1px);
}

.generate-button:hover::before {
  left: 100%;
}

.generate-button:hover::after {
  opacity: 0.7;
}

.generate-button:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(0, 102, 255, 0.35);
}

.generate-button:focus {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(0, 102, 255, 0.3),
    0 12px 30px rgba(0, 102, 255, 0.45);
}

.button-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: rgba(255, 255, 255, 0.95);
  animation: spin 0.9s linear infinite;
  display: inline-block;
}

.generate-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.generate-button:disabled::before {
  display: none;
}

/* Advanced Options */
/* Advanced Options Modal Styles */
.advanced-modal {
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.advanced-modal .modal-header {
  background: linear-gradient(
    135deg,
    rgba(42, 114, 210, 0.1),
    rgba(0, 212, 255, 0.05)
  );
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-xl);
  position: relative;
}

.advanced-modal .modal-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(42, 114, 210, 0.5),
    transparent
  );
}

.advanced-modal .modal-header h3 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.advanced-modal .modal-header h3 i {
  color: var(--primary-color);
  font-size: 1.25rem;
}

.advanced-modal .modal-body {
  padding: var(--space-xl);
  max-height: 60vh;
  overflow-y: auto;
}

.advanced-options-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.option-section {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-normal);
}

.option-section:hover {
  border-color: rgba(42, 114, 210, 0.3);
  box-shadow: 0 4px 20px rgba(42, 114, 210, 0.1);
}

.section-header {
  margin-bottom: var(--space-lg);
  text-align: center;
}

.section-header h4 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.section-header h4 i {
  color: var(--primary-color);
  font-size: 1.1rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

/* Style Grid */
.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}

.style-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.style-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.style-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 8px 25px rgba(42, 114, 210, 0.15);
  transform: translateY(-2px);
}

.style-card:hover::before {
  transform: scaleX(1);
}

.style-card.selected {
  border-color: var(--primary-color);
  background: linear-gradient(
    135deg,
    rgba(42, 114, 210, 0.1),
    rgba(0, 212, 255, 0.05)
  );
  box-shadow:
    0 8px 25px rgba(42, 114, 210, 0.2),
    0 0 0 1px rgba(42, 114, 210, 0.3);
}

.style-card.selected::before {
  transform: scaleX(1);
}

.style-preview {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  display: block;
}

.style-card .style-info {
  text-align: center;
}

.style-card .style-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: var(--space-xs);
}

.style-card .style-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Settings Grid */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.setting-group label {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.setting-group label i {
  color: var(--primary-color);
  font-size: 0.875rem;
}

.advanced-select {
  padding: var(--space-md);
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: var(--font-family-sans);
  transition: all var(--transition-normal);
  cursor: pointer;
}

.advanced-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(42, 114, 210, 0.1);
}

.advanced-select:hover {
  border-color: var(--primary-color);
}

.advanced-input {
  padding: var(--space-md);
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: var(--font-family-sans);
  transition: all var(--transition-normal);
}

.advanced-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(42, 114, 210, 0.1);
}

.advanced-input::placeholder {
  color: var(--text-muted);
}

/* Creativity Slider */
.creativity-group {
  grid-column: 1 / -1;
}

.slider-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.advanced-slider {
  width: 100%;
  height: 8px;
  background: linear-gradient(to right, var(--gray-600), var(--primary-color));
  border-radius: 4px;
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.advanced-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: var(--gradient-bg);

  border-radius: 50%;
  cursor: pointer;
  box-shadow:
    0 4px 12px rgba(42, 114, 210, 0.4),
    0 0 0 2px var(--bg-secondary);
  transition: all var(--transition-normal);
}

.advanced-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow:
    0 6px 20px rgba(42, 114, 210, 0.6),
    0 0 0 2px var(--bg-secondary);
}

.advanced-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--gradient-bg);

  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--bg-secondary);
  box-shadow: 0 4px 12px rgba(42, 114, 210, 0.4);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.slider-value {
  background: var(--primary-color);
  color: white;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  min-width: 24px;
  text-align: center;
}

/* Modal Footer */
.modal-footer {
  padding: var(--space-xl);
  border-top: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}

.btn-primary,
.btn-secondary {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-bg);

  color: white;
  box-shadow: 0 4px 15px rgba(42, 114, 210, 0.3);
  border: none;
}

.btn-primary:hover {
  box-shadow: 0 8px 25px rgba(42, 114, 210, 0.4);
}

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

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

/* Responsive Design for Advanced Modal */
@media (max-width: 768px) {
  .advanced-modal {
    max-width: 95%;
    margin: 10px;
    max-height: 95vh;
  }

  .advanced-modal .modal-header,
  .advanced-modal .modal-body,
  .modal-footer {
    padding: var(--space-lg);
  }

  .style-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-sm);
  }

  .settings-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .modal-footer {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .section-header h4 {
    font-size: 1.1rem;
  }

  .style-card {
    padding: var(--space-md);
  }

  .style-preview {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .advanced-modal {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    max-height: 100vh;
  }

  .style-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .advanced-modal .modal-header h3 {
    font-size: 1.25rem;
  }
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1300;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

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

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

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

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

.modal-close {
  padding: var(--space-xs);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

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

.modal-body {
  padding: var(--space-lg);
  overflow-y: auto;
  max-height: 60vh;
}

/* Instruction Steps */
.instruction-step {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.step-number {
  width: 32px;
  height: 32px;
  background: var(--gradient-bg);

  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.step-content p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.tips-section {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-top: var(--space-xl);
}

.tips-section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.tips-section ul {
  list-style: none;
  padding: 0;
}

.tips-section li {
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
  padding-left: var(--space-md);
  position: relative;
}

.tips-section li::before {
  content: "•";
  color: var(--primary-color);
  position: absolute;
  left: 0;
}

/* Gallery Modal */
.gallery-modal {
  max-width: 1000px;
  width: 95%;
  border-radius: 22px;
  background: rgba(6, 8, 14, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
}

.gallery-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.empty-gallery {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  padding: clamp(20px, 3vw, 32px);
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    rgba(10, 14, 24, 0.96),
    rgba(6, 9, 18, 0.92)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
  position: relative;
  overflow: hidden;
  min-height: 220px;
}

.empty-gallery::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at top left,
      rgba(0, 140, 255, 0.22),
      transparent 55%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(139, 92, 246, 0.18),
      transparent 60%
    );
  opacity: 0.8;
}

.empty-gallery::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  opacity: 0.45;
}

.empty-gallery-visual {
  position: relative;
  width: min(200px, 100%);
  height: 150px;
  display: grid;
  place-items: center;
  z-index: 1;
}

.empty-gallery-frame {
  position: absolute;
  width: 130px;
  height: 88px;
  border-radius: 18px;
  background: linear-gradient(
    140deg,
    rgba(255, 255, 255, 0.08),
    rgba(0, 0, 0, 0.25)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
}

.empty-gallery-frame.frame-one {
  transform: translate(-26px, 12px) rotate(-6deg);
}

.empty-gallery-frame.frame-two {
  transform: translate(16px, -10px) rotate(6deg);
}

.empty-gallery-frame.frame-three {
  transform: translate(32px, 22px) rotate(12deg);
  opacity: 0.7;
}

.empty-gallery-orbit {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(0, 140, 255, 0.9),
    rgba(139, 92, 246, 0.9)
  );
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.4rem;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.empty-gallery-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.empty-gallery-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 140, 255, 0.12);
  border: 1px solid rgba(0, 140, 255, 0.3);
  color: #cfe4ff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.empty-gallery-content h4 {
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  color: var(--text-primary);
}

.empty-gallery-content p {
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 420px;
}

.empty-gallery-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.empty-gallery-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
}

.gallery-grid .empty-gallery,
.image-gallery .empty-gallery {
  grid-column: 1 / -1;
}

.gallery-modal .modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gallery-modal .modal-body {
  padding: 20px 24px 24px;
}

.gallery-modal .modal-footer {
  padding: 16px 24px 24px;
}

.gallery-grid img {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal);
}

.gallery-grid img:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

@media (max-width: 900px) {
  .empty-gallery {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .empty-gallery-content {
    justify-items: center;
  }

  .empty-gallery-content p {
    text-align: center;
  }
}

.search-lightbox {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(0, 140, 255, 0.16), transparent 45%),
    rgba(2, 4, 8, 0.9);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vh, 48px) clamp(16px, 4vw, 48px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal);
  z-index: 1200;
}

.search-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.search-lightbox-surface {
  width: min(1100px, 95vw);
  background: linear-gradient(
    160deg,
    rgba(12, 15, 24, 0.98),
    rgba(7, 9, 14, 0.98)
  );
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 35px 90px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: clamp(16px, 2.6vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: min(90vh, 860px);
  overflow: hidden;
  transform: translateY(18px) scale(0.98);
  transition: transform var(--transition-normal);
}

.search-lightbox.active .search-lightbox-surface {
  transform: translateY(0) scale(1);
}

.search-lightbox-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(280px, 1fr);
  gap: clamp(16px, 3vw, 32px);
  align-items: stretch;
  min-height: 0;
}

.search-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.search-lightbox-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  font-size: 1.05rem;
}

.search-lightbox-subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
}

.search-lightbox-close {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(14, 16, 24, 0.85);
  color: rgba(255, 255, 255, 0.75);
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-lightbox-close:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}

.search-lightbox-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 520px;
  overflow: hidden;
}

.search-lightbox-input {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 9, 14, 0.95);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.search-lightbox-input input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1rem;
  padding: 14px 48px 14px 16px;
}

.search-lightbox-icon {
  position: absolute;
  right: 16px;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.search-lightbox-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-lightbox-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search-lightbox-heading {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
}

.search-lightbox-link {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 4px;
  transition: color var(--transition-fast);
}

.search-lightbox-link:hover {
  color: rgba(255, 255, 255, 0.9);
}

.search-lightbox-action {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 15, 24, 0.95);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-lightbox-action:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(18, 22, 32, 0.95);
}

.search-lightbox-list {
  display: grid;
  gap: 8px;
}

.search-lightbox-item {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-lightbox-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.search-lightbox-item.active {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.search-lightbox-item-title {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  font-size: 0.92rem;
}

.search-lightbox-item-meta {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.search-lightbox-pill {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
}

.search-lightbox-preview {
  background: rgba(7, 9, 14, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 520px;
  overflow: hidden;
}

.search-lightbox-preview-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 6px 4px 12px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  height: 100%;
}

.search-lightbox-preview-track::-webkit-scrollbar {
  height: 6px;
}

.search-lightbox-preview-track::-webkit-scrollbar-track {
  background: transparent;
}

.search-lightbox-preview-track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.search-lightbox-preview-card {
  min-width: 350px;
  max-width: 450px;
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(12, 15, 24, 0.9);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
  transition:
    transform var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.search-lightbox-preview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.search-lightbox-preview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

@media (max-width: 900px) {
  .search-lightbox-layout {
    grid-template-columns: 1fr;
  }

  .search-lightbox-preview {
    min-height: 280px;
  }

  .search-lightbox-panel {
    min-height: auto;
  }
}

@media (max-width: 768px) {
  .search-lightbox {
    padding: 14px;
  }

  .search-lightbox-surface {
    width: 100%;
    max-height: calc(100vh - 28px);
  }

  .search-lightbox-layout {
    gap: 16px;
  }

  .search-lightbox-preview-track {
    padding-bottom: 8px;
  }
}

@media (max-width: 600px) {
  .search-lightbox {
    padding: 12px;
  }

  .search-lightbox-surface {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    padding: 16px;
    overflow-y: auto;
  }

  .search-lightbox-header {
    position: sticky;
    top: 0;
    background: rgba(10, 12, 18, 0.95);
    padding-top: 4px;
    padding-bottom: 12px;
    z-index: 2;
  }

  .search-lightbox-panel {
    min-height: auto;
    gap: 14px;
  }

  .search-lightbox-input input {
    font-size: 1rem;
    padding: 14px 44px 14px 14px;
  }

  .search-lightbox-preview {
    min-height: auto;
  }

  .search-lightbox-preview-card {
    min-width: 180px;
    max-width: 200px;
  }
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at top, rgba(0, 140, 255, 0.08), transparent 55%),
    rgba(2, 3, 7, 0.96);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

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

.loading-content {
  text-align: center;
  color: var(--text-primary);
  max-width: 460px;
  padding: var(--space-2xl);
  background: rgba(6, 8, 14, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.loading-orb {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.loading-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top-color: rgba(0, 140, 255, 0.8);
  animation: spin 1.8s linear infinite;
}

.loading-core {
  display: none;
}

.loading-pulse {
  display: none;
}

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

.loading-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.loading-label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
}

.loading-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0;
  background: linear-gradient(135deg, #ffffff, #008cffa4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.loading-content p {
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0;
  line-height: 1.5;
  font-size: 0.9rem;
}

.loading-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.loading-step {
  padding: 6px 10px;
  border-radius: 9999px;
  background: rgba(4, 6, 12, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.75rem;
  transition: all var(--transition-fast);
}

.loading-step.active {
  color: var(--white);
  border-color: rgba(0, 140, 255, 0.6);
  box-shadow: 0 0 16px rgba(0, 140, 255, 0.35);
}

.loading-progress {
  width: 100%;
  height: 6px;
  background: rgba(4, 6, 12, 0.95);
  border-radius: 9999px;
  overflow: hidden;
  margin: 0 auto;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #008cff, rgba(0, 212, 255, 0.6));
  width: 0%;
  transition: width var(--transition-normal);
  animation: progress 4s ease-in-out infinite;
  border-radius: 9999px;
  position: relative;
  overflow: hidden;
}

.progress-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes progress {
  0% {
    width: 0%;
  }
  25% {
    width: 30%;
  }
  50% {
    width: 60%;
  }
  75% {
    width: 85%;
  }
  100% {
    width: 100%;
  }
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.loading-tips {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: var(--space-sm);
}

/* Generation Status Indicator */
.generation-status {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(-10px);
  transition: all var(--transition-normal);
  z-index: 100;
}

.generation-status.active {
  opacity: 1;
  transform: translateY(0);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2a72d2;
  animation: pulse 1.5s infinite;
}

.status-indicator.success {
  background: #10b981;
  animation: none;
}

.status-indicator.error {
  background: #ef4444;
  animation: none;
}

/* Responsive Design */
/* Large Tablets and Small Desktops */
@media (max-width: 1200px) {
  .content-container {
    gap: var(--space-lg);
  }

  .welcome-suggestions {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (min-width: 1400px) {
  .content-container {
    gap: clamp(24px, 2.4vw, 48px);
  }

  .prompt-helper-panel {
    width: min(380px, 32vw);
  }
}

/* Tablets */
@media (max-width: 1024px) {
  .content-container {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    gap: var(--space-md);
    height: calc(100vh - 80px);
    overflow: hidden;
  }

  .prompt-helper-panel {
    width: calc(100% - 24px);
    height: calc(100% - 24px);
    left: 12px;
    right: 12px;
    max-width: none;
    max-height: none;
    overflow: auto;
  }

  .sidebar-panel {
    width: 280px;
  }

  .main-content {
    padding-left: 0;
  }

  .quick-settings {
    gap: var(--space-xs);
  }

  .setting-btn {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Mobile Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

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

/* Mobile Landscape and Small Tablets */
@media (max-width: 1200px) {
  .mobile-toggle {
    display: none;
  }

  .mobile-overlay {
    display: none;
  }

  .mobile-overlay.active {
    display: block;
  }
  .go-back-link {
    margin-left: auto;
  }
  .sidebar-panel {
    position: relative;
    top: 0;
    left: 0;
    z-index: 2;
    width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    height: 100svh;
    transform: none;
    transition: width var(--transition-normal);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.55);
  }

  .sidebar-panel.active {
    transform: none;
  }

  .main-content {
    width: 100%;
    padding: 0;
  }

  .main-header {
    padding: var(--space-sm) var(--space-md);
    position: sticky;
    top: 0;
    background: rgba(6, 8, 14, 0.98);
    z-index: 10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .header-brand {
    gap: var(--space-sm);
    margin-left: 70px;
  }

  .header-logo {
    width: 32px;
    height: 32px;
  }

  .header-title h1 {
    font-size: 1.25rem;
    line-height: 1.3;
  }

  .header-actions {
    gap: var(--space-xs);
  }

  .header-btn {
    padding: var(--space-sm);
    font-size: 0.875rem;
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
  }

  .content-container {
    gap: var(--space-md);
  }

  .input-area {
    padding: var(--space-md);
    position: sticky;
    bottom: 0;
    background: rgba(6, 8, 14, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.4);
  }

  .input-container {
    flex-wrap: wrap;
    border-radius: 20px;
    padding: 12px;
  }

  .prompt-dropdown-menu {
    left: 0;
    right: 0;
    min-width: 0;
    width: 100%;
    max-height: 50vh;
    overflow-y: auto;
  }

  .custom-dropdown {
    width: 100%;
    min-width: 0;
  }

  .custom-dropdown-menu {
    max-height: 50vh;
    overflow-y: auto;
  }

  .add-prompt-btn {
    order: 1;
  }

  .prompt-dropdown {
    order: 2;
  }

  .input-wrapper {
    order: 3;
    flex: 1 1 100%;
  }

  .mic-btn {
    order: 4;
  }

  .generate-button {
    order: 5;
    width: 100%;
  }

  .message-input {
    min-height: 60px;
    font-size: 16px; /* Prevents zoom on iOS */
    touch-action: manipulation;
  }

  .style-selector {
    order: -1;
  }

  .style-button {
    width: 100%;
    justify-content: space-between;
    min-height: 48px;
    touch-action: manipulation;
  }

  .generate-button {
    justify-content: center;
    min-height: 52px;
    font-size: 1rem;
    touch-action: manipulation;
  }

  .welcome-suggestions {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .suggestion-card {
    min-height: 60px;
    touch-action: manipulation;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: rgba(42, 114, 210, 0.2);
    pointer-events: auto;
    position: relative;
    z-index: 1;
  }

  .suggestion-card:active {
    transform: scale(0.98);
    background: var(--bg-hover);
    transition-duration: 0.1s;
  }

  .advanced-options {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .action-btn {
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
  }

  /* Touch-friendly session items */
  .session-item {
    min-height: 56px;
    padding: var(--space-md);
    touch-action: manipulation;
  }

  .session-actions {
    gap: var(--space-xs);
  }

  .session-actions .action-btn {
    min-width: 40px;
    min-height: 40px;
    padding: var(--space-xs);
  }
}

/* Mobile Portrait */
@media (max-width: 480px) {
  :root {
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-2xl: 24px;
  }

  .mobile-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    top: 15px;
    left: 15px;
    min-width: 40px;
    min-height: 40px;
    padding: 8px;
  }

  .sidebar-open .mobile-toggle {
    display: none;
  }

  .sidebar-panel {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1005;
    width: 100%;
    max-width: none;
    height: 100svh;
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.5);
  }

  .sidebar-panel.active {
    transform: translateX(0);
  }

  .main-header {
    padding: var(--space-sm) var(--space-md);
  }

  .header-logo {
    width: 28px;
    height: 28px;
  }

  .header-title h1 {
    font-size: 1.125rem;
  }

  .header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .welcome-title {
    font-size: 1.75rem;
    line-height: 1.2;
  }

  .welcome-subtitle {
    font-size: 1rem;
    line-height: 1.4;
  }

  .suggestion-card {
    padding: 14px 16px;
    min-height: 64px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: rgba(42, 114, 210, 0.2);
    touch-action: manipulation;
    pointer-events: auto;
    position: relative;
    z-index: 1;
    background: linear-gradient(
      135deg,
      rgba(12, 18, 32, 0.95),
      rgba(6, 10, 18, 0.9)
    );
    border: 1px solid rgba(0, 140, 255, 0.2);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45);
  }

  .suggestion-card:active {
    transform: scale(0.98);
    background: rgba(12, 18, 32, 0.98);
    transition-duration: 0.1s;
  }

  .prompt-helper-panel {
    padding: var(--space-md);
    gap: var(--space-md);
  }

  .helper-field {
    flex-direction: column;
    align-items: flex-start;
  }

  .helper-dropdown {
    max-width: 100%;
    width: 100%;
  }

  .input-area {
    padding: var(--space-sm);
    position: sticky;
    bottom: 0;
    z-index: 20;
  }

  .input-container {
    width: 100%;
    max-width: none;
    padding: 6px 8px;
    border-radius: 20px;
    gap: 6px;
    flex-wrap: wrap;
  }

  .input-wrapper {
    flex: 1 1 auto;
    min-width: 0;
  }

  .add-prompt-btn {
    order: 1;
  }

  .prompt-dropdown {
    order: 2;
  }

  .input-wrapper {
    order: 3;
    flex: 1 1 100%;
  }

  .mic-btn {
    order: 4;
  }

  .generate-button {
    order: 5;
  }

  .loading-content {
    width: 92%;
    padding: var(--space-xl);
  }

  .loading-steps {
    gap: 6px;
  }

  .message-input {
    padding: 8px 8px;
    min-height: 44px;
    max-height: 120px;
    font-size: 16px;
  }

  .generate-button {
    width: auto;
  }

  .input-icon-btn {
    width: 36px;
    height: 36px;
  }

  .generate-button {
    min-height: 40px;
    min-width: 40px;
    padding: 0;
    border-radius: 50%;
    touch-action: manipulation;
  }

  .generate-button span {
    display: none;
  }

  .generate-button i {
    margin: 0;
  }

  .prompt-mode-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .prompt-dropdown-menu {
    left: 0;
    right: 0;
    min-width: 0;
    width: 100%;
    max-height: 45vh;
    overflow-y: auto;
  }

  .custom-dropdown {
    width: 100%;
    min-width: 0;
  }

  .custom-dropdown-menu {
    max-height: 45vh;
    overflow-y: auto;
  }

  .advanced-btn {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
  }

  .image-gallery {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--space-xs);
  }

  .new-session-btn {
    min-height: 44px;
    touch-action: manipulation;
    font-size: 0.9rem;
  }

  .session-item {
    touch-action: manipulation;
  }

  .action-btn {
    min-width: 40px;
    min-height: 40px;
    touch-action: manipulation;
  }

  .modal-content {
    width: 95%;
    margin: var(--space-sm);
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-body {
    padding: var(--space-md);
  }

  .instruction-step {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .loading-content {
    max-width: 90%;
    padding: var(--space-lg);
  }

  .loading-progress {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .header-actions .header-btn {
    display: none;
  }
  .mobile-actions {
    display: inline-flex;
  }
  .prompt-dropdown {
    display: none;
  }
  .generate-button {
    display: inline-flex;
    width: 52px;
    height: 52px;
    min-width: 52px;
    padding: 0;
    border-radius: 50%;
    gap: 0;
  }
  .generate-button span {
    display: none;
  }
  .messages-container {
    padding: 18px 16px 24px;
  }
  .message {
    gap: 10px;
    align-items: flex-end;
  }
  .message-avatar {
    width: 26px;
    height: 26px;
  }
  .message-content {
    max-width: 82%;
  }
  .message-header {
    display: none;
  }
  .message-text {
    border-radius: 18px;
    padding: 12px 14px;
  }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
  .header-title h1 {
    font-size: 1rem;
  }

  .welcome-title {
    font-size: 1.5rem;
  }

  .welcome-subtitle {
    font-size: 0.9rem;
  }

  .generate-button {
    font-size: 0.9rem;
    min-height: 44px;
  }
}

/* Landscape Orientation */
@media (max-height: 500px) and (orientation: landscape) {
  .sidebar-panel {
    width: 250px;
  }

  .main-header {
    padding: var(--space-xs) var(--space-md);
  }

  .input-area {
    padding: var(--space-xs) var(--space-md);
  }

  .welcome-title {
    font-size: 1.25rem;
  }

  .welcome-subtitle {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .header-content {
    justify-content: center;
    align-items: center;
  }
  .header-actions .header-btn {
    display: none;
  }
  .mobile-actions {
    display: inline-flex;
  }
  .header-brand {
    margin: 0 auto;
    justify-content: center;
  }
  .main-header {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .welcome-suggestions {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }
  .suggestion-card {
    border-radius: 9999px;
    padding: var(--space-sm) var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--bg-tertiary);
    box-shadow: none;
    transform: none;
    text-align: left;
  }
  .suggestion-card::before {
    display: none;
  }
  .suggestion-description {
    display: none;
  }
  .suggestion-icon {
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    margin: 0;
  }
  .suggestion-title {
    font-size: 0.95rem;
  }

  .input-area {
    position: sticky;
    bottom: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--space-sm) var(--space-md);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--space-sm));
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.12);
  }
  .input-container {
    background: rgba(6, 8, 14, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 6px 10px;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  }
  .prompt-dropdown {
    display: none;
  }
  .input-wrapper {
    background: transparent;
    border: none;
    flex: 1;
    min-height: 48px;
  }
  .message-input {
    padding: 10px 12px;
    min-height: 48px;
    font-size: clamp(15px, 3.5vw, 16px);
    line-height: 1.4;
  }
  .message-input::placeholder {
    font-size: 0.95rem;
    opacity: 0.8;
  }
  .character-counter {
    display: none;
  }

  .input-icon-btn:hover {
    background: rgba(0, 102, 255, 0.2);
    border-color: rgba(0, 102, 255, 0.4);
    box-shadow: 0 4px 10px rgba(0, 102, 255, 0.25);
    transform: translateY(-1px);
  }
  .add-prompt-btn,
  .mic-btn {
    width: 34px;
    height: 34px;
  }
  .mic-btn {
    display: inline-flex;
    font-size: 1rem;
  }

  .generate-button {
    display: inline-flex;
    width: 52px;
    height: 52px;
    min-width: 52px;
    padding: 0;
    border-radius: 50%;
    gap: 0;
  }
  .generate-button span {
    display: none;
  }
}

@media (max-width: 360px) {
  .welcome-suggestions {
    grid-template-columns: 1fr;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .suggestion-card:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .generate-button:hover {
    transform: none;
  }

  .session-item:hover {
    background: var(--bg-tertiary);
    transform: none;
  }

  /* Add active states for touch feedback */
  .suggestion-card:active {
    transform: scale(0.98);
    transition-duration: 0.1s;
  }

  .generate-button:active {
    transform: scale(0.98);
    transition-duration: 0.1s;
  }

  .session-item:active {
    background: var(--bg-hover);
    transform: scale(0.98);
    transition-duration: 0.1s;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --border-color: #666666;
    --text-secondary: #cccccc;
    --text-muted: #999999;
  }
}

/* Focus styles for keyboard navigation */

.message-input:focus,
.search-input:focus {
  outline: none;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: rgba(42, 114, 210, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(42, 114, 210, 0.6);
  border-radius: 4px;
  transition: all var(--transition-speed) ease;
}

::-webkit-scrollbar-thumb:hover {
  background: #2a72d2;
  box-shadow: 0 0 8px rgba(42, 114, 210, 0.4);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox scrollbar styling */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(42, 114, 210, 0.6) rgba(42, 114, 210, 0.1);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

@keyframes bounce {
  0%,
  20%,
  53%,
  80%,
  100% {
    transform: translateY(0);
  }
  40%,
  43% {
    transform: translateY(-8px);
  }
  70% {
    transform: translateY(-4px);
  }
  90% {
    transform: translateY(-2px);
  }
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(42, 114, 210, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(42, 114, 210, 0.6);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes buttonPulse {
  0%,
  100% {
    box-shadow:
      0 8px 28px rgba(0, 102, 255, 0.4),
      0 0 0 1px rgba(255, 255, 255, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  50% {
    box-shadow:
      0 12px 36px rgba(0, 102, 255, 0.6),
      0 0 0 2px rgba(255, 255, 255, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.3),
      0 0 18px rgba(0, 140, 255, 0.35);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* Page Transitions */
.page-transition {
  opacity: 1;
  transform: translateX(0);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition.fade-out {
  opacity: 0;
  transform: translateX(-20px);
}

.page-transition.fade-in {
  animation: fadeInScale 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.page-transition.slide-left {
  animation: slideInLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.page-transition.slide-right {
  animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.page-transition.slide-up {
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.page-transition.slide-down {
  animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Content Animation Classes */
.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-slide-in {
  animation: slideIn 0.5s ease-out forwards;
}

.animate-bounce {
  animation: bounce 0.8s ease-out;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Staggered Animation Delays */
.stagger-1 {
  animation-delay: 0.1s;
}
.stagger-2 {
  animation-delay: 0.2s;
}
.stagger-3 {
  animation-delay: 0.3s;
}
.stagger-4 {
  animation-delay: 0.4s;
}
.stagger-5 {
  animation-delay: 0.5s;
}
.stagger-6 {
  animation-delay: 0.6s;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

.smooth-scroll {
  scroll-behavior: smooth;
}

/* Interactive Element Transitions */
.interactive-element {
  transition: all var(--transition-normal);
  transform-origin: center;
}

.interactive-element:hover {
  transform: translateY(-2px);
}

.interactive-element:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.1s;
}

/* Focus Animations */
.focus-ring {
  position: relative;
  outline: none;
}

.focus-ring:focus::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border: 2px solid #2a72d2;
  border-radius: inherit;
  opacity: 0;
  animation: focusRing 0.3s ease-out forwards;
}

@keyframes focusRing {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Loading State Animations */
.loading-state {
  position: relative;
  overflow: hidden;
}

.loading-state::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(42, 114, 210, 0.1),
    transparent
  );
  animation: shimmerLoad 2s infinite;
}

@keyframes shimmerLoad {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) rotate(45deg);
  }
}

/* Accessibility Styles */
/* Screen Reader Only Content */
.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;
}

.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --border-color: #ffffff;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --bg-primary: #000000;
    --bg-secondary: #111111;
  }

  .generate-button,
  .suggestion-card,
  .session-item {
    border: 2px solid currentColor;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .loading-spinner {
    animation: none;
    border: 4px solid var(--border-color);
    border-top: 4px solid #2a72d2;
  }
}

/* Focus Management */
.focus-trap {
  position: relative;
}

.focus-visible {
  outline: 2px solid #2a72d2;
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Skip Links */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 8px;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 2px solid #2a72d2;
  z-index: 9999;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 6px;
}

/* ARIA Live Regions */
.live-region {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Tooltip Accessibility */
[role="tooltip"] {
  position: absolute;
  z-index: 1000;
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 0.875rem;
  max-width: 250px;
  word-wrap: break-word;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Error States */
.error-state {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.error-message::before {
  content: "⚠";
  font-size: 1rem;
}

/* Success States */
.success-state {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
}

.success-message {
  color: #10b981;
  font-size: 0.875rem;
  margin-top: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.success-message::before {
  content: "✓";
  font-size: 1rem;
}

/* Loading States for Screen Readers */
.loading-announcement {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Keyboard Navigation Helpers */
.keyboard-navigation {
  position: relative;
}

.keyboard-navigation:focus-within::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 2px solid #2a72d2;
  border-radius: inherit;
  pointer-events: none;
}

/* Color Blind Friendly Indicators */
.status-indicator.success::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  color: white;
  font-weight: bold;
}

.status-indicator.error::after {
  content: "✕";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 8px;
  color: white;
  font-weight: bold;
}

/* Print styles */
@media print {
  .sidebar-panel,
  .input-area,
  .mobile-toggle {
    display: none;
  }

  .main-content {
    width: 100%;
  }

  .content-container {
    grid-template-columns: 1fr;
  }
}

/* Filter Modal Styles */
.filter-modal {
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  background: #05070d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.filter-modal .modal-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #05070d;
  border-radius: 16px 16px 0 0;
}

.filter-modal .modal-header h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-modal .modal-header h3 i {
  color: rgba(0, 140, 255, 0.8);
  font-size: 1.1rem;
}

.filter-modal .modal-close {
  position: absolute;
  right: 20px;
  background: #05070d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-modal .modal-close:hover {
  background: rgba(8, 12, 20, 0.9);
  color: var(--white);
  transform: scale(1.03);
}

.filter-modal .modal-body {
  padding: 0;
  max-height: calc(85vh - 140px);
  overflow-y: auto;
}

.filter-sections {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.filter-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s ease;
}

.filter-section:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--accent-color);
}

.filter-header {
  margin-bottom: 16px;
}

.filter-header h4 {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-header h4 i {
  color: var(--accent-color);
  font-size: 0.9rem;
}

.filter-header p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
  opacity: 0.8;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.date-range-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.filter-option:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color);
}

.filter-option input[type="radio"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.filter-option input[type="radio"]:checked {
  border-color: var(--accent-color);
  background: var(--accent-color);
}

.filter-option input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.filter-checkbox:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color);
}

.filter-checkbox input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background: transparent;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.filter-checkbox input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--accent-color);
  border-color: var(--accent-color);
}

.filter-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.option-label {
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  user-select: none;
}

.custom-date-range {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  margin-top: 8px;
}

.date-inputs {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  margin-left: 28px;
}

.date-input {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all 0.2s ease;
  min-width: 140px;
}

.date-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.date-separator {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

.filter-modal .modal-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #05070d;
  border-radius: 0 0 16px 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.filter-modal .btn-secondary,
.filter-modal .btn-primary {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  min-width: 120px;
  justify-content: center;
}

.filter-modal .btn-secondary {
  background: #05070d;
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.filter-modal .btn-secondary:hover {
  background: rgba(8, 12, 20, 0.9);
  color: var(--white);
  border-color: rgba(0, 140, 255, 0.45);
  transform: translateY(-1px);
}

.filter-modal .btn-primary {
  background: #05070d;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 140, 255, 0.5);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}

.filter-modal .btn-primary:hover {
  background: rgba(8, 12, 20, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 102, 255, 0.35);
}

/* Filter Modal Responsive Design */
@media (max-width: 768px) {
  .filter-modal {
    width: 95%;
    max-height: 90vh;
    margin: 20px;
  }

  .filter-sections {
    padding: 16px;
    gap: 24px;
  }

  .filter-section {
    padding: 16px;
  }

  .date-range-options {
    grid-template-columns: 1fr 1fr;
  }

  .date-inputs {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .date-input {
    min-width: auto;
  }

  .filter-modal .modal-footer {
    flex-direction: column;
  }

  .filter-modal .btn-secondary,
  .filter-modal .btn-primary {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .filter-modal .modal-header {
    padding: 20px 20px 12px;
  }

  .filter-modal .modal-header h3 {
    font-size: 1.1rem;
  }

  .date-range-options {
    grid-template-columns: 1fr;
  }

  .filter-sections {
    padding: 12px;
    gap: 20px;
  }

  .filter-section {
    padding: 12px;
  }
}

/* Settings Modal now uses Filter Modal styles - removed old settings-modal styles */

/* Additional styles for settings-specific elements within filter modal */
.filter-modal .setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}

.filter-modal .setting-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-color);
}

.filter-modal .setting-item label {
  flex: 1;
  cursor: pointer;
  margin: 0;
}

.filter-modal .setting-item .option-label {
  display: block;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.875rem;
}

/* Settings Select Styles */
.filter-modal .settings-select {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  padding: 8px 12px;
  font-size: 0.875rem;
  min-width: 160px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-modal .settings-select:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-color);
}

.filter-modal .settings-select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-modal .settings-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 8px;
}

/* Range Input Styles */
.filter-modal .range-input {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}

.filter-modal .settings-range {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border-color);
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
}

.filter-modal .settings-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.filter-modal .settings-range::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

.filter-modal .settings-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.filter-modal .settings-range::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

.filter-modal .range-value {
  color: var(--accent-color);
  font-weight: 600;
  font-size: 0.875rem;
  min-width: 35px;
  text-align: center;
  background: rgba(99, 102, 241, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* User Profile Button Styles */
.user-profile-container {
  position: relative;
  margin-right: 1rem;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-width: 180px;
}

.user-profile-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.2;
}

.profile-arrow {
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: transform 0.3s ease;
}

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

/* User Profile Dropdown */
.user-profile-dropdown {
  position: absolute;
  top: calc(-900% + 8px);
  left: 0;
  width: 280px;
  background: var(--dropdown-bg);
  border: var(--dropdown-border);
  border-radius: var(--dropdown-radius);
  box-shadow: var(--dropdown-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-speed) ease;
  z-index: 1000;
  overflow: hidden;
}

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

.dropdown-header {
  padding: 20px;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-large {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
}

.user-details h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.user-details p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0 0 8px 0;
}

.user-badge {
  display: inline-block;
  padding: 2px 8px;
  background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dropdown-menu {
  padding: 8px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--dropdown-item-radius);
  transition: all var(--transition-speed) ease;
  font-size: 0.875rem;
  border: 1px solid transparent;
  margin: 5px 0;
}

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

.dropdown-item i {
  width: 16px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.dropdown-item:hover i {
  color: var(--text-primary);
}

.dropdown-item.logout {
  color: #ef4444;
}

.dropdown-item.logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.dropdown-item.logout i {
  color: #ef4444;
}

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

/* Responsive adjustments for settings elements */
@media (max-width: 768px) {
  .filter-modal .setting-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .filter-modal .setting-item label {
    width: 100%;
  }

  .filter-modal .settings-select,
  .filter-modal .range-input {
    align-self: stretch;
    width: 100%;
  }

  .filter-modal .range-input {
    min-width: auto;
  }

  .user-profile-btn {
    min-width: 150px;
    padding: 6px 12px;
  }

  .user-profile-dropdown {
    width: 260px;
  }

  .dropdown-header {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .filter-modal .setting-item {
    padding: 8px;
  }

  .user-profile-btn {
    min-width: 120px;
  }

  .user-info {
    display: none;
  }
}
