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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 2rem;
}

.language-switcher {
  display: flex;
  justify-content: center;
  margin: 15px 0;
  align-items: center;
  flex-wrap: wrap;
}

.language-switcher label {
  margin-right: 0.5rem;
  font-size: 0.9rem;
  color: #7f8c8d;
}

.language-links {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.language-links a {
  font-size: 0.9rem;
  color: #7f8c8d;
  text-decoration: none;
  padding: 2px 5px;
  border-radius: 3px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.language-links a:hover {
  background-color: #f0f2f5;
  color: #3498db;
}

.language-links a.active {
  font-weight: bold;
  color: #3498db;
}

.logo-container {
  margin: 1.5rem 0;
  text-align: center;
}

.logo {
  max-width: 320px;
  width: 100%;
  height: auto;
}

header p {
  color: #7f8c8d;
  font-size: 1.1rem;
  text-align: center;
  margin-top: 0.5rem;
}

/* Upload area */
.upload-container,
.progress-container,
.result-container,
.error-container {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin-bottom: 2rem;
}

.upload-box {
  border: 2px dashed #ddd;
  border-radius: 6px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
  cursor: pointer;
}

.upload-box:hover,
.upload-box.dragover {
  border-color: #3498db;
  background-color: rgba(52, 152, 219, 0.05);
}

.upload-prompt .icon {
  font-size: 2.5rem;
  color: #7f8c8d;
  margin-bottom: 1rem;
}

.upload-prompt p {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.upload-link {
  color: #3498db;
  text-decoration: underline;
  cursor: pointer;
}

.upload-formats {
  font-size: 0.9rem;
  color: #95a5a6;
}

.file-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.file-name {
  font-size: 1.1rem;
  color: #2c3e50;
  max-width: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.remove-file {
  background: none;
  border: none;
  color: #e74c3c;
  cursor: pointer;
  font-size: 0.9rem;
}

.language-section {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

/* Turnstile section */
.turnstile-section {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.language-section label {
  margin-right: 1rem;
  font-weight: 600;
}

.language-section select {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  flex-grow: 1;
}

.transcribe-btn,
.download-btn,
.new-transcription,
.try-again {
  width: 100%;
  padding: 0.8rem;
  border: none;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.transcribe-btn {
  background-color: #3498db;
  color: white;
}

.transcribe-btn:hover {
  background-color: #2980b9;
}

.transcribe-btn:disabled {
  background-color: #bdc3c7;
  cursor: not-allowed;
}

/* Progress */
.progress-info,
.result-info,
.error-info {
  text-align: center;
  margin-bottom: 1.5rem;
}

.progress-info h2,
.result-info h2,
.error-info h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.progress-bar {
  height: 10px;
  background-color: #ecf0f1;
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar-inner {
  height: 100%;
  background-color: #3498db;
  width: 0;
  animation: progress 2s infinite linear;
}

@keyframes progress {
  0% { width: 0%; }
  50% { width: 50%; }
  100% { width: 100%; }
}

/* Result */
.transcription-content {
  margin-bottom: 1.5rem;
}

.transcription-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.transcription-header label {
  font-weight: 600;
  color: #2c3e50;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background-color: #ecf0f1;
  border: 1px solid #bdc3c7;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #2c3e50;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background-color: #bdc3c7;
}

.copy-btn.copied {
  background-color: #2ecc71;
  border-color: #27ae60;
  color: white;
}

.copy-btn svg {
  width: 16px;
  height: 16px;
}

.transcription-text {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 1rem;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #2c3e50;
}

.result-actions {
  display: flex;
  gap: 1rem;
}

.result-actions .download-btn,
.result-actions .new-transcription {
  flex: 1;
  margin-bottom: 0;
}

.download-btn {
  background-color: #2ecc71;
  color: white;
}

.download-btn:hover {
  background-color: #27ae60;
}

.new-transcription {
  background-color: #ecf0f1;
  color: #2c3e50;
}

.new-transcription:hover {
  background-color: #bdc3c7;
}

/* Error */
.error-info h2 {
  color: #e74c3c;
}

.try-again {
  background-color: #e74c3c;
  color: white;
}

.try-again:hover {
  background-color: #c0392b;
}

/* Legal content */
.legal-content {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin-bottom: 2rem;
}

.legal-content h1 {
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 1.5rem;
  text-align: center;
}

.legal-content section {
  margin-bottom: 2rem;
}

.legal-content h2 {
  font-size: 1.4rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.legal-content p, .legal-content li {
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.legal-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #2c3e50;
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-banner p {
  margin: 0;
  padding-right: 1rem;
}

.cookie-banner a {
  color: #3498db;
  text-decoration: underline;
}

.cookie-banner button {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.cookie-banner button:hover {
  background-color: #2980b9;
}

/* Suggestion Box */
.suggestion-box {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: center;
  border-left: 4px solid #3498db;
  animation: pulse 2s infinite alternate;
}

@keyframes pulse {
  0% { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); }
  100% { box-shadow: 0 2px 15px rgba(52, 152, 219, 0.3); }
}

.suggestion-content h3 {
  color: #2c3e50;
  margin-bottom: 0.8rem;
  font-size: 1.3rem;
}

.suggestion-content p {
  color: #7f8c8d;
  margin-bottom: 0.5rem;
}

.suggestion-btn {
  display: inline-block;
  background-color: #3498db;
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  margin-top: 1rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 6px rgba(52, 152, 219, 0.2);
}

.suggestion-btn:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(52, 152, 219, 0.3);
}

/* Footer */
footer {
  text-align: center;
  color: #7f8c8d;
  font-size: 0.9rem;
  margin-top: 2rem;
}

.footer-links {
  margin: 0.8rem 0;
}

.footer-links a {
  color: #3498db;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.copyright {
  margin-top: 0.5rem;
  font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 1rem;
  }

  .cookie-banner {
    flex-direction: column;
    text-align: center;
  }

  .cookie-banner p {
    padding-right: 0;
    margin-bottom: 1rem;
  }
}
