/* style.css - 모바일 우선, 심플 & 빠른 UX */
:root {
  --primary: #0a0a23;
  --accent: #00e0d3;
  --error: #ff3b3b;
  --success: #00c853;
  --bg: #f9f9fb;
  --text: #222;
  --border: #e0e0e0;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'Apple SD Gothic Neo', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.hero {
  background: var(--primary);
  color: #fff;
  padding: 2.5rem 1rem 1.5rem 1rem;
  text-align: center;
  position: relative;
}
.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
}
.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0 0 0.5rem 0;
}
.hero-description {
  font-size: 1rem;
  font-weight: 400;
  margin: 0 0 0.5rem 0;
}

.lang-switcher {
  position: absolute;
  top: 1rem;
  right: 1rem;
}
.lang-switcher select {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}
.lang-switcher select option { color: #000; }

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

.input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.url-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  outline: none;
  transition: border 0.2s;
}
.url-input:focus {
  border-color: var(--accent);
}
.download-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0 1.2rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.download-btn:hover {
  background: #00bfae;
}

.loading-ui, .error-ui, .success-ui {
  margin: 1.5rem 0;
  padding: 1.2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  background: #fff;
  text-align: center;
}
.loading-ui .spinner {
  width: 32px;
  height: 32px;
  border: 4px solid #eee;
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  margin: 0 auto 0.5rem auto;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  100% { transform: rotate(360deg); }
}
.loading-text {
  font-size: 1rem;
  color: var(--primary);
}
.progress-bar {
  width: 100%;
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  margin-top: 0.5rem;
  overflow: hidden;
}
.progress-fill {
  width: 60%;
  height: 100%;
  background: var(--accent);
  animation: progress 2s infinite linear alternate;
}
@keyframes progress {
  0% { width: 10%; }
  100% { width: 90%; }
}

.error-ui {
  border: 1px solid var(--error);
  color: var(--error);
}
.error-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.error-message {
  margin-bottom: 1rem;
}
.retry-btn {
  background: var(--error);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;
}

.success-ui {
  border: 1px solid var(--success);
  color: var(--success);
}
.success-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.success-filename {
  margin-bottom: 1rem;
  color: var(--primary);
}
.success-link {
  display: inline-block;
  background: var(--success);
  color: #fff;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.download-again-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 0.5rem;
}

.features {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0 1rem 0;
  justify-content: center;
}
.feature-item {
  flex: 1 1 40%;
  min-width: 120px;
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.feature-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.faq {
  margin: 2rem 0 1rem 0;
}
.faq h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.faq-item {
  margin-bottom: 0.5rem;
}
.faq-question {
  width: 100%;
  background: #f5f5f5;
  border: none;
  border-radius: 6px;
  padding: 0.7rem 1rem;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.faq-question:hover {
  background: #e0e0e0;
}
.faq-answer {
  display: none;
  padding: 0.5rem 1rem 0.5rem 1rem;
  font-size: 0.97rem;
  color: #444;
}
.faq-item.active .faq-answer {
  display: block;
}

.legal-notice {
  margin: 2rem 0 1rem 0;
  font-size: 0.95rem;
  color: #666;
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: 6px;
  padding: 1rem;
}

.footer {
  background: var(--primary);
  color: #fff;
  padding: 1.5rem 1rem 1rem 1rem;
  text-align: center;
  margin-top: 2rem;
}
.footer-content {
  max-width: 480px;
  margin: 0 auto;
}
.footer-links {
  margin-bottom: 0.5rem;
}
.footer-links a {
  color: #fff;
  text-decoration: underline;
  margin: 0 0.3rem;
  font-size: 0.97rem;
}
.footer-links .separator {
  color: #aaa;
  margin: 0 0.2rem;
}
.footer-disclaimer {
  font-size: 0.9rem;
  color: #bbb;
  margin-top: 0.5rem;
}

.ad-banner, .ad-section {
  width: 100%;
  max-width: 480px;
  margin: 1.5rem auto 0 auto;
  min-height: 60px;
  text-align: center;
}

@media (max-width: 600px) {
  .container, .footer-content, .ad-banner, .ad-section {
    max-width: 100vw;
    padding: 0 0.5rem;
  }
  .feature-item {
    min-width: 100px;
    padding: 0.7rem;
  }
}

.hidden {
  display: none !important;
}
