:root {
  /* Light theme colors */
  --background-color: #f9f7f4;
  --text-color: #333333;
  --primary-color: #6366f1;
  --primary-color-text-footer: #6366f1;
  --secondary-color: #4f46e5;
  --perspective-left-color: rgba(209, 250, 229, 0.8);
  --perspective-right-color: rgba(219, 234, 254, 0.8);
  --perspective-left-border: #10b981;
  --perspective-right-border: #3b82f6;
  --header-background: rgba(255, 255, 255, 0.7);
  --input-background: rgba(255, 255, 255, 0.9);
  --button-text: #ffffff;
  --header-shadow: rgba(0, 0, 0, 0.05);
  --card-background: rgba(255, 255, 255, 0.7);
  --card-shadow: rgba(0, 0, 0, 0.05);
  --glass-blur: 12px;
  --glass-border: rgba(255, 255, 255, 0.3);
  --gradient-1: #8b5cf6;
  --gradient-2: #6366f1;
  --gradient-3: #3b82f6;
  --gradient-4: #10b981;

  --gradient-1-text: #8b5cf6;
  --gradient-2-text: #6366f1;
  --gradient-3-text: #3b82f6;
  --gradient-4-text: #10b981;
}

[data-theme="dark"] {
  /* Dark theme colors - with glass effects */
  --background-color: #121212;
  --text-color: #e2e8f0;
  --primary-color: #8b5cf6;
  --primary-color-text-footer: #6366f1;
  --secondary-color: #7c3aed;
  --perspective-left-color: rgba(6, 78, 59, 0.8);
  --perspective-right-color: rgba(30, 41, 59, 0.8);
  --perspective-left-border: #059669;
  --perspective-right-border: #4f46e5;
  --header-background: rgba(28, 28, 28, 0.7);
  --input-background: rgba(45, 45, 45, 0.9);
  --button-text: #ffffff;
  --header-shadow: rgba(0, 0, 0, 0.2);
  --card-background: rgba(36, 36, 36, 0.7);
  --card-shadow: rgba(0, 0, 0, 0.2);
  --glass-blur: 12px;
  --glass-border: rgba(255, 255, 255, 0.1);
  --gradient-1: #6d28d9;
  --gradient-2: #4f46e5;
  --gradient-3: #1e40af;
  --gradient-4: #065f46;

  --gradient-1-text: #9966ea;
  --gradient-2-text: #6366f1;
  --gradient-3-text: #5178f9;
  --gradient-4-text: #10b981;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Bricolage Grotesque', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  position: relative;
}

.app-container {
  min-height: 100vh;
  max-width: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding-bottom: 60px; /* Space for footer */
}

/* Remove gradient background */
.gradient-background {
  display: none; /* Hide the gradient background */
}

.gradient-overlay {
  display: none; /* Hide the gradient overlay */
}

/* Glass panel effect */
.glass-panel {
  background-color: var(--card-background);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.debate-header.glass-panel {
  backdrop-filter: blur(4px) brightness(70%) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  background-color: var(--card-background);
  margin-bottom: 1.5rem;
  border: 1px solid var(--glass-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 10px;
  margin-top: 10px;
}

/* Remove backdrop filter from glass panel elements when generating */
#debatePage.active .glass-panel {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.app-controls {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 90;
  display: flex;
  gap: 10px;
  align-items: center;
}

.dark-mode-toggle button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--header-background);
  box-shadow: 0 2px 5px var(--header-shadow);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dark-mode-toggle button:hover {
  transform: scale(1.1) rotate(10deg);
}

.dark-mode-toggle .sun {
  display: none;
}

.dark-mode-toggle .moon {
  display: block;
}

[data-theme="dark"] .dark-mode-toggle .sun {
  display: block;
}

[data-theme="dark"] .dark-mode-toggle .moon {
  display: none;
}

/* Language selector */
.language-selector select {
  padding: 5px 8px;
  border-radius: 20px;
  border: 1px solid var(--primary-color);
  background-color: var(--header-background);
  color: var(--text-color);
  font-family: inherit;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
  box-shadow: 0 2px 5px var(--header-shadow);
  appearance: none;
  padding-right: 25px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236366f1' d='M6 8.5l-4-4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.language-selector select:hover {
  border-color: var(--secondary-color);
  transform: translateY(-2px);
}

.language-selector select:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

/* Page transitions */
.page {
  display: none;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  transform: translateY(20px);
  position: relative;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
}

.page.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1;
  transform: translateY(0);
  width: 100%;
}

/* Beta label */
.beta-label {
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-3));
  color: white;
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  vertical-align: middle;
  display: inline-block;
  transform: translateY(-8px);
}

.beta-label-small {
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-3));
  color: white;
  font-size: 0.6rem;
  padding: 2px 5px;
  border-radius: 3px;
  margin-left: 5px;
  font-weight: 600;
  letter-spacing: 1px;
  vertical-align: middle;
  display: inline-block;
}

.beta-label-mini {
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-3));
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin: 0 5px;
  font-weight: bold;
  display: inline-block;
  -webkit-text-fill-color: white;
}

/* Fix font family for header */
.logo, h1, h2, h3, .topbar-logo {
  font-family: 'Bricolage Grotesque', sans-serif;
}

/* Remove background and shadow from header */
header.glass-panel {
  background: transparent;
  box-shadow: none;
  border: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* Adjust header spacing for better visual flow */
header {
  text-align: center;
  padding: 2rem 1rem 0.5rem;
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0;
}

/* Reduce spacing between header and content and ensure proper centering */
.home-content {
  padding-top: 0;
  min-height: unset;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: -1rem;
}

/* Adjust topic input container to better connect with header */
.topic-input-container {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem 2rem;
  margin-top: 0;
}

/* Fix footer positioning */
.app-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 10;
  border-bottom-right-radius: 0px;
  border-bottom-left-radius: 0px;
}

/* Put Opposify and BETA on same line */
.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.logo-container .beta-label {
  margin-left: 10px;
  margin-top: 3px;
}

/* Home Page Styles */
.logo {
  font-size: 3.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -1px;
  color: var(--primary-color);
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.tagline {
  font-size: 1.2rem;
  opacity: 0.9;
}

.home-content {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh; /* Increase height to ensure vertical centering */
  padding: 2rem 1rem;
  width: 100%;
  max-width: 1200px;
}

.topic-input-container {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
}

input[type="text"] {
  padding: 1rem;
  font-size: 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(221, 221, 221, 0.5);
  width: 100%;
  font-family: inherit;
  background-color: var(--input-background);
  color: var(--text-color);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

/* Model select styling */
#modelSelect {
  padding: 0.6rem;
  font-size: 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(221, 221, 221, 0.5);
  width: 100%;
  font-family: inherit;
  background-color: var(--input-background);
  color: var(--text-color);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236366f1' d='M6 8.5l-4-4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

#modelSelect:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

#modelSelect:hover {
  border-color: var(--secondary-color);
}

#modelSelect option {
  background-color: var(--input-background);
  color: var(--text-color);
  padding: 0.5rem;
}

button {
  padding: 1rem;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-3));
  color: var(--button-text);
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  font-weight: 500;
}

.ai-notice {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.7;
  margin-top: 1rem;
  text-align: center;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

button:active {
  transform: scale(0.98);
}

.debate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 90;
  width: 100%;
  flex-direction: row;
  flex-wrap: nowrap;
  margin-bottom: 1rem;
}

.debate-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.debate-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.back-button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
}

.debate-topic-container {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 40%;
  overflow: hidden;
}

.debate-topic {
  text-align: center;
  margin: 0;
  font-size: 1.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.topbar-logo {
  font-family: 'Instrument Serif', serif;
  font-size: 1.3rem;
  color: var(--primary-color);
  margin: 0;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.new-topic-button, .export-button {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
}

.debate-container {
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.debate-columns {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  width: 100%;
  padding: 0.5rem;
}

.debate-columns.show-perspectives {
  background: transparent !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.left-column, .right-column {
  width: 48%;
  text-align: center;
}

.group-header {
  font-weight: 600;
  font-size: 1.2rem;
  padding: 0.5rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), rgba(79, 70, 229, 0.1));
  border-radius: 20px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.debate-content {
  position: relative;
  width: 100%;
}

/* Perspective cards */
.perspective-card {
  background-color: var(--card-background);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform;
}

.perspective-header {
  padding: 1rem;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-3));
  color: white;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.subtopic-title {
  margin: 0;
  font-size: 1.1rem;
}

.perspectives-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.perspective {
  padding: 1rem;
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  will-change: transform;
}

.perspective:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.perspective-left {
  background-color: var(--perspective-left-color);
  border-left: 3px solid var(--perspective-left-border);
}

.perspective-right {
  background-color: var(--perspective-right-color);
  border-right: 3px solid var(--perspective-right-border);
  text-align: right;
}

.perspective-emoji {
  font-size: 1.5rem;
  margin-right: 0.5rem;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.1));
}

.perspective-right .perspective-emoji {
  margin-right: 0;
  margin-left: 0.5rem;
  order: 2;
}

.perspective-content {
  flex: 1;
}

.perspective-group {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  opacity: 0.7;
  font-style: italic;
}

.more-ideas-button {
  width: 100%;
  padding: 0.75rem;
  background: transparent;
  border: 1px dashed var(--primary-color);
  color: var(--primary-color);
  margin-top: 1rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  background-image: linear-gradient(90deg, transparent, transparent);
  box-shadow: none;
}

.more-ideas-button:hover {
  background-image: linear-gradient(90deg, rgba(99, 102, 241, 0.1), rgba(79, 70, 229, 0.1));
  transform: translateY(-2px);
}

.more-ideas-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Additional perspective animation */
.additional-perspective {
  animation: slideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform: translateX(-20px);
  opacity: 0;
  will-change: transform, opacity;
}

.perspective-right.additional-perspective {
  transform: translateX(20px);
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Updated loading animation - rectangular shape with gradient border */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 240px;
  padding: 1.5rem;
  background-color: var(--card-background);
  border: 1px solid transparent;
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

/* Gradient border animation with blur */
.loading-container::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-3), var(--gradient-2), var(--gradient-4));
  background-size: 300% 300%;
  border-radius: 20px;
  z-index: -1;
  filter: blur(8px);
  animation: gradientBorderAnimation 3s ease infinite;
  will-change: background-position;
}

@keyframes gradientBorderAnimation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Chat bubble animation container */
.chat-bubbles-container {
  width: 100%;
  position: relative;
  height: 180px; /* Increased height to accommodate multiple bubbles */
  margin-top: 1rem;
  overflow: hidden;
}

/* Updated chat bubble styles for sequential animation */
.chat-bubble {
  position: absolute;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  max-width: 80%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.5s ease, opacity 0.5s ease;
  transform: translateY(50px);
  opacity: 0;
}

.chat-bubble-left {
  background-color: var(--perspective-left-color);
  border-left: 2px solid var(--perspective-left-border);
  left: 0;
  top: 0;
}

.chat-bubble-right {
  background-color: var(--perspective-right-color);
  border-right: 2px solid var(--perspective-right-border);
  right: 0;
  text-align: right;
  top: 60px;
}

.chat-bubble.active {
  transform: translateY(0);
  opacity: 1;
}

.chat-bubble.moving-up {
  transform: translateY(-60px);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.chat-icon {
  font-size: 1.2rem;
  line-height: 1;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.toast {
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  margin-top: 10px;
  max-width: 300px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s, fadeOut 0.3s 2.7s;
  opacity: 0;
  animation-fill-mode: forwards;
}

.toast-title {
  font-weight: bold;
  margin-bottom: 5px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-20px); }
}

/* Error message styles */
.error-message {
  padding: 2rem;
  margin: 2rem auto;
  max-width: 600px;
  background-color: rgba(254, 202, 202, 0.2);
  border-left: 4px solid #ef4444;
  border-radius: 12px;
  text-align: center;
}

.error-message h3 {
  font-size: 1.5rem;
  color: #b91c1c;
  margin-bottom: 1rem;
}

.error-message p {
  margin-bottom: 1rem;
}

.error-details {
  font-size: 0.9rem;
  padding: 0.75rem;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  margin-top: 1rem;
  white-space: pre-wrap;
  text-align: left;
  font-family: monospace;
}

.retry-button {
  margin-top: 1.5rem;
  padding: 0.5rem 1.5rem;
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.retry-button:hover {
  background: linear-gradient(90deg, #dc2626, #b91c1c);
}

/* Add styles for the advertisement container */
.ads-container {
  margin-top: 2rem;
  border-radius: 16px;
  padding: 1rem;
  width: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
}

.ads-container iframe {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  max-width: 100%;
}

.ads-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-color);
  opacity: 0.7;
}

/* Modal styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(-20px);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--primary-color);
  padding-bottom: 1rem;
}

.modal-header h2 {
  font-size: 1.5rem;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.modal-content {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.eu-flag {
  width: 50px;
  height: auto;
  margin-right: 10px;
  border-radius: 5px;
}

.modal-title-container {
  display: flex;
  align-items: center;
}

/* Footer style */
.app-footer {
  width: 100%;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 5;
}

.footer-content {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  display: flex;
  align-items: center;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  font-family: 'Instrument Serif', serif;
  font-size: 1.2rem;
  color: var(--primary-color);
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(90deg, var(--gradient-1-text), var(--gradient-3-text));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-switch {
  margin-right: 15px;
}

.footer-switch .switch-button {
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.footer-switch .switch-button:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.copyright {
  font-size: 0.9rem;
  opacity: 0.7;
}

.copyright a {
  color: var(--primary-color);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.copyright a:hover {
  opacity: 1;
  text-decoration: underline;
}

.version {
  font-size: 0.8rem;
  opacity: 0.7;
  font-family: 'Inter', sans-serif;
  background: var(--button-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Advanced settings styles */
.advanced-settings-toggle {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
}

.advanced-settings-toggle button {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 0.9rem;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
  box-shadow: none;
}

.advanced-settings-toggle button:hover {
  color: var(--secondary-color);
  background: none;
  transform: none;
  box-shadow: none;
}

.toggle-icon {
  font-size: 1rem;
}

.advanced-settings-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), margin 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  margin-top: 0;
  width: 100%;
  scroll-margin-top: 20px;
}

.advanced-settings-panel.active {
  max-height: 500px;
  opacity: 1;
  margin-top: 1rem;
}

/* Ensure the home page content stays centered vertically */
#homePage {
  justify-content: center;
}

#homePage header {
  margin-bottom: 0;
}

#homePage .home-content {
  margin-top: 0;
  padding-top: 0;
}

.settings-section {
  padding: 1rem;
}

.setting-group {
  margin-bottom: 1rem;
}

.setting-group:last-child {
  margin-bottom: 0;
}

.setting-header {
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.setting-header label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.setting-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-left: 1.5rem;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.setting-controls.active {
  opacity: 1;
}

.input-group {
  width: 100%;
}

.input-group input {
  font-size: 0.9rem;
  padding: 0.75rem;
}

/* AI topic chip */
.ai-topics-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  justify-content: center;
}

.ai-topic-chip {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-3));
  color: var(--button-text);
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 1rem;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-topic-chip:hover {
  transform: translateY(-2px) scale(1.05);
}

.ai-topic-chip-icon {
  margin-right: 0.3rem;
  font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 900px) {
  header {
    padding: 3rem 1rem;
  }
  
  .debate-columns {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .left-column, .right-column {
    width: auto;
    min-width: 45%;
    margin-bottom: 0.5rem;
  }
  
  .group-header {
    white-space: nowrap;
    padding: 0.5rem 1rem;
  }
  
  .debate-header {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  
  .debate-controls {
    width: auto;
    margin-top: 0;
    display: flex;
    gap: 0.5rem;
  }
  
  .debate-topic-container {
    max-width: 90%;
  }
  
  .ads-container iframe {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .app-controls {
    top: 10px;
    right: 10px;
    gap: 5px;
  }
  
  .language-selector select {
    font-size: 0.8rem;
    padding: 4px 20px 4px 6px;
    background-position: right 6px center;
  }
  
  .logo {
    font-size: 2.5rem;
  }
  
  .debate-columns {
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 0.5rem;
  }
  
  .left-column, .right-column {
    width: auto;
    margin-bottom: 0.5rem;
  }
  
  .group-header {
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    display: inline-block;
  }
  
  .debate-topic-container {
    order: 1;
    width: 100%;
    max-width: 100%;
    margin: 0.5rem 0;
    flex-direction: column;
    align-items: center;
  }
  
  .ai-topic-chip {
    margin-left: 0;
    margin-top: 0.3rem;
  }
  
  .back-button, .new-topic-button, .export-button {
    padding: 0.4rem;
    font-size: 0.75rem;
    height: 32px;
  }
  
  .debate-header {
    padding: 0.6rem;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .debate-header-left {
    order: 0;
    width: auto;
  }
  
  .debate-controls {
    order: 2;
    width: 100%;
    justify-content: space-between;
    margin-top: 0.5rem;
  }
  
  .topbar-logo {
    font-size: 1.1rem;
  }
  
  .perspective {
    padding: 0.8rem;
  }
  
  .perspective-emoji {
    font-size: 1.3rem;
  }
  
  .perspective-content p {
    font-size: 0.9rem;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  
  .footer-left, .footer-right {
    justify-content: center;
  }
  
  .footer-logo {
    font-size: 1.2rem;
  }
  
  .version {
    font-size: 0.7rem;
  }
  
  .ads-container {
    padding: 0.5rem;
  }
  
  .ads-container iframe {
    transform: scale(0.9);
    transform-origin: center top;
  }
}

/* For very small screens */
@media (max-width: 380px) {
  .debate-header-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
  
  .topbar-logo {
    display: none;
  }
  
  .back-button, .new-topic-button, .export-button {
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
  }
  
  .group-header {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
  }
  
  .neurons-animation {
    transform: scale(0.8);
  }
}

/* Version switch button styles */
.version-switch {
  margin-right: 10px;
}

.switch-button {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  text-decoration: none;
  color: white;
  background: #333;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: block;
}

.switch-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.standard-switch {
  background: linear-gradient(90deg, var(--gradient-4), var(--gradient-3));
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Gradient text for BETA label in footer */
.gradient-text {
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}
