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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f7fa;
  color: #1a1a2e;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

nav { background: #ffffff; padding: 0.75rem 2rem; border-bottom: 1px solid #e0e0e0; }
.nav-inner {
  max-width: 1100px; margin: 0 auto; display: flex;
  align-items: center; justify-content: space-between;
}
.brand img { display: block; }
nav ul { list-style: none; display: flex; gap: 1.5rem; }
nav ul a { color: #1a1a2e; text-decoration: none; font-size: 0.95rem; font-weight: 600; }
nav ul a:hover { color: #e63946; }

main { flex: 1; max-width: 1100px; width: 100%; margin: 0 auto; padding: 2.5rem 1.5rem; }

.flash-box {
  background: #fff3cd; border: 1px solid #ffc107; border-radius: 6px;
  padding: 1rem 1.25rem; margin-bottom: 1.5rem; color: #856404;
}

.hero { text-align: center; padding: 3rem 1rem; }
.hero h1 { font-size: 3rem; color: #1a1a2e; letter-spacing: 2px; }
.hero .subtitle { font-size: 1.2rem; color: #555; margin: 0.5rem 0 1rem; }
.hero .desc { max-width: 600px; margin: 0 auto 2rem; color: #666; line-height: 1.7; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 1rem; }
.card { background: #fff; border-radius: 10px; padding: 1.75rem; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.card h3 { color: #1a1a2e; margin-bottom: 0.5rem; }
.card p { color: #666; line-height: 1.6; font-size: 0.95rem; }

.btn-primary {
  display: inline-block; background: #1a1a2e; color: #fff;
  padding: 0.7rem 1.8rem; border-radius: 6px; text-decoration: none;
  font-size: 1rem; border: none; cursor: pointer; transition: background 0.2s;
}
.btn-primary:hover { background: #2d2d5e; }

.form-section { max-width: 640px; }
.form-section h2 { margin-bottom: 0.5rem; }
.form-section > p { color: #666; margin-bottom: 1.5rem; line-height: 1.6; }
.upload-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-weight: 600; font-size: 0.95rem; }
.form-group input[type="file"],
.form-group input[type="text"] {
  padding: 0.55rem 0.75rem; border: 1px solid #ccc;
  border-radius: 6px; font-size: 0.95rem; background: #fff;
}
.form-group small { color: #888; font-size: 0.82rem; }
.radio-group { display: flex; flex-direction: column; gap: 0.5rem; }
.radio-group label { font-weight: 400; display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }

.results-section h2 { margin-bottom: 0.3rem; }
.analysis-label { color: #555; margin-bottom: 1.5rem; }
.stat-box {
  display: inline-flex; flex-direction: column; align-items: center;
  background: #1a1a2e; color: #fff; border-radius: 10px;
  padding: 1.25rem 2.5rem; margin-bottom: 1.5rem;
}
.stat-num { font-size: 2.5rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: 0.9rem; opacity: 0.8; margin-top: 0.25rem; }

.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.summary-card { background: #fff; border-radius: 10px; padding: 1.25rem; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.summary-card h3 { margin-bottom: 0.75rem; font-size: 1rem; color: #1a1a2e; }

table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th { text-align: left; border-bottom: 2px solid #eee; padding: 0.4rem 0.5rem; color: #555; }
td { padding: 0.4rem 0.5rem; border-bottom: 1px solid #f0f0f0; }
tr:last-child td { border-bottom: none; }

footer { text-align: center; padding: 1.25rem; font-size: 0.85rem; color: #aaa; background: #fff; border-top: 1px solid #eee; }
