/* Basil AI Web App - Styles */

:root {
  --basil-green: #52C41A;
  --accent-red: #FF4444;
  --text-primary: #000000;
  --text-secondary: #666666;
  --bg-white: #FFFFFF;
  --bg-light: #F5F5F5;
  --bg-dark: #1A1A1A;
  --border-color: #E0E0E0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  background: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
nav {
  background: var(--bg-white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 40px;
  max-width: 1280px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.logo span {
  font-size: 2rem;
  margin-right: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--basil-green);
}

.nav-links a.active {
  color: var(--basil-green);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 40px;
}

header h1 {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

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

/* iOS App Promotion Banner */
.ios-app-banner {
  background: linear-gradient(135deg, var(--basil-green) 0%, #389e0d 100%);
  border-radius: 12px;
  padding: 20px 25px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.ios-app-banner .banner-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.ios-app-banner .banner-text {
  flex: 1;
  color: white;
}

.ios-app-banner .banner-text strong {
  font-size: 1.2rem;
  display: block;
  margin-bottom: 5px;
}

.ios-app-banner .banner-text p {
  margin: 0;
  font-size: 1rem;
  opacity: 0.95;
}

.ios-app-banner .banner-cta {
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.ios-app-banner .banner-cta:hover {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .ios-app-banner .banner-content {
    flex-direction: column;
    text-align: center;
  }

  .ios-app-banner .banner-text strong {
    font-size: 1.1rem;
  }

  .ios-app-banner .banner-text p {
    font-size: 0.95rem;
  }
}

/* Browser Compatibility Banner */
.compatibility-banner {
  background: #FFF3CD;
  border: 1px solid #FFE69C;
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.compatibility-banner.warning {
  background: #FFF3CD;
  border-color: #FFE69C;
}

.compatibility-banner .icon {
  font-size: 1.5rem;
}

.compatibility-banner .message {
  flex: 1;
  color: #856404;
  font-size: 0.95rem;
}

/* Loading Status - Compact Version */
.loading-status-compact {
  background: white;
  border-radius: 8px;
  padding: 12px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 30px;
  align-items: center;
  font-size: 0.85rem;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.status-text {
  color: var(--text-primary);
  font-weight: 600;
}

.status-text.ready {
  color: var(--basil-green);
}

.status-text.loading {
  color: #3b82f6;
}

.progress-bar-mini {
  width: 80px;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
  margin-left: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--basil-green) 0%, #389e0d 100%);
  width: 0%;
  transition: width 0.3s ease;
}

@media (max-width: 768px) {
  .loading-status-compact {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
}

/* Control Section */
.control-section {
  margin-bottom: 40px;
}

.control-and-waveform {
  display: flex;
  gap: 30px;
  align-items: center;
}

.button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.record-btn, .stop-btn {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 1rem;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.record-btn {
  background: linear-gradient(135deg, var(--accent-red) 0%, #dc2626 100%);
  color: white;
}

.record-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 12px 24px rgba(255, 68, 68, 0.4);
}

.record-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}

.stop-btn {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  color: white;
}

.stop-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.mic-icon, .stop-icon {
  width: 48px;
  height: 48px;
}

.btn-text {
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.recording-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-red);
  font-weight: 600;
  font-size: 1.1rem;
}

.pulse {
  width: 12px;
  height: 12px;
  background: var(--accent-red);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

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

/* Audio Visualizer */
.audio-visualizer {
  background: white;
  border-radius: 12px;
  padding: 20px;
  flex: 1;
  box-shadow: var(--shadow);
  min-width: 0;
}

.visualizer-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

#waveform-canvas {
  width: 100%;
  height: 100px;
  background: #1f2937;
  border-radius: 8px;
  display: block;
}

@media (max-width: 768px) {
  .control-and-waveform {
    flex-direction: column;
    gap: 20px;
  }

  .audio-visualizer {
    width: 100%;
  }

  .record-btn, .stop-btn {
    width: 160px;
    height: 160px;
  }

  .mic-icon, .stop-icon {
    width: 40px;
    height: 40px;
  }

  .btn-text {
    font-size: 0.95rem;
  }
}

/* Transcription Container */
.transcription-container {
  background: white;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.transcription-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.transcription-header h2 {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.timer {
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--basil-green);
}

.transcription-display {
  min-height: 300px;
  max-height: 500px;
  overflow-y: auto;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-primary);
  padding: 20px;
  background: var(--bg-light);
  border-radius: 8px;
}

.transcription-display .placeholder {
  color: var(--text-secondary);
  font-size: 1rem;
  text-align: center;
  padding: 60px 20px;
}

.transcript-text {
  font-size: 1.1rem;
  color: var(--text-primary);
}

.interim-transcript {
  color: var(--text-secondary);
  font-style: italic;
  opacity: 0.7;
}

.transcript-break {
  display: block;
  margin: 15px 0;
}

/* Summary Container */
.summary-container {
  background: white;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.summary-header h2 {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.summary-status {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
}

.summary-display {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.summary-display .placeholder {
  color: var(--text-secondary);
  text-align: center;
  padding: 40px 20px;
}

.summary-item {
  margin-bottom: 20px;
  padding: 15px;
  background: var(--bg-light);
  border-radius: 8px;
  border-left: 4px solid var(--basil-green);
}

.summary-item h3 {
  font-size: 1rem;
  color: var(--basil-green);
  margin-bottom: 10px;
  font-weight: 600;
}

.summary-item p {
  margin: 0;
  color: var(--text-primary);
}

/* Download Section */
.download-section {
  background: white;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 40px;
}

.download-section h2 {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.download-section p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.download-btn {
  background: linear-gradient(135deg, var(--basil-green) 0%, #389e0d 100%);
  color: white;
  border: none;
  padding: 18px 40px;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

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

/* Information Sections */
.info-sections {
  margin-top: 60px;
}

.info-section {
  background: white;
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.info-section h2 {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.info-section h3 {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 30px;
  margin-bottom: 15px;
}

.info-section p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.info-section ul {
  margin-left: 25px;
  margin-bottom: 20px;
}

.info-section ul li {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: 12px;
}

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

.info-section a {
  color: var(--basil-green);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.info-section a:hover {
  color: #389e0d;
  text-decoration: underline;
}

/* Comparison Grid */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin: 30px 0;
}

.comparison-item {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 25px;
}

.comparison-item strong {
  font-size: 1.1rem;
  display: block;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.comparison-item ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comparison-item ul li {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 10px;
  padding-left: 25px;
  position: relative;
}

@media (max-width: 768px) {
  .info-section {
    padding: 30px 20px;
  }

  .info-section h2 {
    font-size: 1.6rem;
  }

  .info-section h3 {
    font-size: 1.3rem;
  }

  .info-section p,
  .info-section ul li {
    font-size: 1rem;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Footer */
footer {
  background: var(--bg-dark);
  color: white;
  padding: 60px 0 30px;
  margin-top: 80px;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h4 {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: white;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 12px;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--basil-green);
}

.footer-section p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin: 0;
}

/* Scrollbar Styling */
.transcription-display::-webkit-scrollbar {
  width: 8px;
}

.transcription-display::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.transcription-display::-webkit-scrollbar-thumb {
  background: var(--basil-green);
  border-radius: 4px;
}

.transcription-display::-webkit-scrollbar-thumb:hover {
  background: #389e0d;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  header h1 {
    font-size: 2rem;
  }

  .transcription-display {
    font-size: 1rem;
  }

  .transcript-text {
    font-size: 1rem;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
}
