/* ===== HorribleCards Homepage — Frontend Base ===== */
/* i18n hook: [data-i18n] 속성 기반 — 추후 i18n.js 로더 연결
   backend hook: 로그인/회원가입 form @submit → API 연결 예정 */

:root {
  --bg-base:    #0b0c14;
  --bg-card:    #14162a;
  --bg-nav:     #0f1022ee;
  --gold:       #c9a036;
  --gold-light: #e8c05a;
  --red:        #e8394e;
  --blue-mid:   #1e2045;
  --text-main:  #e6e6f0;
  --text-muted: #7a7a9a;
  --border:     #2a2a4a;
  --radius:     10px;
  --trans:      0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-main);
  font-family: 'Segoe UI', 'Apple SD Gothic Neo', Malgun Gothic, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

/* T070: 일본어 선택 시 Noto Sans JP 적용 */
html[lang="ja"] body {
  font-family: 'Noto Sans JP', 'Segoe UI', sans-serif;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 60px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo .logo-img {
  height: 40px;
  width: auto;
  display: block;
}
.nav-logo .logo-text {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--gold-light), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--trans), background var(--trans);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text-main);
  background: var(--blue-mid);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Language badge (placeholder) */
.lang-badge {
  background: var(--blue-mid);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color var(--trans);
}
.lang-badge:hover { border-color: var(--gold); color: var(--gold); }

/* Flag icon (vendored from flag-icons) */
.flag-icon {
  width: 16px;
  height: auto;
  border-radius: 2px;
  vertical-align: middle;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--trans);
  text-decoration: none;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), #a07820);
  color: #000;
}
.btn-gold:hover { background: linear-gradient(135deg, var(--gold-light), var(--gold)); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}
.btn-outline:hover { background: var(--gold); color: #000; }
.btn-ghost {
  background: var(--blue-mid);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text-main); }
.btn-red {
  background: linear-gradient(135deg, var(--red), #a02030);
  color: #fff;
}
.btn-red:hover { filter: brightness(1.15); }
.btn-sm { padding: 5px 14px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 80px 40px 60px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, #0b0c14 0%, rgba(11,12,20,0.85) 40%, rgba(11,12,20,0.3) 100%),
    linear-gradient(to bottom, rgba(11,12,20,0.5) 0%, transparent 30%, transparent 70%, rgba(11,12,20,0.7) 100%),
    url('../background/_e01f63c4-2cb2-4c58-b8e1-bc2e83d3422f.jpg') center/cover no-repeat;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(46, 57, 179, 0.85);
  mix-blend-mode: multiply;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 580px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(201,160,54,0.12);
  border: 1px solid rgba(201,160,54,0.3);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: 12px;
  color: var(--gold-light);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 22px;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 18px;
}
.hero-title .accent { color: var(--gold-light); }
.hero-title .brand { 
  background: linear-gradient(90deg, var(--gold-light), var(--red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 440px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.hero-stat .num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gold-light);
}
.hero-stat .label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===== SECTION COMMON ===== */
.section {
  padding: 80px 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 44px;
}
.section-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 10px;
}
.section-desc {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 480px;
  line-height: 1.7;
}

/* ===== GAMES SECTION ===== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  cursor: pointer;
  transition: transform var(--trans), border-color var(--trans), box-shadow var(--trans);
  position: relative;
  overflow: hidden;
}
.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--glow-color, transparent);
  opacity: 0;
  transition: opacity var(--trans);
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 8px 30px rgba(201,160,54,0.15);
}
.game-card:hover::before { opacity: 1; }

.game-card-icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
  display: block;
}
.game-card-icon--svg {
  font-size: 0;
  display: flex;
  align-items: center;
  height: 2.2rem;
  margin-bottom: 14px;
}
.game-card-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.game-card-name-en {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.game-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.game-card-badge {
  display: inline-block;
  margin-top: 14px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.badge-hot { background: rgba(232,57,78,0.15); color: var(--red); border: 1px solid rgba(232,57,78,0.3); }
.badge-new { background: rgba(54,180,201,0.12); color: #4ec8e0; border: 1px solid rgba(54,180,201,0.3); }
.badge-classic { background: rgba(201,160,54,0.12); color: var(--gold); border: 1px solid rgba(201,160,54,0.3); }

/* ===== NOTICE SECTION ===== */
.notice-section { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.notice-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.notice-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 8px;
  transition: background var(--trans);
  cursor: pointer;
}
.notice-item:hover { background: rgba(255,255,255,0.04); }
.notice-type {
  min-width: 52px;
  text-align: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}
.type-notice { background: rgba(201,160,54,0.15); color: var(--gold); }
.type-update { background: rgba(54,180,201,0.12); color: #4ec8e0; }
.type-event  { background: rgba(232,57,78,0.12); color: var(--red); }

.notice-title {
  flex: 1;
  font-size: 14px;
  color: var(--text-main);
}
.notice-date {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ===== DOWNLOAD SECTION ===== */
.download-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.download-card:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 20px rgba(201,160,54,0.1);
}
.download-card .platform-icon {
  font-size: 2.8rem;
  display: block;
  margin-bottom: 12px;
}
.download-card .platform-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.download-card .platform-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.qr-placeholder {
  width: 80px; height: 80px;
  margin: 0 auto 14px;
  background: repeating-conic-gradient(#2a2a4a 0% 25%, #14162a 0% 50%) 0 0 / 8px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
  color: var(--text-muted);
}

/* ===== MODAL OVERLAY ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-box {
  background: #13152a;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  width: 100%;
  max-width: 380px;
  position: relative;
  box-shadow: 0 20px 80px rgba(0,0,0,0.6);
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  width: 28px; height: 28px;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--trans), color var(--trans);
}
.modal-close:hover { background: var(--blue-mid); color: var(--text-main); }
.modal-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}
.modal-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Notice add modal — tab UI */
.notice-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 0;
  margin-top: 12px;
}
.notice-tab {
  flex: 1;
  background: var(--bg-base);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 7px 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background var(--trans), color var(--trans);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.notice-tab:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
}
.notice-tab.active {
  background: var(--bg-card);
  color: var(--gold);
  border-color: var(--border);
}
.notice-tab-dot {
  font-size: 8px;
  color: var(--gold);
}
.notice-tab-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 0 6px 6px;
  padding: 14px 12px 4px;
  margin-bottom: 12px;
}

/* Notice detail modal */
.notice-detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--text-muted);
}
.notice-detail-body {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.notice-detail-empty {
  color: var(--text-muted);
}

/* Modal form elements */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.form-input {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: border-color var(--trans);
}
.form-input:focus { border-color: var(--gold); }
.form-input::placeholder { color: #454560; }

.form-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 11px;
}
.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.social-login {
  display: flex;
  gap: 10px;
}
.social-btn {
  flex: 1;
  height: 38px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-base);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--trans), color var(--trans);
}
.social-btn:hover { border-color: var(--text-muted); color: var(--text-main); }

.modal-footer-link {
  text-align: center;
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-muted);
}
.modal-footer-link a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}
.modal-footer-link a:hover { text-decoration: underline; }

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}
.footer-links a {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--trans);
}
.footer-links a:hover { color: var(--text-main); }

/* ===== NOTICE badge SECTION WRAPPER ===== */
.section-wrapper-notice { background: #0e0f1e; }

/* ===== UTILS ===== */
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--gold-light); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav { padding: 0 16px; }
  .nav-links { display: none; }
  .hero { padding: 80px 20px 48px; }
  .hero-bg::before, .hero-bg::after { display: none; }
  .section { padding: 56px 20px; }
  .hero-stats { gap: 20px; }
  .footer { padding: 24px 20px; flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}
