/* ====================================================
   exam-index.css — PocketPortal Study Hub
   ==================================================== */
:root {
  --primary:       #4f46e5;
  --primary-dark:  #3730a3;
  --primary-light: #e0e7ff;
  --accent:        #7c3aed;
  --success:       #059669;
  --success-light: #d1fae5;
  --warning:       #d97706;
  --warning-light: #fef3c7;
  --danger:        #dc2626;
  --text:          #1e293b;
  --text-muted:    #64748b;
  --text-secondary:#475569;
  --bg:            #f1f5f9;
  --card-bg:       #ffffff;
  --border:        #e2e8f0;
  --border-strong: #cbd5e1;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 2px 8px rgba(0,0,0,0.07);
  --shadow-sm:     0 1px 4px rgba(0,0,0,0.06);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.11);
  --accent-green:  #059669;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Meiryo', 'Yu Gothic', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* === PORTAL HERO === */
.portal-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  text-align: center;
  padding: 40px 20px 36px;
  position: relative;
  overflow: hidden;
}
.portal-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.portal-hero h1 {
  font-size: 1.6em;
  font-weight: 900;
  margin-bottom: 10px;
  position: relative;
  line-height: 1.3;
}
.portal-hero p {
  font-size: 0.95em;
  opacity: 0.9;
  position: relative;
  line-height: 1.7;
}

/* === MAIN LAYOUT === */
.portal-main {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

/* === PORTAL INTRO CARD === */
.portal-intro {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.portal-intro h2 { font-size: 1rem; font-weight: 800; margin-bottom: 8px; }
.portal-intro p  { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 0; }

.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 0;
}
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.feature-item span { font-size: 1rem; flex-shrink: 0; }

/* === SECTION HEADER === */
.section-header {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border);
}

/* === EXAM GRID === */
.exam-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

/* === EXAM CARD === */
.exam-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
  min-height: 200px;
}
.exam-card.available {
  border-color: var(--primary);
  box-shadow: 0 2px 12px rgba(79,70,229,0.12);
}
.exam-card.available:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(79,70,229,0.2);
}
.exam-card.available:active {
  transform: translateY(-1px);
}
.exam-card.coming-soon {
  opacity: 0.6;
  cursor: default;
}

.exam-icon {
  font-size: 1.8em;
  margin-bottom: 4px;
  line-height: 1;
}
.exam-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
}
.exam-name-en {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}
.exam-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-top: 4px;
}
.exam-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  align-self: flex-start;
  margin-top: 6px;
}
.status-available {
  background: var(--success-light);
  color: var(--success);
}
.status-soon {
  background: var(--warning-light);
  color: var(--warning);
}
.status-progress {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* === COMING SOON MSG === */
.coming-soon-msg {
  background: #f8fafc;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 4px;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  .portal-hero h1 { font-size: 1.3em; }
  .exam-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .feature-list { grid-template-columns: 1fr; }
  .portal-main { padding: 16px 12px 48px; }
}
