/* =========================================
   후후핀 (WHOWHOPIN) - Main Stylesheet
   ========================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #5b5ef4;
  --primary-dark: #3f3fd6;
  --primary-light: #ededff;
  --accent: #ff6b6b;
  --success: #22c55e;
  --warning: #f59e0b;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --bg: #f8f9ff;
  --bg-white: #ffffff;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
  --shadow: 0 4px 20px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: 0.2s ease;
  --header-h: 68px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', -apple-system, sans-serif;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(91,94,244,.35); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: var(--radius); }
.btn-block { width: 100%; border-radius: var(--radius-sm); }

/* --- Header --- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: box-shadow var(--transition);
}
.header.scrolled { box-shadow: var(--shadow); }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo a {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo-text {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.logo-sub {
  font-size: 9px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 2px;
}

.gnb { margin-left: auto; }
.gnb ul { display: flex; gap: 4px; }
.gnb ul li a {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.gnb ul li a:hover { color: var(--primary); background: var(--primary-light); }

.header-right { display: flex; align-items: center; gap: 12px; margin-left: 12px; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  z-index: 999;
  box-shadow: var(--shadow);
}
.mobile-menu.active { display: block; }
.mobile-menu ul { padding: 8px 0; }
.mobile-menu ul li a {
  display: block;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.mobile-menu ul li a:hover { background: var(--primary-light); color: var(--primary); }

/* --- Section Common --- */
.section { padding: 80px 0; }
.section:nth-child(even) { background: var(--bg-white); }

.section-header {
  text-align: center;
  margin-bottom: 48px;
  position: relative;
}
.section-title {
  font-size: 30px;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
}
.live-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  background: #fef2f2;
  color: var(--accent);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* --- Hero --- */
.hero {
  margin-top: var(--header-h);
  background: linear-gradient(135deg, #5b5ef4 0%, #8b5cf6 50%, #ec4899 100%);
  color: #fff;
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
}

.hero .container { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}

.hero-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -1px;
}
.hero-title em {
  font-style: normal;
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255,215,0,.4);
}

.hero-desc {
  font-size: 17px;
  line-height: 1.7;
  opacity: 0.9;
  margin-bottom: 36px;
}

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-cta .btn-primary { background: #fff; color: var(--primary); border-color: #fff; }
.hero-cta .btn-primary:hover { background: #f0f0ff; }
.hero-cta .btn-outline { border-color: rgba(255,255,255,.7); color: #fff; }
.hero-cta .btn-outline:hover { background: rgba(255,255,255,.15); }

.hero-badge-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.badge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  backdrop-filter: blur(4px);
  flex: 1;
  min-width: 120px;
}
.badge-icon { font-size: 22px; }
.badge-label { font-size: 13px; font-weight: 700; }

/* --- Rates Grid --- */
.rates { background: var(--bg); }

.rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.rate-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.rate-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-3px); }

.rate-card-inner {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}
.rate-icon { font-size: 32px; line-height: 1; }
.rate-info h3 { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.rate-value {
  font-size: 24px;
  font-weight: 900;
  color: var(--primary);
}

.rate-btn {
  display: block;
  text-align: center;
  padding: 10px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  transition: all var(--transition);
  border-top: 1px solid var(--border);
}
.rate-btn:hover, .rate-card:hover .rate-btn { background: var(--primary); color: #fff; }

/* --- Exchange Section --- */
.exchange { background: var(--bg-white); }

.exchange-wrap {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 32px;
  align-items: start;
}

.exchange-selector h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.product-item { display: block; cursor: pointer; }
.product-item input[type="radio"] { display: none; }

.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 10px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  text-align: center;
}
.product-item input:checked + .product-card {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(91,94,244,.12);
}
.product-item:hover .product-card { border-color: var(--primary); }

.product-icon { font-size: 26px; }
.product-name { font-size: 12px; font-weight: 600; color: var(--text-primary); line-height: 1.3; }
.product-rate {
  font-size: 13px;
  font-weight: 900;
  color: var(--primary);
}

/* --- Exchange Form --- */
.exchange-form-wrap {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.exchange-form {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.selected-product-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}
.selected-icon { font-size: 22px; }
.selected-name { font-size: 15px; font-weight: 700; flex: 1; }
.selected-rate { font-size: 13px; color: var(--text-secondary); }
.selected-rate strong { color: var(--primary); font-size: 16px; font-weight: 900; }

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91,94,244,.12);
}
.form-input::placeholder { color: var(--text-muted); }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.input-wrap { display: flex; gap: 8px; }
.input-wrap .form-input { flex: 1; }

.btn-add-card {
  padding: 0 14px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-add-card:hover { background: var(--primary); color: #fff; }

.card-list { margin-bottom: 12px; }
.card-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 13px;
}
.card-list-item span { flex: 1; font-family: monospace; }
.card-list-item button {
  color: var(--accent);
  font-size: 16px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background var(--transition);
}
.card-list-item button:hover { background: #fef2f2; }

.amount-display {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 8px;
}
.amount-face { color: var(--text-secondary); }
.amount-arrow { color: var(--text-muted); font-size: 16px; }
.amount-receive { font-weight: 700; }
.highlight { color: var(--primary); font-size: 18px; }

.form-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.form-check-wrap, .form-agree { margin-bottom: 14px; }
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.form-check input[type="checkbox"] { display: none; }
.check-custom {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}
.form-check input:checked + .check-custom {
  background: var(--primary);
  border-color: var(--primary);
}
.form-check input:checked + .check-custom::after {
  content: '✓';
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
.check-label { font-size: 13px; color: var(--text-secondary); }
.link-underline { color: var(--primary); text-decoration: underline; }

.btn-submit {
  margin-top: 8px;
  padding: 16px;
  font-size: 16px;
  font-weight: 900;
  border-radius: var(--radius);
  letter-spacing: 0.5px;
}

/* --- Process Steps --- */
.process { background: var(--bg); }

.process-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.step {
  flex: 1;
  min-width: 200px;
  max-width: 280px;
  text-align: center;
  padding: 40px 24px;
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}
.step:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-4px); }

.step-num {
  font-size: 11px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.step-icon { font-size: 42px; margin-bottom: 16px; }
.step-title { font-size: 18px; font-weight: 900; margin-bottom: 10px; }
.step-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

.step-arrow {
  font-size: 24px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* --- Status Table --- */
.status { background: var(--bg-white); }

.status-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.status-table thead tr {
  background: var(--bg);
  border-bottom: 2px solid var(--border);
}
.status-table th, .status-table td {
  padding: 14px 20px;
  text-align: left;
  white-space: nowrap;
}
.status-table th {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-table td { border-bottom: 1px solid var(--border); }
.status-table tbody tr:last-child td { border-bottom: none; }
.status-table tbody tr:hover { background: var(--bg); }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
}
.status-badge.done { background: #f0fdf4; color: var(--success); }
.status-badge.processing { background: #fffbeb; color: var(--warning); }

/* --- Notice --- */
.notice { background: var(--bg); }

.notice-list { border-radius: var(--radius); overflow: hidden; border: 1.5px solid var(--border); background: var(--bg-white); }
.notice-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.notice-item:last-child { border-bottom: none; }
.notice-item:hover { background: var(--bg); }

.notice-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  white-space: nowrap;
}
.notice-badge.new { background: #fef2f2; color: var(--accent); }
.notice-title { flex: 1; font-size: 14px; font-weight: 500; }
.notice-title:hover { color: var(--primary); text-decoration: underline; }
.notice-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* --- FAQ --- */
.faq { background: var(--bg-white); }

.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 4px;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color var(--transition);
  gap: 12px;
}
.faq-q:hover { color: var(--primary); }
.faq-arrow {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.faq-item.active .faq-arrow { transform: rotate(180deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.active .faq-a { max-height: 200px; padding-bottom: 20px; }
.faq-a p { font-size: 14px; color: var(--text-secondary); line-height: 1.8; padding: 0 4px; }

/* --- Footer --- */
.footer {
  background: #1a1a2e;
  color: rgba(255,255,255,.7);
  padding: 48px 0 24px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.footer-logo .logo-text { color: #fff; font-size: 24px; font-weight: 900; }
.footer-logo .logo-sub { color: rgba(255,255,255,.4); font-size: 10px; letter-spacing: 2px; }

.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; transition: color var(--transition); }
.footer-links a:hover { color: #fff; }

.footer-info {
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 20px;
}
.footer-info p { font-size: 12px; line-height: 2; }

.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-bottom p { font-size: 12px; }
.footer-caution { color: rgba(255,255,255,.4); }

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  max-width: 360px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s ease;
}
@keyframes modalIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-icon { font-size: 52px; margin-bottom: 16px; }
.modal-title { font-size: 22px; font-weight: 900; margin-bottom: 10px; }
.modal-msg { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 24px; }

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 900px) {
  .gnb { display: none; }
  .hamburger { display: flex; }
  .header-right .btn-sm { display: none; }

  .exchange-wrap {
    grid-template-columns: 1fr;
  }
  .exchange-form-wrap { position: static; }

  .process-steps { flex-direction: column; align-items: stretch; }
  .step { max-width: 100%; }
  .step-arrow { transform: rotate(90deg); align-self: center; }
}

@media (max-width: 600px) {
  .section { padding: 56px 0; }
  .section-title { font-size: 24px; }

  .hero { padding: 60px 0 48px; }
  .hero-badge-group { gap: 10px; }
  .badge-item { min-width: calc(50% - 8px); }

  .rates-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }

  .status-table th, .status-table td { padding: 12px 14px; }

  .footer-top { flex-direction: column; }
  .footer-bottom { flex-direction: column; }
}

/* ─── 공지사항 플로팅 모달 ─── */
.notice-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000; padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.notice-modal-overlay.open {
  opacity: 1; pointer-events: auto;
}
.notice-modal {
  background: #fff;
  border-radius: 18px;
  padding: 36px 32px 32px;
  max-width: 540px; width: 100%;
  max-height: 80vh; overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s ease;
}
.notice-modal-overlay.open .notice-modal {
  transform: translateY(0) scale(1);
}
.notice-modal-close {
  position: absolute; top: 16px; right: 18px;
  width: 32px; height: 32px;
  border-radius: 50%; border: none; background: #f1f5f9;
  font-size: 14px; color: #6b7280; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.notice-modal-close:hover { background: #e2e8f0; color: #111; }
.nm-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.nm-badge {
  font-size: 11px; font-weight: 800; padding: 3px 10px;
  border-radius: 100px; background: #e0e7ff; color: #4f46e5;
  letter-spacing: 0.3px;
}
.nm-badge.new { background: #fef3c7; color: #d97706; }
.nm-date { font-size: 13px; color: #9ca3af; }
.nm-title {
  font-size: 20px; font-weight: 800; color: #111827;
  line-height: 1.4; margin-bottom: 18px;
}
.nm-divider {
  height: 1px; background: #f1f5f9; margin-bottom: 20px;
}
.nm-content {
  font-size: 15px; color: #374151; line-height: 1.8;
  white-space: pre-wrap;
}

@media (max-width: 600px) {
  .notice-modal { padding: 28px 20px 24px; border-radius: 14px; }
  .nm-title { font-size: 17px; }
}
