/* ============================================================
   Info Hub Daily News — 共通スタイル
   カラー: Primary #1F497D / Accent #4FC3F7 / BG #f5f7fa
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

:root {
  --primary:   #1F497D;
  --primary-light: #2a5c9e;
  --accent:    #4FC3F7;
  --accent-dark: #0288d1;
  --red:       #e53e3e;
  --green:     #38a169;
  --orange:    #dd6b20;
  --bg:        #f5f7fa;
  --white:     #ffffff;
  --gray-50:   #f9fafb;
  --gray-100:  #f3f4f6;
  --gray-200:  #e5e7eb;
  --gray-400:  #9ca3af;
  --gray-600:  #4b5563;
  --gray-800:  #1f2937;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius:    10px;
  --radius-sm: 6px;
}

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

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--gray-800);
  line-height: 1.6;
  font-size: 14px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ── */
.site-header {
  background: var(--primary);
  color: white;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
}

.site-logo .logo-mark {
  background: var(--accent);
  color: var(--primary);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: -0.5px;
}

.site-logo .logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.site-logo .logo-sub {
  font-size: 10px;
  opacity: 0.8;
  font-weight: 400;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-nav a, .header-nav button {
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.header-nav a:hover, .header-nav button:hover {
  color: white;
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

.header-nav .btn-login {
  border: 1px solid rgba(255,255,255,0.4);
  padding: 6px 14px;
  border-radius: 20px;
}

.header-nav .btn-login:hover {
  background: rgba(255,255,255,0.15);
}

.user-badge {
  background: var(--accent);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.plan-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}
.plan-badge.paid { background: #fbbf24; color: #78350f; }
.plan-badge.free { background: var(--gray-200); color: var(--gray-600); }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #2d6cb0 100%);
  color: white;
  padding: 32px 24px;
  text-align: center;
}

.hero h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.hero p {
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 20px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat .num {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.hero-stat .label {
  font-size: 11px;
  opacity: 0.75;
}

/* ── Search Panel ── */
.search-panel {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 24px;
  box-shadow: var(--shadow-sm);
}

.search-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 12px;
}

.search-row:last-child { margin-bottom: 0; }

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 140px;
}

.filter-group label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input[type="text"],
.filter-group input[type="date"] {
  padding: 8px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  color: var(--gray-800);
  background: white;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.filter-group select:focus,
.filter-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,195,247,0.15);
}

.filter-keyword {
  flex: 2;
  min-width: 200px;
}

.search-actions {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.btn-search {
  background: var(--primary);
  color: white;
  border: none;
  padding: 9px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  white-space: nowrap;
}

.btn-search:hover { background: var(--primary-light); }

.btn-reset {
  background: white;
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-reset:hover { border-color: var(--gray-400); color: var(--gray-800); }

.filter-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-600);
  cursor: pointer;
}

.filter-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* ── Results Header ── */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.results-count {
  font-size: 13px;
  color: var(--gray-600);
}

.results-count strong {
  color: var(--primary);
  font-size: 18px;
}

.access-notice {
  background: #fff8e1;
  border: 1px solid #fbbf24;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 12px;
  color: #78350f;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Article Grid ── */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  padding: 8px 24px 24px;
}

.article-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  border: 1px solid var(--gray-200);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-new {
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.badge-info-type {
  background: var(--primary);
  color: white;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
}

.badge-status {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
}

.badge-status.active   { background: #dcfce7; color: #166534; }
.badge-status.upcoming { background: #dbeafe; color: #1e40af; }
.badge-status.ended    { background: var(--gray-100); color: var(--gray-600); }
.badge-status.unknown  { background: var(--gray-100); color: var(--gray-600); }

.card-stars {
  margin-left: auto;
  color: #fbbf24;
  font-size: 13px;
  letter-spacing: -1px;
}

.card-location {
  font-size: 12px;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.card-meta-item {
  font-size: 11px;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 3px;
}

.deadline-urgent { color: var(--red); font-weight: 700; }
.deadline-soon   { color: var(--orange); font-weight: 700; }
.deadline-ok     { color: var(--green); }

.card-summary {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.6;
  background: var(--gray-50);
  border-radius: 6px;
  padding: 10px;
  border-left: 3px solid var(--accent);
}

.card-summary.locked {
  position: relative;
  overflow: hidden;
}

.card-summary.locked::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(transparent, white);
}

.locked-msg {
  font-size: 11px;
  color: var(--gray-400);
  text-align: center;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--gray-50);
  border-radius: 6px;
  border: 1px dashed var(--gray-200);
}

.card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.btn-detail {
  background: var(--primary);
  color: white;
  border: none;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.2s;
}

.btn-detail:hover { background: var(--primary-light); text-decoration: none; color: white; }

.btn-detail.locked {
  background: var(--gray-200);
  color: var(--gray-600);
  cursor: not-allowed;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 24px;
  flex-wrap: wrap;
}

.page-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  background: white;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  color: var(--gray-600);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); font-weight: 700; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Loading / Empty ── */
.loading-state, .empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--gray-400);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 16px; color: var(--gray-600); margin-bottom: 8px; }
.empty-state p { font-size: 13px; }

/* ── Footer ── */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 24px;
  font-size: 12px;
  margin-top: 40px;
}

.site-footer a { color: rgba(255,255,255,0.85); }

/* ── Auth Pages ── */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--primary) 0%, #2d6cb0 100%);
}

.auth-card {
  background: white;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo .logo-mark {
  background: var(--primary);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  margin-bottom: 12px;
}

.auth-logo h1 {
  font-size: 20px;
  color: var(--primary);
  font-weight: 700;
}

.auth-logo p {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 4px;
}

.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-400);
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.auth-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,195,247,0.15);
}

.btn-primary {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  margin-top: 8px;
}

.btn-primary:hover { background: var(--primary-light); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-message {
  text-align: center;
  font-size: 12px;
  color: var(--gray-600);
  margin-top: 16px;
}

.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}

.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* ── Article Detail ── */
.detail-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px;
}

.detail-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 32px;
}

.detail-header {
  border-bottom: 2px solid var(--gray-100);
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.detail-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--gray-800);
  margin-bottom: 12px;
}

.detail-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

.detail-section {
  margin-bottom: 20px;
}

.detail-section h3 {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--gray-100);
}

.detail-section p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--gray-800);
}

.detail-action-box {
  background: linear-gradient(135deg, #fff8e1, #fffde7);
  border: 1px solid #fbbf24;
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 14px;
  color: #78350f;
}

.detail-url-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}

.detail-url-link:hover { background: var(--primary-light); text-decoration: none; color: white; }

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 13px;
  margin-bottom: 16px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
}

.btn-back:hover { text-decoration: underline; }

/* ── Mypage ── */
.mypage-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px;
}

.mypage-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 16px;
}

.mypage-card h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray-100);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .site-header { padding: 0 16px; }
  .hero { padding: 24px 16px; }
  .hero h1 { font-size: 18px; }
  .search-panel { padding: 12px 16px; }
  .article-grid { grid-template-columns: 1fr; padding: 8px 16px 24px; }
  .results-header { padding: 12px 16px 8px; }
  .hero-stats { gap: 20px; }
  .hero-stat .num { font-size: 22px; }
  .auth-card { padding: 28px 20px; }
}
