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

:root {
  --primary-color: #FD9800;
  --secondary-color: #1d3557;
  --accent-color: #f4a261;
  --background-color: #f1faee;
  --text-color: #1d3557;
  --white: #ffffff;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #FEF9E1;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.container {
  width: 100%;
  max-width: 600px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  height: 90vh;
  max-height: 800px;
  overflow: hidden;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #E08600 100%);
  color: var(--white);
  padding: 1.5rem;
  text-align: center;
}

.header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 3px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.tagline {
  font-size: 1rem;
  opacity: 0.9;
  margin-top: 0.25rem;
}

/* Chat Container */
.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: var(--white);
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Message Bubbles */
.message {
  max-width: 85%;
  padding: 1rem;
  border-radius: 15px;
  line-height: 1.5;
  animation: fadeIn 0.3s ease;
}

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

.message-bot {
  align-self: flex-start;
  background: var(--white);
  border: 2px solid var(--primary-color);
  border-bottom-left-radius: 5px;
}

.message-bot::before {
  content: '🎤 ';
}

.message-user {
  align-self: flex-end;
  background: var(--primary-color);
  color: var(--white);
  border-bottom-right-radius: 5px;
}

/* Input Area */
.input-container {
  padding: 1rem;
  background: var(--white);
  border-top: 1px solid #eee;
}

.input-form {
  display: flex;
  gap: 0.5rem;
}

#userInput {
  flex: 1;
  padding: 0.875rem 1rem;
  border: 2px solid #ddd;
  border-radius: 25px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

#userInput:focus {
  border-color: var(--primary-color);
}

/* Buttons */
.btn {
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-send {
  background: var(--primary-color);
  color: var(--white);
}

.btn-copy {
  background: var(--primary-color);
  color: var(--white);
}

.btn-restart {
  background: var(--white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

/* Spotlight - Full overlay */
.spotlight-container {
  position: fixed;
  inset: 0;
  background: rgba(254, 249, 225, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  z-index: 999;
}

.spotlight {
  background: var(--white);
  border: 3px solid var(--primary-color);
  border-radius: 15px;
  padding: 2rem;
  color: var(--text-color);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.spotlight h2 {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: var(--primary-color);
}

.spotlight-text {
  background: var(--white);
  color: var(--text-color);
  padding: 1.5rem;
  border-radius: 10px;
  line-height: 1.8;
  font-size: 1rem;
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.spotlight-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  justify-content: center;
}

/* Loading */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  color: var(--white);
  z-index: 1000;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Utility */
.hidden {
  display: none !important;
}

/* Mobile */
@media (max-width: 480px) {
  body {
    padding: 0;
  }

  .container {
    height: 100vh;
    max-height: none;
    border-radius: 0;
  }

  .header h1 {
    font-size: 1.5rem;
  }

  .message {
    max-width: 90%;
  }

  .spotlight-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
