@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg-color: #f9fafb;
  --surface-color: #ffffff;
  --surface-color-solid: #ffffff;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --accent-color: #7A2021;
  --accent-hover: #5A1718;
  --success-color: #059669;
  --danger-color: #dc2626;
  --border-color: #e5e7eb;
  --shadow-color: rgba(0, 0, 0, 0.05);
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--text-primary);
}

.container {
  width: 100%;
  max-width: 800px;
  padding: 2rem;
  margin-top: 5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1; /* Pushes footer down */
}

/* Header Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--surface-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
}

.nav-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-color);
  text-decoration: none;
}

.lang-switcher {
  display: flex;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.lang-toggle {
  cursor: pointer;
  color: var(--text-primary);
  opacity: 0.5;
  transition: opacity 0.2s;
}

.lang-toggle:hover {
  opacity: 0.8;
}

/* Footer */
.site-footer {
  width: 100%;
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.glass-panel {
  background: var(--surface-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.title-primary {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  text-align: center;
}

.subtitle {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 2rem;
}

/* Forms and Buttons */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

input, select {
  font-family: 'Inter', sans-serif;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s;
  outline: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

input:focus, select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(122, 32, 33, 0.1);
}

.btn-primary {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background-color: rgba(122, 35, 44, 0.05);
  transform: translateY(-1px);
}

.btn-danger {
  background-color: var(--danger-color);
  box-shadow: 0 4px 6px rgba(220, 38, 38, 0.2);
}
.btn-danger:hover {
  background-color: #b91c1c;
  box-shadow: 0 6px 10px rgba(220, 38, 38, 0.25);
}
.btn-success {
  background-color: var(--success-color);
}

/* Animations */
@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(122, 35, 44, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(122, 35, 44, 0); }
  100% { box-shadow: 0 0 0 0 rgba(122, 35, 44, 0); }
}

.recording {
  animation: pulseGlow 2s infinite;
  border-radius: 12px;
}

/* Feed Container */
.feed-container {
  height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border-color);
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.03);
}

.feed-item {
  animation: fadeIn 0.4s ease-out forwards;
  opacity: 0;
  transform: translateY(10px);
  padding: 1rem;
  border-radius: 8px;
  background: #ffffff;
  border-left: 4px solid var(--accent-color);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.feed-item.original {
  border-left-color: var(--text-secondary);
  font-size: 0.9em;
  color: var(--text-secondary);
  margin-bottom: -0.5rem;
  padding-bottom: 0.5rem;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scrollbar styles */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.03); 
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15); 
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.25); 
}

/* --- LANDING PAGE STYLES --- */
.hero-section {
  text-align: center;
  padding: 6rem 2rem 4rem;
  max-width: 900px;
  margin: 0 auto;
  animation: fadeInDown 0.8s ease-out forwards;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--accent-color);
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-inline: auto;
}

.action-cards {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.action-card {
  flex: 1;
  min-width: 250px;
  max-width: 350px;
  background: var(--surface-color-solid);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px var(--shadow-color);
  transition: all 0.3s ease;
  text-align: left;
}

.action-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(122,35,44,0.1);
  border-color: rgba(122, 35, 44, 0.3);
}

.feature-section {
  width: 100%;
  max-width: 1000px;
  margin: 4rem auto 6rem;
  padding: 0 2rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--surface-color-solid);
  padding: 2.5rem 2rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-4px);
}

.feature-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(122, 35, 44, 0.1);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

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

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
  .title-primary { font-size: 2rem; }
  .action-cards { flex-direction: column; gap: 1.5rem; }
  .action-card { max-width: 100%; border-radius: 12px; padding: 1.5rem; }
  .container { padding: 1rem; margin-top: 4.5rem; }
  .feed-container { height: 50vh; }
  .hero-section { padding: 5rem 1rem 3rem; }
  
  .feature-section { padding: 0 1rem; }
  .feature-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  #audio-controls-panel { flex-direction: column; align-items: stretch; gap: 1rem; text-align: center; }
  #audio-controls-panel > div { justify-content: center; flex-wrap: wrap; }
  .lang-switcher { font-size: 0.8rem; }
}
