/* ============================================================================
   AI STUDIO - PROFESSIONAL ENHANCED UI
   Inspired by ChatGPT, Claude, and Gemini
   ============================================================================ */

/* ============================================================================
   CSS VARIABLES - Professional Design System
   ============================================================================ */

:root {
  /* Primary Colors */
  --primary-color: #2f719e;
  --primary-light: #4a8fc7;
  --primary-dark: #1e4d6b;
  --secondary-color: #88b740;
  --secondary-light: #a3d15f;
  --secondary-dark: #6a9230;

  /* Status Colors */
  --success-color: #10a37f;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #3b82f6;

  /* Neutral Colors */
  --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;

  /* Gradients */
  --gradient-primary: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  --gradient-success: linear-gradient(135deg, #10b981, #059669);
  --gradient-danger: linear-gradient(135deg, #ef4444, #dc2626);

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --font-mono: "Courier New", Courier, monospace;
}

/* ============================================================================
   BASE STYLES
   ============================================================================ */

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

.ai-content-studio {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #ffffff;
  font-family: var(--font-family);
  color: var(--gray-900);
  overflow: hidden;
}

/* ============================================================================
   HEADER - Enhanced Professional
   ============================================================================ */

.ai-studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 var(--spacing-lg);
  border-bottom: 1px solid var(--gray-200);
  background: #ffffff;
  z-index: 1000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.btn-toggle-sidebar {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--transition-base);
  font-size: 20px;
}

.btn-toggle-sidebar:hover {
  background: var(--gray-100);
  border-color: var(--gray-300);
  color: var(--gray-900);
}

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

.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  box-shadow: var(--shadow-sm);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.brand-tagline {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.btn-new-conversation {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 10px 20px;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.btn-new-conversation:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-new-conversation i {
  font-size: 16px;
}

/* ============================================================================
   BODY LAYOUT
   ============================================================================ */

.ai-studio-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ============================================================================
   SIDEBAR - Professional & Compact
   ============================================================================ */

.ai-sidebar {
  width: 320px;
  background: var(--gray-50);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
}

.ai-sidebar.sidebar-open {
  transform: translateX(0);
}

.sidebar-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.sidebar-section {
  padding: var(--spacing-md);
  flex-shrink: 0;
}

.sidebar-section:not(:last-child) {
  border-bottom: 1px solid var(--gray-200);
}

/* New Chat Button */
.btn-new-chat-primary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 12px 20px;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.btn-new-chat-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Search Section */
.search-section .search-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.search-section h6 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray-500);
  margin: 0;
}

.search-actions {
  display: flex;
  gap: var(--spacing-xs);
}

.btn-icon-sm {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--gray-500);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 14px;
}

.btn-icon-sm:hover {
  background: var(--gray-200);
  color: var(--gray-900);
}

.search-input-container {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  transition: all var(--transition-base);
}

.search-input-container:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(47, 113, 158, 0.1);
}

.search-icon {
  color: var(--gray-400);
  margin-right: var(--spacing-sm);
  font-size: 14px;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--gray-900);
  font-family: var(--font-family);
}

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

.btn-clear {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0;
  font-size: 16px;
  transition: color var(--transition-fast);
}

.btn-clear:hover {
  color: var(--gray-700);
}

/* Filter Tabs */
.filter-section {
  padding: var(--spacing-sm) var(--spacing-md);
}

.filter-tabs {
  display: flex;
  gap: var(--spacing-xs);
}

.filter-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
}

.filter-tab:hover {
  background: var(--gray-100);
  border-color: var(--gray-300);
}

.filter-tab.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-sm);
}

.filter-tab i {
  font-size: 14px;
}

/* Conversations Section */
.conversations-section {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-md);
}

.conversations-section::-webkit-scrollbar {
  width: 6px;
}

.conversations-section::-webkit-scrollbar-track {
  background: transparent;
}

.conversations-section::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 3px;
}

.conversation-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

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

.group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray-500);
  margin-bottom: var(--spacing-xs);
}

.conversation-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
}

.conversation-item:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}

.conversation-item.active {
  background: linear-gradient(
    135deg,
    rgba(47, 113, 158, 0.08),
    rgba(136, 183, 64, 0.08)
  );
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.conversation-icon {
  width: 36px;
  height: 36px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  font-size: 16px;
  flex-shrink: 0;
}

.conversation-item.active .conversation-icon {
  background: var(--gradient-primary);
  color: white;
}

.conversation-details {
  flex: 1;
  min-width: 0;
}

.conversation-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-preview {
  font-size: 12px;
  color: var(--gray-600);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.conversation-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--gray-500);
}

.conversation-meta .time {
  display: flex;
  align-items: center;
  gap: 4px;
}

.type-badge {
  padding: 2px 8px;
  background: var(--gray-200);
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--gray-700);
}

.conversation-item.active .type-badge {
  background: var(--primary-color);
  color: white;
}

.btn-conversation-menu {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--gray-400);
  cursor: pointer;
  opacity: 0;
  transition: all var(--transition-fast);
}

.conversation-item:hover .btn-conversation-menu {
  opacity: 1;
}

.btn-conversation-menu:hover {
  background: var(--gray-200);
  color: var(--gray-900);
}

/* Tools Section */
.tools-section .section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray-500);
  margin-bottom: var(--spacing-sm);
}

.tools-menu {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.tool-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: left;
  width: 100%;
}

.tool-item:hover {
  background: var(--gray-100);
  border-color: var(--gray-300);
  color: var(--gray-900);
}

.tool-item i {
  font-size: 16px;
}

/* Collapsed Sidebar */
.collapsed-sidebar-icons {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
}

.collapsed-icon {
  width: 48px;
  height: 48px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  font-size: 18px;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.collapsed-icon:hover {
  background: var(--gray-100);
  color: var(--gray-900);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

/* ============================================================================
   MAIN CONTENT
   ============================================================================ */

.ai-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fafbfc;
  transition: margin-left var(--transition-slow);
}

.ai-main-content.sidebar-expanded {
  margin-left: 320px;
}

/* ============================================================================
   WELCOME SCREEN - Enhanced & Compact
   ============================================================================ */

.welcome-container {
  flex: 1;
  overflow-y: auto;
  background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
}

.welcome-container::-webkit-scrollbar {
  width: 8px;
}

.welcome-container::-webkit-scrollbar-track {
  background: transparent;
}

.welcome-container::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}

.welcome-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-2xl) var(--spacing-lg);
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.hero-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--spacing-lg);
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: white;
  box-shadow: var(--shadow-lg);
  animation: float 3s ease-in-out infinite;
}

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

.hero-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--spacing-md);
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 15px;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Quick Stats - Compact Grid */
.quick-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.stat-card {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-lg);
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gray-300);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--gray-600);
  font-weight: 500;
}

/* ============================================================================
   MAIN INPUT SECTION - Professional
   ============================================================================ */

.main-input-section {
  margin-bottom: var(--spacing-xl);
}

.input-box-container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
}

.input-box-container:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(47, 113, 158, 0.1), var(--shadow-xl);
}

/* Voice Recording Area */
.voice-recording-area {
  padding: var(--spacing-lg);
  background: linear-gradient(
    135deg,
    rgba(47, 113, 158, 0.05),
    rgba(136, 183, 64, 0.05)
  );
  border-bottom: 1px solid var(--gray-200);
  animation: slideDown 0.3s ease;
}

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

.voice-canvas {
  width: 100%;
  height: 60px;
  border-radius: var(--radius-md);
  background: white;
  border: 1px solid var(--gray-200);
  margin-bottom: var(--spacing-md);
}

.voice-controls {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
}

.voice-control-btn {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.voice-control-btn.accept {
  background: var(--success-color);
}

.voice-control-btn.accept:hover {
  background: #0d8f6d;
  transform: scale(1.1);
}

.voice-control-btn.cancel {
  background: var(--danger-color);
}

.voice-control-btn.cancel:hover {
  background: #dc2626;
  transform: scale(1.1);
}

/* Main Input Field */
.main-input-field {
  width: 100%;
  border-radius: 18px;
  min-height: 80px;
  max-height: 200px;
  padding: var(--spacing-lg) var(--spacing-xl);
  border: none;
  outline: none;
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-900);
  resize: none;
  overflow-y: auto;
}

.main-input-field::placeholder {
  color: var(--gray-400);
}

/* Input Controls Bar */
.input-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
  border-radius: 0 0 18px 18px;
}

.controls-left-group,
.controls-right-group {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.control-btn {
  justify-content: center;
  height: 38px;
  padding: 0 var(--spacing-md);
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
  transition: all var(--transition-base);
}

.control-btn:hover:not(:disabled) {
  background: var(--gray-100);
  border-color: var(--gray-300);
  color: var(--gray-900);
}

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

.control-btn i {
  font-size: 16px;
}

/* Mode Toggle Group */
.mode-toggle-group {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
}

.mode-radio {
  display: none;
}

.mode-label {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--transition-base);
  font-size: 16px;
}

.mode-label:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.mode-radio:checked + .mode-label {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* Create Dropdown */
.create-dropdown-wrapper {
  position: relative;
  z-index: 1000;
}

.create-btn {
  gap: 6px;
}

.create-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 99999;
  overflow: hidden;
  animation: dropdownSlide 0.2s ease;
}

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

.dropdown-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px var(--spacing-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 500;
}

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

.dropdown-menu-item:hover {
  background: var(--gray-50);
  color: var(--gray-900);
}

.dropdown-menu-item i {
  font-size: 16px;
  color: var(--gray-600);
}

/* Character Counter */
.char-counter {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
  padding: 0 var(--spacing-sm);
}

.char-counter .text-warning {
  color: var(--warning-color);
}

.max-chars {
  color: var(--gray-400);
}

/* Voice Button */
.voice-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-full);
}

.voice-btn.recording {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger-color);
  color: var(--danger-color);
  animation: pulse-recording 2s infinite;
}

@keyframes pulse-recording {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
}

/* Send Button */
.btn-send-message {
  height: 38px;
  padding: 0 var(--spacing-lg);
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.btn-send-message:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-send-message:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================================
   CONTENT SECTIONS - Compact & Professional
   ============================================================================ */

.section-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--spacing-md);
}

.section-heading {
  font-size: 16px; /* Reduced from 18px */
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px; /* Reduced from var(--spacing-md) */
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px; /* Reduced from var(--spacing-md) */
}

.btn-refresh-suggestions,
.btn-view-all {
  padding: 6px 12px; /* Reduced from 8px 16px */
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  font-size: 12px; /* Reduced from 13px */
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-refresh-suggestions:hover,
.btn-view-all:hover {
  background: var(--gray-100);
  border-color: var(--gray-300);
  color: var(--gray-900);
}

/* Content Types Grid */
.content-types-section,
.quick-starts-section,
.content-categories-section,
.use-cases-section {
  margin-bottom: var(--spacing-lg);
}

.content-types-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(125px, 1fr)
  ); /* Reduced from 140px */
  gap: 10px; /* Reduced from var(--spacing-md) */
}

.content-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px; /* Reduced from var(--spacing-sm) */
  padding: 12px; /* Reduced from var(--spacing-lg) */
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.content-type-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px); /* Reduced from -4px */
  box-shadow: var(--shadow-md); /* Reduced from var(--shadow-lg) */
}

.content-type-card i {
  font-size: 24px; /* Reduced from 28px */
  color: var(--gray-600);
}

.content-type-card:hover i {
  color: var(--primary-color);
}

.content-type-card span {
  font-size: 13px; /* Reduced from 14px */
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.2;
}

/* Quick Starts */

.quick-starts-grid {
  display: flex;
  gap: 10px; /* Reduced from var(--spacing-md) */
  flex-wrap: wrap;
}

.quick-start-card {
  display: flex;
  align-items: center;
  gap: 6px; /* Reduced from var(--spacing-sm) */
  padding: 8px 14px; /* Reduced from 12px var(--spacing-lg) */
  background: linear-gradient(
    135deg,
    rgba(47, 113, 158, 0.08),
    rgba(136, 183, 64, 0.08)
  );
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 13px; /* Reduced from 14px */
  font-weight: 600;
  color: var(--gray-800);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.quick-start-card:hover {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  transform: translateY(-1px); /* Reduced from -2px */
  box-shadow: var(--shadow-md); /* Reduced from var(--shadow-lg) */
}

.quick-start-card i {
  font-size: 16px; /* Reduced from 18px */
}

/* Content Categories */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(240px, 1fr)
  ); /* Reduced from 280px */
  gap: 12px; /* Reduced from var(--spacing-lg) */
}

.category-card {
  display: flex;
  gap: 12px; /* Reduced from var(--spacing-md) */
  padding: 14px; /* Reduced from var(--spacing-lg) */
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.category-card:hover {
  border-color: transparent;
  transform: translateY(-2px); /* Reduced from -4px */
  box-shadow: var(--shadow-md); /* Reduced from var(--shadow-lg) */
}

.category-icon {
  width: 48px; /* Reduced from 56px */
  height: 48px; /* Reduced from 56px */
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px; /* Reduced from 26px */
  flex-shrink: 0;
}

.category-info {
  flex: 1;
}

.category-title {
  font-size: 15px; /* Reduced from 16px */
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px; /* Reduced from 6px */
}

.category-description {
  font-size: 12px; /* Reduced from 13px */
  color: var(--gray-600);
  margin-bottom: 6px; /* Reduced from var(--spacing-sm) */
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-meta-info {
  display: flex;
  align-items: center;
  gap: 4px; /* Reduced from 6px */
  font-size: 11px; /* Reduced from 12px */
  color: var(--gray-500);
  font-weight: 500;
}

.category-meta-info i {
  font-size: 12px; /* Reduced from 14px */
}

/* Use Cases */
.use-case-tabs {
  display: flex;
  gap: 6px; /* Reduced from var(--spacing-sm) */
  margin-bottom: 12px; /* Reduced from var(--spacing-lg) */
  flex-wrap: wrap;
}

.use-case-tab {
  padding: 8px 16px; /* Reduced from 10px var(--spacing-lg) */
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 13px; /* Reduced from 14px */
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  transition: all var(--transition-base);
}

.use-case-tab:hover {
  background: var(--gray-100);
  border-color: var(--gray-300);
}

.use-case-tab.active {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(180px, 1fr)
  ); /* Reduced from 220px */
  gap: 10px; /* Reduced from var(--spacing-md) */
  margin-bottom: 12px; /* Reduced from var(--spacing-lg) */
}

.use-case-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.use-case-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px); /* Reduced from -4px */
  box-shadow: var(--shadow-md); /* Reduced from var(--shadow-lg) */
}

.use-case-thumbnail {
  height: 110px; /* Reduced from 140px */
  background: linear-gradient(
    135deg,
    rgba(47, 113, 158, 0.1),
    rgba(136, 183, 64, 0.1)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 28px; /* Reduced from 36px */
}

.use-case-content {
  padding: 12px; /* Reduced from var(--spacing-md) */
}

.use-case-content h6 {
  font-size: 13px; /* Reduced from 14px */
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.use-case-content small {
  font-size: 11px; /* Reduced from 12px */
  color: var(--gray-500);
}

.explore-more-section {
  text-align: center;
  padding-top: 12px; /* Reduced from var(--spacing-lg) */
}

.btn-explore-more {
  padding: 10px 24px; /* Reduced from 14px var(--spacing-xl) */
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-md); /* Changed from var(--radius-lg) */
  color: white;
  font-size: 14px; /* Reduced from 15px */
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm); /* Reduced from var(--shadow-md) */
  display: inline-flex;
  align-items: center;
  gap: 6px; /* Reduced from var(--spacing-sm) */
}

.btn-explore-more:hover {
  transform: translateY(-1px); /* Reduced from -2px */
  box-shadow: var(--shadow-lg); /* Reduced from var(--shadow-xl) */
}

/* ============================================================================
   CHAT INTERFACE - Professional Design
   ============================================================================ */

.chat-interface {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: white;
}

.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-xl) var(--spacing-lg);
  background: #fafbfc;
}

.chat-messages-container::-webkit-scrollbar {
  width: 8px;
}

.chat-messages-container::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages-container::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}

.message-wrapper {
  max-width: 900px;
  margin: 0 auto var(--spacing-xl);
  animation: messageSlideIn 0.3s ease;
}

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

.message-bubble {
  display: flex;
  gap: var(--spacing-md);
  align-items: flex-start;
}

.message-bubble.user {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.message-bubble.user .message-avatar {
  background: var(--gradient-primary);
  color: white;
}

.message-bubble.ai .message-avatar {
  background: white;
  border: 2px solid var(--gray-200);
  color: var(--gray-700);
}

.message-content-wrapper {
  flex: 1;
  min-width: 0;
}

/* User Message */
.user-message {
  background: var(--gradient-primary);
  color: white;
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.user-message .message-text {
  font-size: 15px;
  line-height: 1.6;
}

/* AI Message */
.ai-message {
  background: white;
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.message-text {
  font-size: 15px;
  line-height: 1.7;
  /* color: var(--gray-900); */
  margin-bottom: var(--spacing-sm);
}

.message-text:last-child {
  margin-bottom: 0;
}

.message-text strong {
  font-weight: 600;
}

.message-text code {
  padding: 2px 6px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 14px;
}

/* Pre-Thinking Indicator */
.pre-thinking-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  background: linear-gradient(
    135deg,
    rgba(47, 113, 158, 0.05),
    rgba(136, 183, 64, 0.05)
  );
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-md);
}

.thinking-animation {
  display: flex;
  gap: 8px;
}

.thinking-dot {
  width: 10px;
  height: 10px;
  background: var(--primary-color);
  border-radius: var(--radius-full);
  animation: thinking-pulse 1.4s infinite ease-in-out;
}

.thinking-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.thinking-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes thinking-pulse {
  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.thinking-text {
  font-size: 14px;
  color: var(--gray-600);
  font-weight: 500;
  margin: 0;
}

/* Thinking Process Container */
.thinking-process-container {
  background: linear-gradient(
    135deg,
    rgba(47, 113, 158, 0.05),
    rgba(136, 183, 64, 0.05)
  );
  border: 2px solid var(--primary-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--spacing-md);
  box-shadow: var(--shadow-sm);
}

.thinking-process-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  background: white;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-200);
  transition: background var(--transition-fast);
}

.thinking-process-header:hover {
  background: var(--gray-50);
}

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

.thinking-header-content i {
  font-size: 18px;
  color: var(--primary-color);
}

.thinking-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
}

.thinking-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.thinking-status-badge.active {
  background: var(--primary-color);
  color: white;
}

.thinking-status-badge.completed {
  background: var(--success-color);
  color: white;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: white;
  border-radius: var(--radius-full);
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.btn-collapse-thinking {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-collapse-thinking:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.thinking-steps-container {
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.thinking-step {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: white;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-xs);
}

.thinking-step.active {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(47, 113, 158, 0.1), var(--shadow-sm);
  transform: scale(1.02);
}

.thinking-step.completed {
  opacity: 0.8;
}

.step-indicator {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 14px;
  color: var(--gray-700);
  transition: all var(--transition-base);
}

.thinking-step.active .step-indicator {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 0 0 4px rgba(47, 113, 158, 0.2);
}

.thinking-step.completed .step-indicator {
  background: var(--success-color);
  color: white;
}

.step-check {
  font-size: 16px;
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.step-description {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.5;
}

.step-loading {
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--primary-color);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

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

/* Streaming Cursor */
.streaming-cursor {
  display: inline-block;
  margin-left: 4px;
}

.cursor-blink {
  animation: blink 1s infinite;
  color: var(--primary-color);
  font-weight: bold;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

/* Generated Documents */
.generated-documents-section {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--gray-200);
  animation: fadeSlide 0.3s ease;
}

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

.documents-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--spacing-md);
}

.documents-header i {
  font-size: 18px;
  color: var(--primary-color);
}

.documents-grid {
  display: grid;
  gap: 12px;
}

.document-card {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.document-card:hover {
  background: white;
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.document-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.document-info {
  flex: 1;
  min-width: 0;
}

.document-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.document-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 12px;
  color: var(--gray-600);
}

.file-type-badge {
  padding: 2px 8px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.document-actions {
  display: flex;
  gap: 6px;
}

.btn-doc-action {
  width: 32px;
  height: 32px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--transition-base);
  font-size: 14px;
}

.btn-doc-action:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Message Actions Bar */
.message-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-sm);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.message-bubble.user .message-actions-bar {
  border-top-color: rgba(255, 255, 255, 0.2);
}

.message-timestamp {
  font-size: 12px;
  color: var(--gray-500);
}

.message-bubble.user .message-timestamp {
  color: rgba(255, 255, 255, 0.8);
}

.message-action-buttons {
  display: flex;
  gap: var(--spacing-xs);
}

.action-btn {
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--gray-500);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.message-bubble.user .action-btn {
  color: rgba(255, 255, 255, 0.8);
}

.message-bubble.user .action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 6px;
  padding: var(--spacing-sm) 0;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--gray-400);
  animation: typing-pulse 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

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

@keyframes typing-pulse {
  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================================================================
   CHAT INPUT SECTION
   ============================================================================ */

.chat-input-section {
  padding: var(--spacing-lg);
  border-top: 1px solid var(--gray-200);
  background: white;
}

.chat-input-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
}

.chat-input-container:focus-within {
  background: white;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(47, 113, 158, 0.1);
}

.chat-input-field {
  flex: 1;
  min-height: 24px;
  max-height: 150px;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-900);
  resize: none;
  overflow-y: auto;
}

.chat-input-field::placeholder {
  color: var(--gray-400);
}

.chat-input-field:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.chat-input-actions {
  display: flex;
  gap: var(--spacing-sm);
}

.chat-action-btn {
  width: 38px;
  height: 38px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--transition-base);
  font-size: 16px;
}

.chat-action-btn:hover:not(:disabled) {
  background: var(--gray-100);
  color: var(--gray-900);
}

.chat-action-btn.recording {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger-color);
  color: var(--danger-color);
  animation: pulse-recording 2s infinite;
}

.btn-send-chat-message {
  width: 38px;
  height: 38px;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  font-size: 16px;
}

.btn-send-chat-message:hover:not(:disabled) {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

.btn-send-chat-message:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.spin-animation {
  animation: spin 1s linear infinite;
}

/* ============================================================================
   PREVIEW PANEL
   ============================================================================ */

.preview-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 450px;
  height: 100%;
  background: white;
  border-left: 1px solid var(--gray-200);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  z-index: 1020;
}

.preview-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg) var(--spacing-xl);
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.preview-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
}

.preview-title i {
  font-size: 20px;
  color: var(--primary-color);
}

.btn-close-preview {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-close-preview:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.preview-toolbar {
  padding: var(--spacing-lg) var(--spacing-xl);
  border-bottom: 1px solid var(--gray-200);
}

.preview-file-details .file-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
}

.file-meta-info {
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: var(--spacing-md);
}

.preview-actions {
  display: flex;
  gap: var(--spacing-sm);
}

.btn-preview-action {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 10px var(--spacing-lg);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-preview-action:hover {
  background: var(--gray-200);
  color: var(--gray-900);
}

.preview-content-area {
  flex: 1;
  overflow: hidden;
  background: var(--gray-50);
}

.preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--gray-400);
}

.preview-placeholder i {
  font-size: 56px;
  margin-bottom: var(--spacing-md);
}

.preview-placeholder p {
  font-size: 14px;
  color: var(--gray-500);
}

/* ============================================================================
   TRANSITIONS & ANIMATIONS
   ============================================================================ */

.fade-enter-active,
.fade-leave-active {
  transition: opacity var(--transition-base);
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

.fade-slide-enter-active,
.fade-slide-leave-active {
  transition: all var(--transition-base);
}

.fade-slide-enter-from,
.fade-slide-leave-to {
  opacity: 0;
  transform: translateY(-10px);
}

.slide-fade-enter-active,
.slide-fade-leave-active {
  transition: all var(--transition-base);
}

.slide-fade-enter-from,
.slide-fade-leave-to {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
}

.slide-down-enter-active,
.slide-down-leave-active {
  transition: all var(--transition-base);
}

.slide-down-enter-from,
.slide-down-leave-to {
  opacity: 0;
  transform: translateY(-10px);
  max-height: 0;
  overflow: hidden;
}

.expand-enter-active,
.expand-leave-active {
  transition: all var(--transition-base);
  overflow: hidden;
}

.expand-enter-from,
.expand-leave-to {
  opacity: 0;
  max-height: 0;
}

.dropdown-fade-enter-active,
.dropdown-fade-leave-active {
  transition: all var(--transition-fast);
}

.dropdown-fade-enter-from,
.dropdown-fade-leave-to {
  opacity: 0;
  transform: translateY(-8px);
}

.slide-left-enter-active,
.slide-left-leave-active {
  transition: transform var(--transition-slow);
}

.slide-left-enter-from,
.slide-left-leave-to {
  transform: translateX(100%);
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 1024px) {
  .ai-sidebar {
    width: 280px;
  }

  .ai-main-content.sidebar-expanded {
    margin-left: 280px;
  }

  .preview-panel {
    width: 380px;
  }
}

@media (max-width: 768px) {
  .ai-sidebar {
    width: 100%;
    max-height: 60vh;
  }

  .ai-main-content.sidebar-expanded {
    margin-left: 0;
  }

  .preview-panel {
    width: 100%;
    height: 70vh;
    top: auto;
    bottom: 0;
  }

  .welcome-content {
    padding: var(--spacing-lg);
  }

  .hero-title {
    font-size: 24px;
  }

  .quick-stats-grid {
    grid-template-columns: 1fr;
  }

  .content-types-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .categories-grid,
  .use-cases-grid {
    grid-template-columns: 1fr;
  }

  .message-wrapper {
    padding: 0 var(--spacing-sm);
  }
}

@media (max-width: 480px) {
  .ai-studio-header {
    padding: 0 var(--spacing-md);
  }

  .brand-tagline {
    display: none;
  }

  .welcome-content {
    padding: var(--spacing-md);
  }

  .hero-title {
    font-size: 24px;
  }

  .chat-messages-container {
    padding: var(--spacing-lg) var(--spacing-md);
  }

  .chat-input-section {
    padding: var(--spacing-md);
  }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.no-focus:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* ============================================================================
   TIPPY.JS TOOLTIP CUSTOMIZATION
   ============================================================================ */

.tippy-box[data-theme~="light"] {
  background-color: var(--gray-900);
  color: white;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  box-shadow: var(--shadow-lg);
}

.tippy-box[data-theme~="light"][data-placement^="top"] > .tippy-arrow::before {
  border-top-color: var(--gray-900);
}

.tippy-box[data-theme~="light"][data-placement^="bottom"]
  > .tippy-arrow::before {
  border-bottom-color: var(--gray-900);
}

.tippy-box[data-theme~="light"][data-placement^="left"] > .tippy-arrow::before {
  border-left-color: var(--gray-900);
}

.tippy-box[data-theme~="light"][data-placement^="right"]
  > .tippy-arrow::before {
  border-right-color: var(--gray-900);
}

/* ============================================================================
   END OF STYLES
   ============================================================================ */
