/* Athena - Ultra Minimal Greek-Inspired Chat Experience */

/* ===== DESIGN TOKENS ===== */
:root {
  /* Colors */
  --athena-black: #06070B;
  --athena-gold: #C48D26;
  --athena-cream: #F6F3EC;
  --athena-white: #FFFFFF;

  /* Surface Colors */
  --surface-primary: var(--athena-white);
  --surface-secondary: var(--athena-cream);
  --text-primary: var(--athena-black);
  --text-secondary: #4A5568;
  --text-muted: #9CA3AF;
  --accent: var(--athena-gold);

  /* Typography */
  --font-display: 'Crimson Text', serif;
  --font-body: 'Inter', sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Borders */
  --radius-sm: 0.125rem;
  --radius: 0.25rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;

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

  /* Layout */
  --header-height: 120px;
  --input-height: 100px;
  --max-content-width: 800px;
}
 /* Dark Mode Colors */
  [data-theme="dark"] {
    --athena-black: #F6F3EC;
    --athena-white: #0A0B0F;
    --athena-cream: #1A1B1F;
    
    --surface-primary: #0A0B0F;
    --surface-secondary: #1A1B1F;
    --text-primary: #F6F3EC;
    --text-secondary: #B8BCC8;
    --text-muted: #6B7280;
    --accent: #D4A03A;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
  }
/* ===== RESET & BASE ===== */
* {
  margin: 0;
  /* padding: 0; */
  box-sizing: border-box;
}

html {
  font-size: 16px;
  height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--surface-primary);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== APP CONTAINER ===== */
.athena-app {
  height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ===== HEADER ===== */
.athena-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-6);
  background: var(--surface-primary);
  border-bottom: 1px solid rgba(196, 141, 38, 0.2);
  position: relative;
  z-index: 10;
}

.athena-logo-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.athena-logo {
  height: 100px;
  width: auto;
  object-fit: contain;
  opacity: 0.95;
  transition: all 0.3s ease;
}

.athena-logo:hover {
  opacity: 1;
  transform: scale(1.02);
}

.connection-dot {
  position: absolute;
  right: var(--space-6);
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: var(--radius-full);
  animation: pulse 2s infinite;
}

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

/* ===== WELCOME STATE ===== */
.welcome-state {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-8) var(--space-8);
  background: linear-gradient(135deg, var(--surface-primary) 0%, var(--surface-secondary) 100%);
  padding: 160px 0;
  overflow-y: scroll;
}

::-webkit-scrollbar {
  overflow: scroll;
}

.welcome-container {
  width: 100%;
  max-width: var(--max-content-width);
  text-align: center;
}

.athena-identity {
  margin-bottom: var(--space-12);
}

.athena-face-large {
  width: 140px;
  height: 140px;
  margin: 0 auto var(--space-8);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--surface-primary) 0%, var(--surface-secondary) 100%);
  border-radius: var(--radius-full);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 2px solid var(--accent);
  position: relative;
  overflow: hidden;
}

.athena-face-large::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--accent), transparent, var(--accent));
  border-radius: var(--radius-full);
  opacity: 0.3;
  z-index: -1;
}

.face-large {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.greeting {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 600;
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: var(--space-6);
  line-height: 1.2;
  text-align: center;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.greeting::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: var(--radius-full);
}

.description {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto var(--space-12);
  font-weight: 400;
  font-style: italic;
  text-align: center;
  letter-spacing: 0.02em;
  position: relative;
}

.description::before {
  content: '"';
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  color: var(--accent);
  opacity: 0.2;
  position: absolute;
  top: -24px;
  left: -20px;
  line-height: 1;
}

.description::after {
  content: '"';
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  color: var(--accent);
  opacity: 0.2;
  position: absolute;
  bottom: -36px;
  right: -20px;
  line-height: 1;
}

/* ===== WISDOM GRID ===== */
.wisdom-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-12);
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.wisdom-card {
  background: linear-gradient(180deg, var(--surface-primary) 0%, var(--surface-secondary) 100%);
  border: 2px solid rgba(196, 141, 38, 0.2);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-sm) var(--radius-sm);
  padding: var(--space-8) var(--space-4);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  position: relative;
  overflow: visible;
  /* Greek pillar styling */
  border-top: 4px solid var(--accent);
  border-bottom: 6px solid var(--accent);
  /* Remove default button styling */
  background-color: transparent;
  font: inherit;
  color: inherit;
}

.wisdom-card:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

.wisdom-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

.wisdom-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -3px;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent) 0%, #B8860B 100%);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s ease;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 10px rgba(196, 141, 38, 0.4);
}

.wisdom-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: -3px;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent) 0%, #B8860B 100%);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s ease 0.1s;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 10px rgba(196, 141, 38, 0.4);
}

.wisdom-card:hover {
  background: linear-gradient(180deg, var(--surface-secondary) 0%, var(--surface-primary) 100%);
  border-color: var(--accent);
  box-shadow: 0 12px 35px rgba(196, 141, 38, 0.15);
  transform: translateY(-2px);
}

.wisdom-card:hover::before {
  transform: scaleY(1);
}

.wisdom-card:hover::after {
  transform: scaleY(1);
}

.wisdom-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, #B8860B 100%);
  border-radius: var(--radius-full);
  padding: var(--space-3);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(196, 141, 38, 0.2);
}

.wisdom-icon svg {
  width: 24px;
  height: 24px;
  color: var(--surface-primary);
  stroke-width: 2;
}

.wisdom-card:hover .wisdom-icon {
  transform: scale(1.1);
  background: linear-gradient(135deg, #B8860B 0%, var(--accent) 100%);
  box-shadow: 0 8px 20px rgba(196, 141, 38, 0.3);
}

.wisdom-text {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== CHAT STATE ===== */
.chat-state {
  flex: 1;
  display: none;
  overflow: hidden;
  background: var(--surface-primary);
}

.chat-state.active {
  display: flex;
}

.messages-area {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6);
  padding-bottom: calc(var(--input-height) + var(--space-6));
  display: flex;
  flex-direction: column;
  align-items: center;
}

.messages-area::-webkit-scrollbar {
  width: 4px;
}

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

.messages-area::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-full);
}

/* ===== MESSAGES ===== */
.message {
  width: 100%;
  max-width: var(--max-content-width);
  margin-bottom: var(--space-8);
  animation: slideUp 0.4s ease-out;
}

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

.user-message {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.athena-message {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}

.message-content {
  max-width: 80%;
  min-width: 200px;
}

.user-message .message-content {
  background: var(--surface-secondary);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: var(--space-5);
  border-radius: var(--radius-2xl) var(--radius-2xl) var(--radius-sm) var(--radius-2xl);
  box-shadow: var(--shadow-sm);
}

.athena-message .message-content {
  background: var(--surface-primary);
  border: 1px solid var(--accent);
  padding: var(--space-5);
  border-radius: var(--radius-2xl) var(--radius-2xl) var(--radius-2xl) var(--radius-sm);
  box-shadow: var(--shadow);
  /* position: relative; */
}

.athena-message .message-content::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 2px;
  background: var(--accent);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.message-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.message-sender {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
}

.athena-leaf-mini {
  width: 16px;
  height: 16px;
}

.leaf-mini {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.message-time {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.message-text {
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
}

.message-text strong {
  color: var(--accent);
  font-weight: 600;
}

.message-text em {
  color: var(--text-secondary);
  font-style: italic;
}

/* ===== LATENCY INDICATOR ===== */
.latency-indicator {
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--surface-secondary);
  padding: 2px 6px;
  border-radius: var(--radius);
  margin-left: var(--space-2);
}

/* ===== DATA PREVIEW ===== */
.data-preview {
  margin-top: var(--space-4);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-secondary);
}

.data-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-primary);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.data-preview-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.data-preview-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.data-preview-table-container {
  max-height: 300px;
  overflow-y: auto;
}

.data-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.data-preview-table th {
  background: var(--surface-primary);
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-preview-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--text-secondary);
}

.data-preview-table tbody tr:hover {
  background: rgba(196, 141, 38, 0.05);
}

/* ===== CLARIFICATION SECTION ===== */
.clarification-section {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: linear-gradient(135deg, var(--surface-secondary) 0%, var(--surface-primary) 100%);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  position: relative;
}

.clarification-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.clarification-question {
  margin-bottom: var(--space-4);
  font-size: var(--text-base);
  color: var(--text-primary);
  line-height: 1.5;
}

.clarification-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.clarification-option {
  background: var(--surface-primary);
  border: 1px solid var(--accent);
  color: var(--text-primary);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.clarification-option:hover {
  background: var(--accent);
  color: var(--surface-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.clarification-option:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* ===== MESSAGE AVATARS ===== */
.message-avatar {
  flex-shrink: 0;
  margin-right: var(--space-3);
  margin-top: var(--space-1);
}

.user-message .message-avatar {
  order: 2;
  margin-right: 0;
  margin-left: var(--space-3);
}

.user-avatar, .athena-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar {
  background: var(--surface-secondary);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.user-icon {
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: var(--radius-full);
}

.athena-avatar {
  background: var(--surface-primary);
  border: 1px solid var(--accent);
  padding: var(--space-1);
}

.athena-face-small {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: var(--radius-full);
}

/* ===== INPUT ZONE ===== */
.input-zone {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(196, 141, 38, 0.2);
  padding: var(--space-4) var(--space-6) var(--space-6);
  z-index: 20;
  min-height: var(--input-height);
}

.input-container {
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--surface-primary);
  border: 2px solid rgba(196, 141, 38, 0.2);
  border-radius: var(--radius-2xl);
  padding: var(--space-4);
  transition: all 0.2s ease;
  min-height: 60px;
}

.input-container:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 141, 38, 0.1);
}

.message-input {
  flex: 1;
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  resize: none;
  min-height: 24px;
  max-height: 100px;
  line-height: 1.5;
  outline: none;
}

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

/* Microphone button styling */
.mic-button {
  width: 44px;
  height: 44px;
  background: var(--surface-secondary);
  border: 2px solid var(--accent);
  border-radius: var(--radius-full);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
  flex-shrink: 0;
  position: relative;
}

.mic-button:hover:not(.recording) {
  background: var(--accent);
  color: var(--surface-primary);
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.mic-button .mic-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.mic-button .mic-recording-icon {
  width: 20px;
  height: 20px;
  display: none;
}

/* Recording state */
.mic-button.recording {
  background: #ef4444;
  border-color: #dc2626;
  color: var(--surface-primary);
  animation: pulse-mic 1.5s ease-in-out infinite;
}

.mic-button.recording .mic-icon {
  display: none;
}

.mic-button.recording .mic-recording-icon {
  display: block;
  animation: pulse-scale 1.5s ease-in-out infinite;
}

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

@keyframes pulse-scale {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}



.send-button {
  width: 44px;
  height: 44px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-full);
  color: var(--athena-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.send-button:hover:not(:disabled) {
  background: #A67920;
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.send-button:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: scale(0.95);
  opacity: 0.6;
}

.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-3);
  max-width: var(--max-content-width);
  margin-left: auto;
  margin-right: auto;
}

.char-count {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.powered-by {
  font-size: var(--text-xs);
  color: var(--accent);
  font-weight: 500;
}

.config-button {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-left: var(--space-2);
}

.config-button:hover {
  background: var(--accent);
  color: var(--surface-primary);
}

/* ===== CONFIGURATION PANEL ===== */
.config-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.config-panel.show {
  opacity: 1;
  visibility: visible;
}

.config-content {
  background: var(--surface-primary);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow-xl);
}

.config-content h3 {
  margin: 0 0 var(--space-4) 0;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.config-field {
  margin-bottom: var(--space-4);
}

.config-field label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.config-field input {
  width: 100%;
  padding: var(--space-3);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-family: var(--font-body);
  background: var(--surface-primary);
  color: var(--text-primary);
}

.config-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 141, 38, 0.1);
}

.config-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
  margin-bottom: var(--space-4);
}

.config-save, .config-cancel, .config-test {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid;
}

.config-save {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface-primary);
}

.config-save:hover {
  background: #A67920;
  border-color: #A67920;
}

.config-cancel {
  background: transparent;
  border-color: var(--text-muted);
  color: var(--text-muted);
}

.config-cancel:hover {
  background: var(--text-muted);
  color: var(--surface-primary);
}

.config-test {
  background: #10B981;
  border-color: #10B981;
  color: var(--surface-primary);
}

.config-test:hover {
  background: #059669;
  border-color: #059669;
}

.config-status {
  margin-top: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius);
  font-size: var(--text-sm);
}

.config-testing {
  color: var(--text-secondary);
  font-style: italic;
}

.config-success {
  color: #059669;
  font-weight: 500;
}

.config-error {
  color: #DC2626;
  font-weight: 500;
}


.message-text h1, 
.message-text h2, 
.message-text h3 {
  margin: 0.5em 0;
  font-size: 1.2em;
  font-weight: 600;
  color: var(--color-primary-dark);
}

.message-text ul {
  margin: 0.5em 0 0.5em 1.5em;
  list-style: disc;
}

.message-text strong {
  font-weight: 600;
  color: var(--color-primary-dark);
}

.message-text table {
  border-collapse: collapse;
  margin: 0.5em 0;
  width: 100%;
  font-size: 0.9em;
}

.message-text th,
.message-text td {
  border: 1px solid #ddd;
  /* padding: 6px 10px; */
  text-align: left;
}

.message-text th {
  background-color: var(--color-primary-lighter, #f5f5f5);
  font-weight: 600;
}

.message-text tr:nth-child(even) {
  background-color: #fafafa;
}


/* ===== LOADING OVERLAY ===== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.athena-thinking {
  text-align: center;
}

.athena-leaf-pulse {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  animation: pulse-leaf 1.5s ease-in-out infinite;
}

.leaf-pulse {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Light theme: show regular leaf, hide gold leaf */
.leaf-pulse-light {
  display: block;
}

.leaf-pulse-dark {
  display: none;
}

/* Dark theme: hide regular leaf, show gold leaf */
[data-theme="dark"] .leaf-pulse-light {
  display: none;
}

[data-theme="dark"] .leaf-pulse-dark {
  display: block;
}

.thinking-text {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  font-style: italic;
  color: #b8bcc8;
}

@keyframes pulse-leaf {
  0%, 100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes breathe {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}
.upcoming {
  margin-top: 4rem;
}
.margin350 {
  margin-top: 350px;
}
/* ===== RESPONSIVE DESIGN ===== */

/* Medium screens - 3 columns for 5 pillars */
@media (max-width: 1024px) {
  .wisdom-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    max-width: 800px;
  }
}

/* Tablet */
@media (max-width: 768px) {
  :root {
    --header-height: 100px;
    --input-height: 80px;
  }

  .athena-header {
    padding: 0 var(--space-4);
  }

  .athena-logo {
    height: 80px;
  }

  .welcome-container {
    padding: 0 var(--space-4);
  }

  .greeting {
    font-size: var(--text-3xl);
  }

  .description {
    font-size: var(--text-base);
  }

  .wisdom-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    max-width: 600px;
  }

  .wisdom-card {
    padding: var(--space-6) var(--space-3);
    min-height: 180px;
  }

  .messages-area {
    padding: var(--space-4);
  }

  .input-zone {
    padding: var(--space-4);
  }
}

/* Mobile */
@media (max-width: 480px) {
  .athena-leaf {
    left: var(--space-4);
    width: 24px;
    height: 24px;
  }

  .connection-dot {
    right: var(--space-4);
  }

  .welcome-container {
    padding: 0 var(--space-3);
  }

  .athena-logo {
    height: 60px;
  }

  .greeting {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
  }

  .description {
    font-size: var(--text-sm);
  }

  .wisdom-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
    margin-top: var(--space-8);
  }

  .wisdom-card {
    padding: var(--space-4);
    min-height: 80px;
  }

  .wisdom-text {
    font-size: var(--text-sm);
  }

  .message-content {
    max-width: 90%;
  }

  .messages-area {
    padding: var(--space-3);
  }

  .input-zone {
    padding: var(--space-3);
  }

  .input-container {
    padding: var(--space-3);
  }

  .send-button {
    width: 40px;
    height: 40px;
  }

  .message-input {
    font-size: var(--text-sm);
  }
}

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

.send-button:focus-visible,
.wisdom-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.message-input:focus-visible {
  outline: none;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --text-primary: #000000;
    --surface-primary: #FFFFFF;
    --accent: #B8860B;
  }
}

/* ===== SESSIONS MODAL ===== */
.sessions-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 7, 11, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.sessions-modal-content {
  background: var(--surface-primary);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(196, 141, 38, 0.2);
}

.sessions-header {
  padding: var(--space-6);
  border-bottom: 1px solid rgba(196, 141, 38, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sessions-header h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.sessions-close {
  background: none;
  border: none;
  font-size: var(--text-2xl);
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.sessions-close:hover {
  background: var(--surface-secondary);
  color: var(--text-primary);
}

.sessions-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  max-height: 400px;
}

.session-item {
  padding: var(--space-4);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  margin-bottom: var(--space-2);
}

.session-item:hover {
  background: var(--surface-secondary);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.session-title {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  line-height: 1.4;
}

.session-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.session-date {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.sessions-loading,
.sessions-empty,
.sessions-error {
  text-align: center;
  padding: var(--space-8);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--text-base);
}

.sessions-error {
  color: #DC2626;
}

.sessions-footer {
  padding: var(--space-6);
  border-top: 1px solid var(--surface-secondary);
  display: flex;
  justify-content: center;
}

.new-chat-btn {
  background: var(--accent);
  color: var(--athena-white);
  border: none;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.new-chat-btn:hover {
  background: #B8860B;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(196, 141, 38, 0.3);
}
[data-theme="dark"] .input-zone {
    background: rgba(10, 11, 15, 0.95);
  }
  [data-theme="dark"] .loading-overlay {
          background: rgba(10, 11, 15, 0.95);
        }
/* Theme Toggle Button */
        .theme-toggle, .wisdom-icon2 {
          width: 40px;
          height: 40px;
          background: var(--surface-secondary);
          border: 2px solid var(--accent);
          border-radius: var(--radius-full);
          cursor: pointer;
          transition: all 0.3s ease;
          box-shadow: var(--shadow);
          margin-left: 2px;
        }

        .theme-toggle:hover,
        .wisdom-icon2:hover {
          background: var(--accent);
          transform: scale(1.05);
          box-shadow: var(--shadow-md);
        }

        .theme-toggle svg,
        .wisdom-icon2 svg {
          width: 20px;
          height: 20px;
          color: var(--accent);
          transition: all 0.3s ease;
          margin: 0 auto;
        }

        .theme-toggle:hover svg,
        .wisdom-icon2:hover svg {
          color: var(--surface-primary);
        }

        [data-theme="dark"] .theme-toggle .sun-icon {
          display: block;
        }

        [data-theme="dark"] .theme-toggle .moon-icon {
          display: none;
        }

        [data-theme="light"] .theme-toggle .sun-icon {
          display: none;
        }

        [data-theme="light"] .theme-toggle .moon-icon {
          display: block;
        }
        @keyframes pulse {
          0%, 100% { opacity: 1; }
          50% { opacity: 0.5; }
        }
        .theme-toggle:focus-visible {
          outline: 2px solid var(--accent);
          outline-offset: 2px;
        }
        .header-right {
          position: absolute;
          right: var(--space-12);
          display: flex;
        }
        .header-right .theme-toggle {
          margin-right: 5px;
        }
        
/* Mobile responsiveness for sessions modal */
@media (max-width: 768px) {
  .theme-toggle, .wisdom-icon2 {
            left: var(--space-4);
            width: 36px;
            height: 36px;
          }

      .theme-toggle svg, .wisdom-icon2 svg {
        width: 18px;
        height: 18px;
      }
}
@media (max-width: 640px) {
  .sessions-modal-content {
    width: 95%;
    max-height: 85vh;
  }
  
  .sessions-header,
  .sessions-footer {
    padding: var(--space-4);
  }
  
  .sessions-list {
    padding: var(--space-3);
  }
  
  .session-item {
    padding: var(--space-3);
  }
}
@media (max-width: 480px) {
  .theme-toggle, .wisdom-icon2 {
    width: 32px;
    height: 32px;
    }

    .theme-toggle svg, .wisdom-icon2 svg {
      width: 16px;
      height: 16px;
    }
    .header-right {
      right: var(--space-6);
    }
      /* Responsive sizing for mic and send buttons on mobile */
  .mic-button,
  .send-button {
    width: 40px;
    height: 40px;
  }

  .mic-button .mic-icon,
  .mic-button .mic-recording-icon {
    width: 18px;
    height: 18px;
  }
  }

/* ===== NEW: Sessions Load More Button Styles ===== */
.sessions-end {
    text-align: center;
    padding: 15px;
    color: var(--text-muted);
    font-size: 12px;
    opacity: 0.7;
}

.load-more-sessions-btn {
    width: calc(100% - 32px);
    margin: 16px;
    padding: 12px 24px;
    background: var(--accent);
    color: var(--athena-white);
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.load-more-sessions-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.load-more-sessions-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
  