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

body {
  font-family: "Segoe UI", "Malgun Gothic", sans-serif;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.header {
  background: #ffffff;
  padding: 15px 32px;
  align-items: center;
  border-bottom: 1px solid #eee;
}

.nav {
  display: flex;
  width: 100%;
}

.nav-item {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  border-radius: 12px;
  font-size: 1.2em;
  font-weight: 600;
  color: #666;
  text-decoration: none;
  transition: all 0.25s;
}

.nav-item:hover {
  background: rgba(250, 112, 154, 0.08);
  color: #fa709a;
}

/* 현재 페이지 */
.nav-item.active {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(250, 112, 154, 0.3);
}

.back-btn {
  font-size: 0.95em;
  font-weight: 500;
  color: #00f2fe;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.back-btn:hover {
  background: rgba(112, 213, 250, 0.08);
  color: #018d95;
}

.header h1 {
  text-align: center;
  font-size: 1.4em;
  font-weight: 700;
  color: #222;
  letter-spacing: -0.3px;
}

.spacer {
  width: 100px;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.voice-container {
  background: white;
  border-radius: 30px;
  padding: 60px;
  max-width: 700px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: fadeIn 0.5s ease;
}

.voice-title h2 {
  font-size: 2.5em;
  color: #333;
  margin-bottom: 15px;
}

.voice-title p {
  font-size: 1.3em;
  color: #666;
  margin-bottom: 50px;
}

.mic-button {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 40px;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(79, 172, 254, 0.4);
  position: relative;
}

.mic-button:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 40px rgba(79, 172, 254, 0.5);
}

.mic-button:active {
  transform: scale(0.95);
}

.mic-button.active {
  animation: pulse 1.5s infinite;
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%);
}

.mic-icon {
  font-size: 5em;
  color: white;
}

.status-text {
  font-size: 1.4em;
  color: #666;
  min-height: 40px;
  margin-bottom: 20px;
}

.status-text.listening {
  color: #ff6b6b;
  font-weight: 600;
}

.transcript-box {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 25px;
  min-height: 100px;
  margin-bottom: 30px;
  display: none;
}

.transcript-box.show {
  display: block;
}

.transcript-label {
  font-size: 1em;
  color: #999;
  margin-bottom: 10px;
  font-weight: 600;
}

.transcript-text {
  font-size: 1.3em;
  color: #333;
  line-height: 1.6;
}

.loading-message {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 15px;
  font-size: 1.2em;
  color: #4facfe;
  margin-top: 20px;
}

.loading-message.show {
  display: flex;
}

.spinner {
  width: 30px;
  height: 30px;
  border: 4px solid #e0e0e0;
  border-top: 4px solid #4facfe;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.response-box {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-radius: 15px;
  padding: 25px;
  margin-top: 20px;
  display: none;
}

.response-box.show {
  display: block;
  animation: slideUp 0.4s ease;
}

.response-label {
  font-size: 1em;
  color: #1976d2;
  margin-bottom: 10px;
  font-weight: 600;
}

.response-text {
  font-size: 1.2em;
  color: #333;
  line-height: 1.8;
}

.hint-text {
  color: #999;
  font-size: 1em;
  margin-top: 30px;
}

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

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 15px 50px rgba(255, 107, 107, 0.6);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

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

@media (max-width: 800px) {
  .voice-container {
    padding: 40px 30px;
  }

  .voice-title h2 {
    font-size: 2em;
  }

  .mic-button {
    width: 160px;
    height: 160px;
  }

  .mic-icon {
    font-size: 4em;
  }
}
