/* ==========================================
   Review App - Main Stylesheet
   Theme: Dark / Accent #E60012
   ========================================== */

:root {
  --bg:        #0a0a0a;
  --bg2:       #111111;
  --bg3:       #1a1a1a;
  --surface:   #1e1e1e;
  --border:    #2a2a2a;
  --accent:    #E60012;
  --accent2:   #ff1a2a;
  --text:      #f0f0f0;
  --text2:     #aaaaaa;
  --text3:     #666666;
  --star:      #FFD700;
  --success:   #00c851;
  --radius:    12px;
  --radius-sm: 6px;
  --font-body: 'Noto Sans JP', sans-serif;
  --font-disp: 'Bebas Neue', sans-serif;
  --shadow:    0 4px 24px rgba(0,0,0,0.6);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── Container ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.container--narrow { max-width: 680px; }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

/* PC：1行レイアウト */
.header-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ロゴ */
.site-logo {
  font-family: var(--font-disp);
  font-size: 1.6rem;
  letter-spacing: .08em;
  color: var(--accent);
  white-space: nowrap;         /* ← ロゴの折り返し禁止 */
  flex-shrink: 0;              /* ← ロゴが縮まないよう固定 */
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ロゴ画像を使う場合のサイズ */
.site-logo-img {
  height: 32px;
  width: auto;
}

/* 「レビューを書く」ボタン */
.btn-post-header {
  background: var(--accent);
  color: #fff;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;         /* ← ボタンテキストの折り返し禁止 */
  transition: background .2s;
  flex-shrink: 0;
}
.btn-post-header:hover { background: var(--accent2); }

/* ==========================================
   スマートフォン：2行レイアウト
   ========================================== */
@media (max-width: 480px) {

  /* 縦並びに変更・高さを2行分に */
  .header-inner {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 16px;
    gap: 8px;
  }

  /* ロゴ行 */
  .site-logo {
    font-size: 1.4rem;
  }

  /* ボタン行：右寄せ・幅いっぱい */
  .header-nav {
    width: 100%;
    display: flex;
    justify-content: flex-end;  /* 右寄せ */
  }

  .btn-post-header {
    font-size: .82rem;
    padding: 7px 16px;
  }
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0000 50%, #0a0a0a 100%);
  padding: 64px 16px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 0%, rgba(230,0,18,0.12) 0%, transparent 70%);
}
.hero-inner { position: relative; }
.hero-title {
  font-size: clamp(2.2rem, 8vw, 4rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 12px;
}
.hero-title .accent { color: var(--accent); }
.hero-sub { color: var(--text2); font-size: 1rem; margin-bottom: 28px; }
.btn-post-hero {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 14px 36px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform .2s, background .2s;
}
.btn-post-hero:hover { background: var(--accent2); transform: translateY(-2px); }

/* ── Filter Section ── */
.filter-section {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky; top: 56px; z-index: 90;
}
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; }
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-group--sort { margin-left: auto; }
.filter-label { font-size: .75rem; color: var(--text3); text-transform: uppercase; letter-spacing: .08em; }
.filter-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: .8rem;
  color: var(--text2);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.pill:hover { border-color: var(--accent); color: var(--text); }
.pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.star-pill { color: var(--star); }
.filter-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-family: var(--font-body);
}

/* ── Main Content ── */
.main-content { padding: 28px 0 60px; }
.results-meta { margin-bottom: 16px; font-size: .85rem; color: var(--text3); }

/* ── Review Grid ── */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* ── Review Card ── */
.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .2s, border-color .2s;
  animation: fadeUp .4s ease both;
}
.review-card:hover { transform: translateY(-3px); border-color: #333; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.review-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.review-card__product { display: flex; flex-direction: column; gap: 4px; }
.badge-category {
  display: inline-block;
  background: rgba(230,0,18,0.15);
  color: var(--accent);
  border: 1px solid rgba(230,0,18,0.3);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 700;
}
.product-name { font-size: .85rem; color: var(--text2); }
.review-card__stars { display: flex; gap: 2px; }
.star { font-size: 1rem; color: var(--text3); }
.star.filled { color: var(--star); }
.review-card__title { font-size: 1rem; font-weight: 700; color: var(--text); }
.review-card__body {
  font-size: .875rem; color: var(--text2); line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* サムネイル */
.review-thumb {
  width: 80px; height: 80px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: opacity .2s;
}
.review-thumb:hover { opacity: .8; }
.review-card__footer {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
  margin-top: 4px;
}
.review-card__author { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.author-name { font-size: .85rem; font-weight: 700; }
.review-date { font-size: .75rem; color: var(--text3); }
.sns-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  font-size: .7rem; font-weight: 900;
  transition: opacity .2s;
}
.sns-link:hover { opacity: .75; }
.sns-x  { background: #000; border: 1px solid #333; }
.sns-ig { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); color:#fff; }
.sns-tt { background: #010101; border: 1px solid #333; }

/* リアクションボタン */
.review-card__reactions { display: flex; gap: 8px; }
.reaction-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .8rem;
  cursor: pointer;
  transition: all .2s;
  display: flex; align-items: center; gap: 4px;
}
.reaction-btn:hover { border-color: var(--accent); color: var(--text); }
.reaction-btn.reacted { background: rgba(230,0,18,0.12); border-color: var(--accent); color: var(--accent); }

/* ── Load More ── */
.load-more-wrap { text-align: center; margin-top: 36px; }
.btn-load-more {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text2);
  padding: 14px 48px;
  border-radius: 999px;
  font-size: .95rem;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font-body);
}
.btn-load-more:hover { border-color: var(--accent); color: var(--text); }
.btn-load-more:disabled { opacity: .5; cursor: not-allowed; }

/* ── Empty state ── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center; padding: 60px 20px;
  color: var(--text3); font-size: 1rem;
}

/* ── Modal ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.92);
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }
#modalImg { max-width: 100%; max-height: 90vh; border-radius: 8px; }
.modal-close {
  position: absolute; top: 16px; right: 20px;
  background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer;
}

/* ── Post Form Page ── */
.post-main { padding: 32px 0 80px; }
.page-title { font-size: 1.8rem; font-weight: 900; margin-bottom: 24px; }

.review-form { display: flex; flex-direction: column; gap: 24px; }
.form-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.form-section-title { font-size: 1rem; font-weight: 700; margin-bottom: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: .88rem; font-weight: 700; }
.form-label.required::after {
  content: ' *'; color: var(--accent); font-size: .8rem;
}
.form-note { font-size: .78rem; color: var(--text3); font-weight: 400; }
.form-note.optional::before { content: '（'; }
.form-note.optional::after { content: '）'; }
.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 11px 14px;
  font-size: .93rem;
  font-family: var(--font-body);
  transition: border-color .2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent);
}
.form-textarea { resize: vertical; min-height: 140px; }
.form-select--product { margin-top: 8px; }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-row .form-select { flex: 1; min-width: 140px; }

/* Star Input */
.star-input {
  display: flex; flex-direction: row-reverse;
  justify-content: flex-end; gap: 4px;
}
.star-input input { display: none; }
.star-input label {
  font-size: 2rem; color: var(--text3); cursor: pointer;
  transition: color .15s, transform .15s;
}
.star-input label:hover,
.star-input label:hover ~ label,
.star-input input:checked ~ label {
  color: var(--star);
  transform: scale(1.1);
}

/* Image Upload */
.image-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s;
  position: relative;
}
.image-upload-area:hover { border-color: var(--accent); }
.file-input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
.upload-placeholder { color: var(--text3); font-size: .9rem; }
.upload-icon { font-size: 2rem; display: block; margin-bottom: 6px; }
.image-preview-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; justify-content: flex-start; }
.preview-item {
  position: relative; width: 80px; height: 80px;
}
.preview-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.preview-remove {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px;
  background: var(--accent); color: #fff;
  border-radius: 50%; border: none; cursor: pointer;
  font-size: .7rem; display: flex; align-items: center; justify-content: center;
}

/* SNS */
.sns-inputs { display: flex; flex-direction: column; gap: 10px; }
.sns-input-row { display: flex; align-items: center; gap: 8px; }
.sns-prefix { font-size: .85rem; color: var(--text3); width: 36px; text-align: right; flex-shrink: 0; }
.sns-input-row .form-input { flex: 1; }

/* Submit Button */
.btn-submit {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 16px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background .2s, transform .15s;
  margin-top: 8px;
}
.btn-submit:hover { background: var(--accent2); transform: translateY(-1px); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }

/* Alert */
.alert { padding: 16px 20px; border-radius: var(--radius); margin-bottom: 20px; }
.alert--success { background: rgba(0,200,81,0.1); border: 1px solid rgba(0,200,81,0.3); color: #00c851; }
.alert--error { background: rgba(230,0,18,0.1); border: 1px solid rgba(230,0,18,0.3); color: #ff6666; }
.btn-back {
  display: inline-block; margin-top: 12px;
  background: var(--accent); color: #fff;
  padding: 10px 24px; border-radius: 999px; font-size: .9rem; font-weight: 700;
}

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0; }
.footer-copy { text-align: center; color: var(--text3); font-size: .8rem; }

/* ── Admin Styles ── */
.admin-body { background: #0d0d0d; color: var(--text); }
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 220px; flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-logo {
  padding: 0 20px 20px;
  font-family: var(--font-disp);
  font-size: 1.3rem; color: var(--accent);
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.admin-nav a {
  display: block; padding: 10px 20px;
  color: var(--text2); font-size: .88rem;
  transition: all .15s;
}
.admin-nav a:hover, .admin-nav a.active {
  color: var(--text); background: rgba(230,0,18,0.08);
  border-right: 3px solid var(--accent);
}
.admin-main { flex: 1; padding: 28px; max-width: 1200px; }
.admin-title { font-size: 1.5rem; font-weight: 900; margin-bottom: 20px; }
.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%; border-collapse: collapse; font-size: .85rem;
}
.admin-table th, .admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.admin-table th { color: var(--text3); font-weight: 600; white-space: nowrap; }
.admin-table tr:hover td { background: rgba(255,255,255,.02); }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: .75rem; font-weight: 700;
}
.badge-pending  { background: rgba(255,193,7,0.2); color: #ffc107; }
.badge-approved { background: rgba(0,200,81,0.2); color: #00c851; }
.badge-rejected { background: rgba(230,0,18,0.2); color: var(--accent); }
.badge-spam     { background: rgba(108,117,125,0.2); color: #888; }

.btn-sm {
  padding: 4px 10px; border-radius: 4px; font-size: .78rem; font-weight: 700;
  border: 1px solid; cursor: pointer; background: none; transition: all .15s;
}
.btn-approve { border-color: #00c851; color: #00c851; }
.btn-approve:hover { background: rgba(0,200,81,.1); }
.btn-reject  { border-color: var(--accent); color: var(--accent); }
.btn-reject:hover  { background: rgba(230,0,18,.1); }
.btn-delete  { border-color: #888; color: #888; }
.btn-delete:hover  { background: rgba(136,136,136,.1); }
.btn-primary {
  background: var(--accent); color: #fff; border: none;
  padding: 9px 20px; border-radius: 6px; cursor: pointer; font-weight: 700; font-size: .88rem;
}
.btn-primary:hover { background: var(--accent2); }

.admin-form-group { margin-bottom: 16px; }
.admin-label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 6px; }
.admin-input, .admin-select, .admin-textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 6px;
  font-family: var(--font-body); font-size: .88rem;
}
.admin-input:focus, .admin-select:focus { outline: none; border-color: var(--accent); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}
.stat-value { font-size: 2rem; font-weight: 900; color: var(--accent); }
.stat-label { font-size: .8rem; color: var(--text3); margin-top: 4px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .review-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; }
  .filter-section { position: static; }
  .admin-sidebar { display: none; }
  .admin-main { padding: 16px; }
}

/* ── 複数カテゴリバッジ ── */
.category-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.brand-name { font-size: .75rem; color: var(--text3); margin-left: 4px; }
