/* 파일 경로: public/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
  --bg-main: #000000;
  --bg-card: #0a0a0a;
  --bg-card-hover: #121212;
  --bg-input: #080808;

  --border-subtle: #1c1c1c;
  --border-card: #262626;
  --border-focus: #ffffff;

  --text-primary: #ffffff;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;
  --text-dim: #525252;

  --accent-green: #10B981;
  --accent-red: #EF4444;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

/* Subtle Cursor Glow (Desktop Only) */
#cursor-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.035) 0%, rgba(0, 0, 0, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  transition: transform 0.1s ease-out;
}

@media (hover: none) and (pointer: coarse) {
  #cursor-glow {
    display: none;
  }
}

/* Layout Elements */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 50;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-brand {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo-tag {
  font-size: 0.62rem;
  background: #ffffff;
  color: #000000;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
button, .btn-link {
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.2s ease;
  user-select: none;
  text-decoration: none;
}

.btn-white {
  background: #ffffff;
  color: #000000;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-white:hover {
  background: #e5e5e5;
  transform: translateY(-1px);
}

.btn-white:active {
  transform: scale(0.98);
}

.btn-outline {
  background: transparent;
  color: #ffffff;
  border: 1px solid var(--border-card);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-outline:hover {
  background: #141414;
  border-color: #555555;
}

.btn-outline:active {
  transform: scale(0.98);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 16px;
  border-radius: var(--radius-md);
}

.btn-danger:hover {
  background: #EF4444;
  color: #ffffff;
}

/* Main Container */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 80px 20px;
  position: relative;
  z-index: 1;
}

/* Hero Section */
.hero-section {
  padding: 10px 0 50px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #121212;
  border: 1px solid var(--border-card);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 8px #ffffff;
}

.hero-title {
  font-size: 2.7rem;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
  color: #ffffff;
}

.hero-title .quote-white {
  display: block;
  color: #ffffff;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 26px;
}

/* Hero Image Card */
.hero-media {
  position: relative;
}

.image-frame {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
}

.hero-main-img {
  width: 100%;
  height: auto;
  max-height: 480px;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.image-overlay-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.5) 70%, transparent 100%);
}

.overlay-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  font-size: 1.15rem;
  flex-shrink: 0;
  object-fit: cover;
}

/* Stats & Progress */
.progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 26px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 6px;
}

.progress-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.progress-val {
  font-size: 0.88rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ffffff;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #1a1a1a;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 18px;
}

.progress-fill {
  height: 100%;
  background: #ffffff;
  width: 0%;
  border-radius: 9999px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.stats-counter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}

.stat-box {
  text-align: left;
}

.stat-num {
  font-size: 1.35rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ffffff;
  letter-spacing: -0.02em;
}

.stat-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Sections */
.section-wrapper {
  padding: 50px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 36px auto;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Coin Grid & Cards */
.coin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.coin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.coin-card:hover {
  background: var(--bg-card-hover);
  border-color: #666666;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.coin-icon-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 2px 10px rgba(255, 255, 255, 0.15));
  transition: transform 0.2s ease;
}

.coin-card:hover .coin-icon-img {
  transform: scale(1.08);
}

.coin-name {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.coin-network {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* History / Feed Section */
.history-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.history-toolbar {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.filter-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-btn {
  background: #141414;
  color: var(--text-secondary);
  border: 1px solid var(--border-card);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 9999px;
}

.filter-btn:hover {
  color: #fff;
  border-color: #555;
}

.filter-btn.active {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  font-weight: 700;
}

/* Desktop Table View */
.table-wrapper {
  display: block;
  overflow-x: auto;
}

.clean-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.clean-table th {
  background: #0d0d0d;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.clean-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.clean-table tr:hover td {
  background: #0f0f0f;
}

.donor-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.donor-avatar-circle {
  width: 30px;
  height: 30px;
  background: #171717;
  border: 1px solid #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.tx-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px dashed var(--border-card);
  white-space: nowrap;
}

.tx-link:hover {
  color: #ffffff;
  border-color: #ffffff;
}

/* Mobile Card List View */
.mobile-donations-list {
  display: none;
  padding: 12px;
  flex-direction: column;
  gap: 12px;
}

.m-donation-card {
  background: #111111;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.m-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.m-donor-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m-coin-amount {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: right;
  flex-shrink: 0;
}

.m-coin-amount strong {
  font-size: 0.92rem;
  color: #ffffff;
  display: block;
}

.m-coin-amount small {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
}

.m-card-msg {
  background: #080808;
  border: 1px solid #1a1a1a;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.85rem;
  color: #e5e5e5;
  line-height: 1.5;
  word-break: break-word;
}

.m-card-bottom {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-dim);
  border-top: 1px solid #1a1a1a;
  padding-top: 8px;
}

.m-card-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

/* ==============================================================================
   🖥️ SaaS Platform Landing & Dashboard Components
   ============================================================================== */

/* Bento Grid Dashboard Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.bento-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 14px;
}

.dashboard-sidebar-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.dashboard-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  object-fit: cover;
}

.my-page-url-box {
  background: #141414;
  border: 1px dashed var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.tab-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.tab-btn {
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: var(--radius-md);
}

.tab-btn.active {
  background: #ffffff;
  color: #000000;
  font-weight: 700;
}

.wallet-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.wallet-input-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: center;
}

@media (max-width: 600px) {
  .wallet-input-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #0d0d0d;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 28px 24px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #1a1a1a;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 10;
}

.modal-close:hover {
  background: #333;
}

/* QR & Payment Info 2-Column Grid */
.qr-info-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  align-items: stretch;
  margin: 16px 0;
}

.qr-box-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.qr-frame {
  background: #ffffff;
  padding: 10px;
  border-radius: var(--radius-md);
  width: fit-content;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.payment-details-card {
  background: #121212;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
}

.detail-row {
  margin-bottom: 8px;
}

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

.detail-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.detail-amount-highlight {
  font-size: 1.3rem;
  font-weight: 900;
  color: #ffffff;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-badge-network {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #000;
  background: #fff;
  padding: 2px 7px;
  border-radius: 4px;
}

/* Forms */
.form-field {
  margin-bottom: 14px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: #ffffff;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  border-color: var(--border-focus);
}

.address-box {
  background: #080808;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  cursor: pointer;
}

.address-box:hover {
  border-color: #666;
}

.address-val {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ffffff;
}

.badge-copy {
  background: #ffffff;
  color: #000000;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 4px;
  margin-left: 8px;
  flex-shrink: 0;
}

/* Loading & Empty States */
.state-center {
  text-align: center;
  padding: 40px 20px;
}

.spinner {
  width: 26px;
  height: 26px;
  border: 3px solid #222;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px auto;
}

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

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  max-width: calc(100vw - 40px);
}

.toast {
  background: #ffffff;
  color: #000000;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 360px;
}

.toast.error {
  background: #ff3333;
  color: #ffffff;
}

@keyframes slideIn {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==============================================================================
   📱 모바일 전용 미디어 쿼리
   ============================================================================== */

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .hero-media {
    order: -1;
    max-width: 440px;
    margin: 0 auto;
  }

  .stats-counter-grid {
    gap: 8px;
  }

  .stat-num {
    font-size: 1.2rem;
  }
}

@media (max-width: 640px) {
  .table-wrapper {
    display: none !important;
  }

  .mobile-donations-list {
    display: flex !important;
  }

  .nav-container {
    padding: 12px 16px;
  }

  .logo-brand {
    font-size: 0.95rem;
  }

  .btn-white, .btn-outline {
    font-size: 0.8rem;
    padding: 8px 12px;
  }

  main {
    padding: 20px 14px 60px 14px;
  }

  .hero-title {
    font-size: 1.8rem;
    line-height: 1.25;
  }

  .hero-desc {
    font-size: 0.86rem;
  }

  .progress-card {
    padding: 16px;
  }

  .progress-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .stats-counter-grid {
    grid-template-columns: 1fr 1fr 1fr;
    padding-top: 12px;
  }

  .stat-num {
    font-size: 1rem;
  }

  .stat-sub {
    font-size: 0.65rem;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .section-subtitle {
    font-size: 0.8rem;
  }

  .coin-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .coin-card {
    padding: 16px 12px;
  }

  .coin-icon-img {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
  }

  .modal-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .modal-box {
    border-radius: var(--radius-lg);
    padding: 22px 18px;
    max-height: 88vh;
  }

  .qr-info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .payment-details-card {
    padding: 12px;
  }

  .detail-amount-highlight {
    font-size: 1.15rem;
  }

  .history-toolbar {
    padding: 14px 16px;
  }

  .filter-btn {
    font-size: 0.72rem;
    padding: 4px 10px;
  }

  #toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: 100%;
  }

  .toast {
    max-width: 100%;
  }
}
