
* { box-sizing: border-box; font-family: system-ui, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif; }
body { background: #eef2f5; margin: 0; padding: 0; color: #0f172a; min-height: 100vh; }

.site-header { background: linear-gradient(135deg, #0f3b5c, #1e5f7a); color: white; padding: 18px 24px 0; box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.site-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.3px; margin: 0 0 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.site-title small { font-size: 0.85rem; font-weight: 400; opacity: 0.85; background: rgba(255,255,255,0.15); padding: 4px 14px; border-radius: 40px; }
.main-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.main-tab { background: rgba(255,255,255,0.1); border: none; color: rgba(255,255,255,0.85); padding: 14px 28px; font-size: 1.05rem; font-weight: 600; cursor: pointer; border-radius: 20px 20px 0 0; transition: all 0.2s ease; letter-spacing: 0.2px; text-decoration: none; display: inline-block; }
.main-tab:hover { background: rgba(255,255,255,0.2); color: white; }
.main-tab.active { background: #eef2f5; color: #0f3b5c; box-shadow: 0 -4px 12px rgba(0,0,0,0.08); }

.main-content { padding: 28px 20px 40px; max-width: 1300px; margin: 0 auto; }

.hero { background: white; border-radius: 32px; padding: 48px 40px; box-shadow: 0 20px 35px -12px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 40px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-avatar { width: 160px; height: 160px; border-radius: 50%; background: linear-gradient(135deg, #0f3b5c, #3a9bb0); display: flex; align-items: center; justify-content: center; font-size: 4.5rem; color: white; flex-shrink: 0; box-shadow: 0 12px 30px rgba(15,59,92,0.3); }
.hero-text { flex: 1; min-width: 260px; }
.hero-text h1 { font-size: 2.2rem; color: #0f3b5c; margin: 0 0 8px; letter-spacing: -0.5px; }
.hero-text .role { font-size: 1.15rem; color: #2c7a8c; font-weight: 600; margin-bottom: 16px; }
.hero-text p { color: #475569; font-size: 1.05rem; line-height: 1.6; margin: 0 0 12px; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.badge { background: #e2ecf3; color: #0f3b5c; padding: 6px 16px; border-radius: 40px; font-size: 0.85rem; font-weight: 600; }

.section-title { font-size: 1.5rem; color: #0f3b5c; margin: 32px 0 18px; font-weight: 800; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.card { background: white; border-radius: 28px; padding: 30px 28px; box-shadow: 0 8px 24px rgba(0,0,0,0.06); border: 1px solid #e2edf2; transition: all 0.25s ease; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(15,59,92,0.15); border-color: #8aaec2; }
.card-icon { font-size: 2.6rem; margin-bottom: 12px; }
.card h3 { color: #0f3b5c; font-size: 1.25rem; margin: 0 0 10px; }
.card p { color: #64748b; font-size: 0.98rem; line-height: 1.55; margin: 0; }
.card .card-link { margin-top: 18px; color: #2c7a8c; font-weight: 600; font-size: 0.95rem; }

.sub-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; background: white; padding: 10px; border-radius: 60px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.sub-tab { background: transparent; border: none; padding: 10px 20px; font-size: 0.95rem; font-weight: 600; color: #4b5563; cursor: pointer; border-radius: 40px; transition: all 0.2s ease; }
.sub-tab:hover { background: #f1f5f9; color: #0f3b5c; }
.sub-tab.active { background: #0f3b5c; color: white; box-shadow: 0 4px 12px rgba(15,59,92,0.3); }
.sub-panel { display: none; }
.sub-panel.active { display: block; animation: fadeIn 0.3s ease; }

.container { background: white; border-radius: 32px; box-shadow: 0 20px 35px -12px rgba(0,0,0,0.15); padding: 24px 28px 36px; }
h1.test-title { font-size: 1.9rem; margin-bottom: 0.5rem; color: #1e293b; display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 12px; }
h1.test-title small { font-size: 0.8rem; background: #e2e8f0; padding: 6px 14px; border-radius: 40px; font-weight: normal; }
.timer-panel { background: #1e293b; color: white; border-radius: 60px; padding: 6px 20px; font-weight: 700; font-size: 1.5rem; font-family: monospace; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.info-panel { background: #f8fafc; border-radius: 28px; padding: 18px 24px; margin: 20px 0 28px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; border: 1px solid #e2edf2; }
.fields { display: flex; flex-wrap: wrap; gap: 24px; flex: 2; }
.field-group { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.field-group label { font-weight: 600; color: #0f3b5c; font-size: 0.85rem; }
.field-group input { padding: 12px 14px; border-radius: 20px; border: 1px solid #cbd5e1; font-size: 1rem; background: white; outline: none; }
.field-group input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.2); }
.result-container { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.result-percent { background: #ffffff; border-radius: 28px; padding: 8px 20px; text-align: center; border: 1px solid #cbd5e1; min-width: 180px; background: linear-gradient(135deg, #fef9e3, #fff); display: flex; flex-direction: column; justify-content: center; flex: 1 0 auto; }
.result-percent .label { font-size: 0.7rem; font-weight: 600; color: #4b5563; }
.result-percent .value { font-size: 1.8rem; font-weight: 800; line-height: 1.2; color: #0f3b5c; }
.result-percent .fraction { font-size: 0.9rem; color: #475569; margin-top: 2px; }
.result-percent .grade { font-size: 1.1rem; font-weight: 700; color: #0f3b5c; margin-top: 4px; border-top: 1px dashed #cbd5e1; padding-top: 4px; }
.button-bar { display: flex; gap: 16px; margin: 20px 0 24px; flex-wrap: wrap; }
.btn { background: #1e293b; border: none; padding: 12px 28px; border-radius: 60px; font-weight: 600; font-size: 1rem; color: white; cursor: pointer; transition: 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.btn.new { background: #2c3e66; }
.btn.check { background: #0f3b5c; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }

.questions-area { margin-top: 20px; border-top: 2px dashed #cbd5e6; padding-top: 16px; }
.question-card { background: #ffffff; border-radius: 24px; margin-bottom: 28px; padding: 18px 22px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); border: 1px solid #e4e9f2; }
.question-text { font-weight: 700; font-size: 1.18rem; margin-bottom: 16px; color: #0c4e6e; padding-right: 20px; }
.options { display: flex; flex-wrap: wrap; gap: 18px; margin-left: 12px; }
.option { display: flex; align-items: center; gap: 8px; background: #f9fbfe; padding: 8px 18px; border-radius: 60px; border: 1px solid #e2e8f0; cursor: pointer; }
.option:hover { background: #f1f5f9; }
input[type="radio"] { width: 18px; height: 18px; accent-color: #2c6e9e; margin: 0; cursor: pointer; }
input[type="radio"]:disabled { cursor: not-allowed; opacity: 0.6; }

.report-area { margin-top: 30px; background: #fefce8; border-radius: 28px; padding: 18px 24px; border-left: 8px solid #eab308; }
.report-title { font-weight: 800; font-size: 1.3rem; margin-bottom: 14px; }
.detail-report { display: flex; flex-direction: column; gap: 12px; max-height: 500px; overflow-y: auto; padding-right: 8px; }
.report-item { background: white; border-radius: 20px; padding: 12px 16px; border-left: 5px solid; }
.report-item.correct { border-left-color: #22c55e; background: #f0fdf4; }
.report-item.wrong { border-left-color: #ef4444; background: #fef2f2; }
.badge-correct { background: #22c55e20; color: #15803d; padding: 2px 10px; border-radius: 30px; font-weight: 600; }
.badge-wrong { background: #ef444420; color: #b91c1c; padding: 2px 10px; border-radius: 30px; font-weight: 600; }
.report-summary { background: white; border-radius: 20px; padding: 12px 16px; margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 20px; font-weight: 600; }

.placeholder { background: white; border-radius: 32px; padding: 60px 40px; text-align: center; box-shadow: 0 20px 35px -12px rgba(0,0,0,0.15); border: 1px solid #e2edf2; }
.placeholder h2 { color: #0f3b5c; font-size: 2rem; margin-bottom: 12px; }
.placeholder p { color: #5b6e8c; font-size: 1.1rem; }

.site-footer { text-align: center; margin-top: 28px; font-size: 0.8rem; color: #5b6e8c; padding: 20px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 680px) {
  .container { padding: 16px; }
  .options { flex-direction: column; align-items: flex-start; gap: 10px; }
  .timer-panel { font-size: 1.2rem; padding: 4px 16px; }
  .question-text { padding-right: 0; }
  .main-tab { padding: 12px 18px; font-size: 0.95rem; }
  .sub-tab { padding: 8px 14px; font-size: 0.85rem; }
  .hero { padding: 32px 24px; }
  .hero-avatar { width: 120px; height: 120px; font-size: 3.5rem; }
  .hero-text h1 { font-size: 1.7rem; }
}
