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

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
       background: #f0f4f8; color: #1a202c; }

/* ── Hero ── */
.hero { min-height: 100vh; display: flex; align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }

.hero-content { text-align: center; color: white; padding: 2rem; max-width: 700px; }

.logo { font-size: 4rem; margin-bottom: 1rem; }

h1 { font-size: 3rem; font-weight: 800; margin-bottom: 0.5rem; }

.tagline { font-size: 1.2rem; opacity: 0.9; margin-bottom: 3rem; }

.features { display: flex; gap: 1.5rem; justify-content: center;
            flex-wrap: wrap; margin-bottom: 3rem; }

.feature { background: rgba(255,255,255,0.15); border-radius: 12px;
           padding: 1.5rem; width: 180px; backdrop-filter: blur(10px); }

.feature .icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }

.feature h3 { font-size: 1rem; margin-bottom: 0.3rem; }

.feature p { font-size: 0.85rem; opacity: 0.85; }

.hint { font-size: 0.85rem; opacity: 0.7; margin-top: 0.8rem; }

/* ── Navbar ── */
.navbar { display: flex; align-items: center; justify-content: space-between;
          padding: 1rem 2rem; background: white;
          box-shadow: 0 1px 4px rgba(0,0,0,0.08); }

.nav-logo { font-size: 1.2rem; font-weight: 700; color: #667eea; }

/* ── Container ── */
.container { max-width: 720px; margin: 2rem auto; padding: 0 1rem; }

/* ── Card ── */
.card { background: white; border-radius: 16px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.08);
        padding: 2rem; margin-bottom: 1.5rem; }

.card h2 { font-size: 1.3rem; margin-bottom: 1.5rem; color: #2d3748; }

/* ── Form ── */
.form-group { margin-bottom: 1.5rem; }

.form-group label { display: block; font-weight: 600; font-size: 0.9rem;
                    margin-bottom: 0.5rem; color: #4a5568; }

.input { width: 100%; padding: 0.75rem 1rem; border: 2px solid #e2e8f0;
         border-radius: 10px; font-size: 1rem; transition: border-color 0.2s;
         outline: none; }

.input:focus { border-color: #667eea; }

/* ── Upload Area ── */
.upload-area { border: 2px dashed #cbd5e0; border-radius: 12px;
               padding: 2rem; text-align: center; cursor: pointer;
               transition: all 0.2s; background: #f7fafc; }

.upload-area:hover, .upload-area.drag-over { border-color: #667eea;
                                              background: #ebf4ff; }

.upload-icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }

.upload-area p { color: #718096; font-size: 0.9rem; }

.file-list { display: flex; flex-wrap: wrap; gap: 0.5rem;
             justify-content: center; margin-top: 1rem; }

.file-tag { background: #ebf4ff; color: #3182ce; border-radius: 20px;
            padding: 0.25rem 0.75rem; font-size: 0.8rem; }

/* ── Buttons ── */
.btn { display: inline-block; padding: 0.75rem 1.5rem; border-radius: 10px;
       font-size: 1rem; font-weight: 600; cursor: pointer; text-decoration: none;
       border: none; transition: all 0.2s; }

.btn-primary { background: linear-gradient(135deg, #667eea, #764ba2);
               color: white; }

.btn-primary:hover { opacity: 0.9; transform: translateY(-1px);
                     box-shadow: 0 4px 12px rgba(102,126,234,0.4); }

.btn-outline { background: transparent; border: 2px solid white; color: white; }

.btn-outline:hover { background: rgba(255,255,255,0.1); }

.btn-sm { padding: 0.4rem 1rem; font-size: 0.85rem;
          border-color: #667eea; color: #667eea; }

.btn-full { width: 100%; text-align: center; margin-top: 0.5rem; }

/* ── Progress ── */
.progress-bar-wrap { background: #e2e8f0; border-radius: 99px;
                     height: 12px; overflow: hidden; margin-bottom: 0.75rem; }

.progress-bar { background: linear-gradient(90deg, #667eea, #764ba2);
                height: 100%; border-radius: 99px; transition: width 0.5s ease; }

#progressText { color: #718096; font-size: 0.9rem; margin-bottom: 1rem; }

/* ── Log ── */
.log-box { background: #1a202c; color: #a0aec0; font-family: monospace;
           font-size: 0.8rem; border-radius: 10px; padding: 1rem;
           height: 160px; overflow-y: auto; margin-bottom: 1.5rem; }

.log-box p { margin-bottom: 0.25rem; }

/* ── Done ── */
.done-msg { font-size: 1.1rem; font-weight: 600; color: #38a169;
            margin-bottom: 1rem; }

#doneArea { display: flex; flex-direction: column; gap: 0.75rem; }

/* ── RWD：手機版（寬度 < 600px）── */
@media (max-width: 600px) {
  h1 { font-size: 2rem; }

  .tagline { font-size: 1rem; margin-bottom: 2rem; }

  .logo { font-size: 3rem; }

  .features { flex-direction: column; align-items: center; gap: 1rem; }

  .feature { width: 100%; max-width: 320px; }

  .hero-content { padding: 1.5rem 1rem; }

  .navbar { padding: 0.75rem 1rem; }

  .container { padding: 0 0.75rem; margin: 1rem auto; }

  .card { padding: 1.25rem 1rem; border-radius: 12px; }

  .card h2 { font-size: 1.1rem; }

  .btn { padding: 0.85rem 1.25rem; font-size: 0.95rem; }

  .btn-full { padding: 1rem; font-size: 1rem; }

  .upload-area { padding: 1.5rem 1rem; }

  .log-box { font-size: 0.75rem; height: 140px; }

  /* 下載完成按鈕在手機上全寬 */
  #doneArea .btn { width: 100%; text-align: center; }

  /* 登入頁按鈕加大好點 */
  .hero-content .btn { display: block; width: 100%; max-width: 320px;
                       margin: 0.5rem auto; text-align: center; }
}
