:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(31, 41, 55, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.18);
  
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --accent-primary: #6366f1;
  --accent-cyan: #06b6d4;
  --accent-rose: #f43f5e;
  --coupang-red: #e11d48;
  --coupang-orange: #f97316;
  --rocket-blue: #0284c7;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px -5px rgba(99, 102, 241, 0.25);
  --shadow-coupang: 0 4px 15px rgba(225, 29, 72, 0.35);
}

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

body {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

/* Ambient Background Glow */
.ambient-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.glow-1 {
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent-primary) 0%, rgba(99, 102, 241, 0) 70%);
}

.glow-2 {
  bottom: 10%;
  right: -50px;
  background: radial-gradient(circle, var(--accent-cyan) 0%, rgba(6, 182, 212, 0) 70%);
}

/* App Container (Mobile First Wrapper) */
.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  padding: 24px 18px 48px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

/* Header & Profile Section */
.profile-section {
  text-align: center;
  padding: 12px 8px 20px;
}

/* Top Subtle Legal Disclosure Pill */
.top-disclosure-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.top-disclosure-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 11px;
  border-radius: var(--radius-full);
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: -0.2px;
  backdrop-filter: blur(8px);
  user-select: none;
  transition: all 0.2s ease;
}

.top-disclosure-pill i {
  font-size: 10px;
  color: #64748b;
}

.top-disclosure-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border-color: rgba(255, 255, 255, 0.16);
}

.avatar-wrapper {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
}

.avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan), var(--accent-rose));
  animation: rotateGlow 6s linear infinite;
  opacity: 0.9;
}

@keyframes rotateGlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.avatar {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 3px solid var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fbbf24;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4);
}

.channel-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
}

.badge-verified {
  color: #38bdf8;
  font-size: 16px;
}

.channel-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.channel-desc strong {
  color: #f3f4f6;
}

.guide-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(8px);
  text-align: left;
}

.guide-banner i {
  color: #38bdf8;
  font-size: 16px;
  flex-shrink: 0;
}

.guide-banner strong {
  color: #fde047;
}

/* Control Panel (Search & Category Chips) */
.control-panel {
  position: sticky;
  top: 10px;
  z-index: 100;
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(16px);
  padding: 10px 0 12px;
  margin: 0 -4px;
  border-bottom: 1px solid var(--border-color);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.search-box input {
  width: 100%;
  height: 48px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 44px 0 42px;
  font-size: 14.5px;
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
  transition: all 0.25s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}

.search-box input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), inset 0 2px 4px rgba(0,0,0,0.3);
  background: rgba(17, 24, 39, 0.95);
}

.search-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.clear-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 15px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.clear-btn:hover {
  color: var(--text-primary);
}

/* Category Tabs */
.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.chip.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

/* Result Bar */
.result-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding: 0 4px;
}

.count-text {
  font-size: 12.5px;
  color: var(--text-muted);
}

.count-text strong {
  color: var(--accent-cyan);
}

.refresh-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.3s ease, color 0.2s;
}

.refresh-btn:hover {
  color: var(--text-primary);
  transform: rotate(90deg);
}

/* Product Cards Grid */
.products-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 14px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(14px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
  box-shadow: 0 10px 28px -4px rgba(0, 0, 0, 0.6);
}

/* Card Media Header */
.card-media {
  position: relative;
  width: 100%;
  height: 220px;
  background: #1e293b;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .card-media img {
  transform: scale(1.05);
}

/* Floating Badges */
.badge-number {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #38bdf8;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 4px;
}

.badge-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #ffffff;
  font-weight: 700;
  font-size: 11.5px;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* Card Body */
.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-category {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 2px;
}

.card-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--accent-primary);
}

/* Price Section */
.price-section {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
  font-family: 'Outfit', 'Pretendard', sans-serif;
}

.discount-badge {
  color: var(--coupang-red);
  font-weight: 800;
  font-size: 20px;
}

.sale-price {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
}

.sale-price small {
  font-size: 15px;
  font-weight: 600;
  margin-left: 1px;
}

.original-price {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.rocket-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: #38bdf8;
  margin-left: auto;
}

/* Action Buttons */
.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
}

.btn-coupang {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--coupang-red), var(--coupang-orange));
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14.5px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-coupang);
  transition: all 0.2s ease;
}

.btn-coupang:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

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

.btn-share {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-share:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 16px;
  background: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  margin-top: 20px;
}

.empty-icon {
  font-size: 40px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.reset-search-btn {
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.reset-search-btn:hover {
  opacity: 0.9;
}

/* Footer & Coupang Notice */
.footer-notice {
  margin-top: auto;
  padding-top: 36px;
  text-align: center;
}

.notice-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  margin-bottom: 16px;
}

.notice-icon {
  color: var(--text-muted);
  font-size: 16px;
  flex-shrink: 0;
}

.notice-card p {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

.copyright {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.powered-by {
  font-size: 11px;
  color: #475569;
}

/* Toast Alert */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--accent-primary);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
