/* ─── CSS Variables (다크 테마 + 서비스 그래디언트) ─────────────────── */
:root {
  --bg-primary:    #0a0a0f;
  --bg-surface:    #141420;
  --bg-card:       #1c1c2e;
  --bg-card-hover: #242440;
  --bg-input:      #252538;
  --text-primary:  #f0f0f8;
  --text-secondary:#9898b8;
  --text-muted:    #5a5a78;
  --accent:        #7c6af7;
  --accent-light:  #a89cf8;
  --accent-dim:    rgba(124,106,247,0.12);
  --accent-glow:   rgba(124,106,247,0.25);
  --success:       #34d399;
  --success-dim:   rgba(52,211,153,0.12);
  --danger:        #f87171;
  --danger-dim:    rgba(248,113,113,0.12);
  --warning:       #fbbf24;
  --warning-dim:   rgba(251,191,36,0.12);
  --info:          #60a5fa;
  --info-dim:      rgba(96,165,250,0.12);
  --orange:        #F97316;
  --orange-dim:    rgba(249,115,22,0.12);
  --border:        rgba(255,255,255,0.06);
  --border-light:  rgba(255,255,255,0.1);
  --shadow:        0 4px 24px rgba(0,0,0,0.5);
  --shadow-sm:     0 2px 8px rgba(0,0,0,0.3);
  --shadow-glow:   0 4px 16px rgba(124,106,247,0.2);
  --header-h:      56px;
  --tabbar-h:      60px;
  --radius-xs:     6px;
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     16px;
  --radius-xl:     20px;
  --radius-2xl:    24px;

  /* 서비스별 그래디언트 */
  --gradient-studio:   linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-market:   linear-gradient(135deg, #f97316, #fb923c);
  --gradient-tip:      linear-gradient(135deg, #3b82f6, #60a5fa);
  --gradient-create:   linear-gradient(135deg, #10b981, #34d399);
  --gradient-trending: linear-gradient(135deg, #ef4444, #f87171);

  /* 플랫폼별 컬러 */
  --color-coupang:  #E31837;
  --color-naver:    #03C75A;
  --color-gmarket:  #00A82D;
  --color-11st:     #FF0038;
  --color-temu:     #FB7701;
}

/* ─── Reset & Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; color: inherit; font: inherit; }
img { max-width: 100%; display: block; }
input, textarea, select { font: inherit; }

/* ─── App Shell (글래스모피즘) ─────────────────────────────────────── */
.app-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(10,10,15,0.72);
  backdrop-filter: saturate(200%) blur(24px);
  -webkit-backdrop-filter: saturate(200%) blur(24px);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
}
.header-left, .header-right {
  min-width: 44px; display: flex; align-items: center;
}
.header-right { justify-content: flex-end; }
.header-title {
  flex: 1; text-align: center;
  font-size: 15px; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.logo-text { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.logo-accent { color: var(--accent); }

.user-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent-glow); }
.user-avatar-placeholder {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gradient-studio); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

.app-main {
  padding-top: var(--header-h);
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 8px);
  min-height: 100vh;
}

/* ─── Tab Bar (글래스 5탭) ─────────────────────────────────────────── */
.tab-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  background: rgba(10,10,15,0.78);
  backdrop-filter: saturate(200%) blur(24px);
  -webkit-backdrop-filter: saturate(200%) blur(24px);
  border-top: 1px solid rgba(255,255,255,0.04);
  display: flex; align-items: flex-start;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 100;
}
.tab-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px; color: var(--text-muted);
  transition: color 0.2s, transform 0.15s;
  padding: 10px 0 6px; position: relative;
  -webkit-tap-highlight-color: transparent;
}
.tab-item:active { transform: scale(0.92); }
.tab-item span { font-size: 10px; font-weight: 500; }
.tab-item.active { color: var(--accent); }
.tab-item.active::before {
  content: ''; position: absolute;
  top: 0; left: 25%; right: 25%;
  height: 2.5px; background: var(--gradient-studio);
  border-radius: 0 0 3px 3px;
}

/* ─── Buttons ─────────────────────────────────────────────────────── */
.btn-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.btn-icon:active { background: var(--accent-dim); transform: scale(0.9); }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; height: 48px; padding: 0 24px;
  background: var(--gradient-studio); color: #fff;
  border-radius: var(--radius-md);
  font-size: 15px; font-weight: 600;
  transition: opacity 0.15s, transform 0.1s;
  width: 100%; border: none;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}
.btn-primary:active { transform: scale(0.97); opacity: 0.9; }
.btn-primary:disabled { opacity: 0.4; pointer-events: none; }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; height: 48px; padding: 0 24px;
  background: var(--bg-input); color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 15px; font-weight: 500; width: 100%;
}
.btn-secondary:active { background: var(--bg-card); }

.btn-sm {
  height: 36px; padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  transition: transform 0.1s;
}
.btn-sm:active { transform: scale(0.95); }
.btn-sm-primary { background: var(--accent); color: #fff; border: none; }
.btn-sm-secondary { background: var(--bg-input); color: var(--text-secondary); border: 1px solid var(--border); }

.btn-text-sm {
  font-size: 13px; font-weight: 600;
  color: var(--accent-light); padding: 8px 12px;
  border-radius: var(--radius-sm);
}
.btn-text-sm:active { background: var(--accent-dim); }

.btn-chip {
  height: 34px; padding: 0 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 17px; font-size: 13px; font-weight: 500;
  color: var(--text-secondary); white-space: nowrap;
  transition: all 0.2s;
}
.btn-chip.active, .btn-chip:active {
  background: var(--accent-dim); border-color: var(--accent);
  color: var(--accent-light);
}

/* ─── Cards ────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px; margin-bottom: 12px;
  transition: background 0.15s, transform 0.15s;
}
.card:active { background: var(--bg-card-hover); transform: scale(0.98); }
.card-sm {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
}

/* ─── Section ─────────────────────────────────────────────────────── */
.section { padding: 0 16px; margin-bottom: 20px; }
.section-title {
  font-size: 16px; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.section-title .section-more {
  margin-left: auto; font-size: 13px; font-weight: 500;
  color: var(--text-muted);
}

/* ─── Sub Tabs (글래스 필) ─────────────────────────────────────────── */
.sub-tabs {
  display: flex; gap: 6px; padding: 12px 16px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.sub-tabs::-webkit-scrollbar { display: none; }
.sub-tab {
  height: 38px; padding: 0 18px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 19px; font-size: 14px; font-weight: 500;
  color: var(--text-secondary); white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s;
}
.sub-tab:active { transform: scale(0.95); }
.sub-tab.active {
  background: var(--accent); border-color: var(--accent);
  color: #fff; box-shadow: 0 2px 12px rgba(124,106,247,0.3);
}

/* ─── Form ─────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--text-secondary); margin-bottom: 6px;
}
.form-control {
  width: 100%; height: 48px; padding: 0 14px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-primary);
  font-size: 15px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { height: auto; min-height: 100px; padding: 12px 14px; resize: vertical; }

.search-box {
  display: flex; gap: 8px; padding: 8px 16px;
}
.search-input {
  flex: 1; height: 44px; padding: 0 16px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 22px; color: var(--text-primary);
  font-size: 14px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background: var(--bg-input);
}
.search-input::placeholder { color: var(--text-muted); }
.search-btn {
  height: 44px; padding: 0 20px;
  background: var(--gradient-studio); color: #fff;
  border-radius: 22px; font-size: 14px; font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(99,102,241,0.25);
  transition: transform 0.1s;
}
.search-btn:active { transform: scale(0.95); }

/* ─── Validation & Alerts ─────────────────────────────────────────── */
.validation-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
.alert-error {
  background: var(--danger-dim); border: 1px solid rgba(248,113,113,0.2);
  border-radius: var(--radius-md); padding: 12px 14px;
  color: var(--danger); font-size: 14px; margin-bottom: 16px;
}

/* ─── Auth Pages ──────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 20px;
  padding-top: calc(var(--header-h) + 24px);
  padding-bottom: calc(var(--tabbar-h) + 24px);
  background:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(99,102,241,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(139,92,246,0.06) 0%, transparent 60%),
    var(--bg);
}
.auth-logo {
  font-size: 32px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.5px;
  background: linear-gradient(135deg, #818cf8, #a78bfa, #c084fc);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-logo span { -webkit-text-fill-color: var(--accent); }
.auth-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 32px; }
.auth-box {
  width: 100%; max-width: 380px;
  background: rgba(30,30,44,0.75);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-2xl); padding: 28px 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--text-muted); font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.btn-google {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; height: 50px;
  background: #fff; color: #333;
  border-radius: var(--radius-lg);
  font-size: 15px; font-weight: 600; width: 100%;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.btn-google:active { transform: scale(0.97); box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.auth-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-muted); }
.auth-footer a { color: var(--accent-light); font-weight: 500; }
.checkbox-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--text-secondary); margin-bottom: 12px;
}
.checkbox-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.terms-section {
  margin-top: 4px; padding: 16px; border-radius: var(--radius-md);
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.04);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.terms-section .checkbox-row:last-of-type { margin-bottom: 0; }
.terms-highlight {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(248,113,113,0.2) !important;
}
/* ─── Social Buttons ─────────────────────────────────────────────── */
.social-buttons { display: flex; flex-direction: column; gap: 12px; }
.btn-social {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; height: 50px; width: 100%;
  border-radius: var(--radius-lg);
  font-size: 15px; font-weight: 600;
  border: none; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.btn-social:active { transform: scale(0.97); }

.btn-social-google {
  background: #fff; color: #333;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.btn-social-naver {
  background: #03C75A; color: #fff;
  box-shadow: 0 2px 8px rgba(3,199,90,0.3);
}
.btn-social-kakao {
  background: #FEE500; color: #3C1E1E;
  box-shadow: 0 2px 8px rgba(254,229,0,0.3);
}
.btn-social-email {
  background: rgba(255,255,255,0.08); color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-social-email:active { background: rgba(255,255,255,0.12); }

/* ─── Social Profile Card (RegisterComplete) ────────────────────── */
.social-profile-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
.social-profile-img {
  width: 52px; height: 52px; border-radius: 50%;
  object-fit: cover; border: 2px solid rgba(255,255,255,0.1);
}
.social-profile-placeholder {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
}
.social-profile-info { flex: 1; min-width: 0; }
.social-profile-name { font-weight: 600; font-size: 16px; margin-bottom: 2px; }
.social-profile-email { font-size: 13px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
.social-provider-badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 10px; margin-top: 6px;
}
.badge-google { background: rgba(66,133,244,0.15); color: #7aafff; }
.badge-naver { background: rgba(3,199,90,0.15); color: #4dd88a; }
.badge-kakao { background: rgba(254,229,0,0.15); color: #d4c000; }

/* ─── Alert Social Hint ─────────────────────────────────────────── */
.alert-info-social {
  background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-md); padding: 12px 14px;
  color: #a5b4fc; font-size: 14px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}

/* ─── Dashboard (Home) ────────────────────────────────────────────── */
.dash-page { padding: 12px 16px; }

.dash-greeting {
  padding: 24px 20px; margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(99,102,241,0.18) 0%, rgba(139,92,246,0.12) 50%, rgba(96,165,250,0.08) 100%);
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: var(--radius-xl);
  position: relative; overflow: hidden;
}
.dash-greeting::before {
  content: ''; position: absolute;
  top: -50%; right: -30%; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(124,106,247,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.dash-greeting h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; position: relative; }
.dash-greeting p { font-size: 14px; color: var(--text-secondary); position: relative; }

/* 벤토 그리드 통계 카드 */
.stat-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 24px;
}
.stat-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 18px 16px;
  display: flex; flex-direction: column; gap: 10px;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative; overflow: hidden;
}
.stat-card:active { transform: scale(0.96); }
.stat-card::after {
  content: ''; position: absolute;
  top: 0; right: 0; width: 80px; height: 80px;
  border-radius: 50%;
  opacity: 0.06; filter: blur(20px);
}

/* 서비스별 그래디언트 스탯 카드 */
.stat-card.studio {
  background: linear-gradient(135deg, rgba(99,102,241,0.12) 0%, rgba(139,92,246,0.06) 100%);
  border-color: rgba(99,102,241,0.18);
}
.stat-card.studio::after { background: #6366f1; }
.stat-card.studio:active { box-shadow: 0 4px 20px rgba(99,102,241,0.2); }

.stat-card.market {
  background: linear-gradient(135deg, rgba(249,115,22,0.12) 0%, rgba(251,146,60,0.06) 100%);
  border-color: rgba(249,115,22,0.18);
}
.stat-card.market::after { background: #f97316; }
.stat-card.market:active { box-shadow: 0 4px 20px rgba(249,115,22,0.2); }

.stat-card.create {
  background: linear-gradient(135deg, rgba(16,185,129,0.12) 0%, rgba(52,211,153,0.06) 100%);
  border-color: rgba(16,185,129,0.18);
}
.stat-card.create::after { background: #10b981; }
.stat-card.create:active { box-shadow: 0 4px 20px rgba(16,185,129,0.2); }

.stat-card.tip {
  background: linear-gradient(135deg, rgba(59,130,246,0.12) 0%, rgba(96,165,250,0.06) 100%);
  border-color: rgba(59,130,246,0.18);
}
.stat-card.tip::after { background: #3b82f6; }
.stat-card.tip:active { box-shadow: 0 4px 20px rgba(59,130,246,0.2); }

.stat-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}
.stat-icon.purple { background: rgba(99,102,241,0.18); color: #818cf8; }
.stat-icon.orange { background: rgba(249,115,22,0.18); color: #fb923c; }
.stat-icon.green  { background: rgba(16,185,129,0.18); color: #34d399; }
.stat-icon.blue   { background: rgba(59,130,246,0.18); color: #60a5fa; }
.stat-value { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-trend {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600; margin-left: 6px;
}
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* 피드 아이템 */
.feed-item {
  display: flex; gap: 12px; padding: 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 10px;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s, background 0.15s;
}
.feed-item:active { background: var(--bg-card-hover); transform: scale(0.98); }
.feed-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 18px;
}
.feed-thumb {
  width: 64px; height: 48px; border-radius: var(--radius-sm);
  object-fit: cover; flex-shrink: 0; background: var(--bg-input);
}
.feed-body { flex: 1; min-width: 0; }
.feed-title {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.feed-desc {
  font-size: 12px; color: var(--text-muted); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ─── Quick Actions (그래디언트 원형 아이콘) ──────────────────────── */
.quick-actions {
  display: flex; gap: 14px;
  overflow-x: auto; padding: 4px 0 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.quick-actions::-webkit-scrollbar { display: none; }
.quick-action {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; min-width: 64px;
  -webkit-tap-highlight-color: transparent;
}
.quick-action:active .quick-action-icon { transform: scale(0.88); }
.quick-action-icon {
  width: 52px; height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  transition: transform 0.15s;
}
/* 그래디언트 아이콘 변형 */
.quick-action-icon.grad-orange  { background: var(--gradient-market); }
.quick-action-icon.grad-red     { background: var(--gradient-trending); }
.quick-action-icon.grad-green   { background: var(--gradient-create); }
.quick-action-icon.grad-purple  { background: var(--gradient-studio); }
.quick-action-icon.grad-blue    { background: var(--gradient-tip); }
.quick-action-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }

/* ─── Insight (Studio) Pages ──────────────────────────────────────── */
.insight-page { padding: 0; }

.channel-card {
  display: flex; gap: 14px; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; margin: 0 16px 10px;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s;
}
.channel-card:active { background: var(--bg-card-hover); transform: scale(0.98); }
.channel-thumb {
  width: 52px; height: 52px; border-radius: 50%;
  object-fit: cover; background: var(--bg-input); flex-shrink: 0;
  border: 2px solid rgba(99,102,241,0.2);
}
.channel-thumb-placeholder {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--gradient-studio); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; font-weight: 700;
}
.channel-info { flex: 1; overflow: hidden; }
.channel-name {
  font-size: 15px; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.channel-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.channel-stats {
  display: flex; gap: 8px; margin-top: 6px;
}
.channel-stat-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 10px;
  background: var(--accent-dim); color: var(--accent-light);
}

.video-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  margin: 0 16px 10px;
  transition: transform 0.15s;
}
.video-card:active { transform: scale(0.98); }
.video-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--bg-input); }
.video-info { padding: 12px 14px; }
.video-title {
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.video-meta {
  font-size: 12px; color: var(--text-muted); margin-top: 6px;
  display: flex; gap: 10px;
}

/* ─── Market Pages ────────────────────────────────────────────────── */
.market-page { padding: 0; }

.platform-chips {
  display: flex; gap: 8px;
  overflow-x: auto; padding: 4px 16px 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.platform-chips::-webkit-scrollbar { display: none; }
/* 플랫폼별 컬러 칩 */
.btn-chip[data-platform="coupang"].active { background: rgba(227,24,55,0.15); border-color: var(--color-coupang); color: var(--color-coupang); }
.btn-chip[data-platform="naver"].active { background: rgba(3,199,90,0.15); border-color: var(--color-naver); color: var(--color-naver); }
.btn-chip[data-platform="gmarket"].active { background: rgba(0,168,45,0.15); border-color: var(--color-gmarket); color: var(--color-gmarket); }
.btn-chip[data-platform="11st"].active { background: rgba(255,0,56,0.15); border-color: var(--color-11st); color: var(--color-11st); }
.btn-chip[data-platform="temu"].active { background: rgba(251,119,1,0.15); border-color: var(--color-temu); color: var(--color-temu); }

.product-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px; margin: 0 16px 10px;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s;
}
.product-card:active { transform: scale(0.98); }
.product-img {
  width: 88px; height: 88px; border-radius: var(--radius-md);
  object-fit: cover; background: var(--bg-input); flex-shrink: 0;
}
.product-img-placeholder {
  width: 88px; height: 88px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--bg-input), var(--bg-card-hover));
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; color: var(--text-muted); opacity: 0.4;
}
.product-body { flex: 1; min-width: 0; }
.product-name {
  font-size: 14px; font-weight: 500; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 8px;
}
.product-price { font-size: 20px; font-weight: 800; color: var(--text-primary); }
.product-original-price {
  font-size: 13px; color: var(--text-muted);
  text-decoration: line-through; margin-left: 6px;
}
.product-discount {
  display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 700;
  color: var(--danger); margin-right: 6px;
}
.product-platform {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 6px;
  margin-top: 8px;
}
/* 플랫폼별 뱃지 색상 */
.product-platform.coupang  { background: rgba(227,24,55,0.12); color: var(--color-coupang); }
.product-platform.naver    { background: rgba(3,199,90,0.12); color: var(--color-naver); }
.product-platform.gmarket  { background: rgba(0,168,45,0.12); color: var(--color-gmarket); }
.product-platform.temu     { background: rgba(251,119,1,0.12); color: var(--color-temu); }
.product-platform.default  { background: var(--accent-dim); color: var(--accent-light); }
.product-meta { display: flex; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--text-muted); }
.product-meta .badge-shipping {
  color: var(--success); font-weight: 600;
}

.alert-card, .recurring-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; margin: 0 16px 10px;
  display: flex; align-items: center; gap: 14px;
  transition: transform 0.15s;
}
.alert-card:active, .recurring-card:active { transform: scale(0.98); }
.alert-card .alert-info, .recurring-card .recurring-info { flex: 1; min-width: 0; }
.alert-card .alert-name, .recurring-card .recurring-name {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.alert-card .alert-detail, .recurring-card .recurring-detail {
  font-size: 12px; color: var(--text-muted); margin-top: 3px;
}
.alert-actions { display: flex; gap: 8px; }

/* ─── Tip Pages ───────────────────────────────────────────────────── */
.tip-page { padding: 0; }

/* 팁 히어로 카드 (인기 첫 번째) */
.tip-hero-card {
  position: relative; margin: 0 16px 14px;
  border-radius: var(--radius-xl); overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s;
}
.tip-hero-card:active { transform: scale(0.98); }
.tip-hero-cover {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card-hover));
  object-fit: cover;
}
.tip-hero-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 40px 16px 16px;
  background: linear-gradient(transparent, rgba(10,10,15,0.9));
}
.tip-hero-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 8px;
  background: var(--gradient-trending); color: #fff;
  margin-bottom: 8px;
}
.tip-hero-title {
  font-size: 18px; font-weight: 700; line-height: 1.3;
  color: #fff; margin-bottom: 8px;
}
.tip-hero-meta {
  display: flex; gap: 10px; font-size: 12px; color: rgba(255,255,255,0.7);
}

/* 일반 팁 카드 */
.tip-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; margin: 0 16px 10px;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s, background 0.15s;
}
.tip-card:active { background: var(--bg-card-hover); transform: scale(0.98); }
.tip-card-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.tip-author-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gradient-tip); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.tip-author-name { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.tip-author-date { font-size: 11px; color: var(--text-muted); }
.tip-title {
  font-size: 15px; font-weight: 700; line-height: 1.4;
  margin-bottom: 6px;
}
.tip-summary {
  font-size: 13px; color: var(--text-secondary); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 10px;
}
.tip-cover {
  width: 100%; aspect-ratio: 2/1; border-radius: var(--radius-md);
  object-fit: cover; background: var(--bg-input);
  margin-bottom: 12px;
}
.tip-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tip-tag {
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  background: var(--accent-dim); color: var(--accent-light);
  border-radius: 10px;
}
.tip-footer {
  display: flex; gap: 16px; font-size: 12px; color: var(--text-muted);
  padding-top: 10px; border-top: 1px solid var(--border);
}
.tip-footer span { display: flex; align-items: center; gap: 4px; }

/* 팁 디테일 */
.tip-detail-page { padding: 16px; }
.tip-detail-title { font-size: 22px; font-weight: 800; line-height: 1.3; margin-bottom: 12px; }
.tip-detail-meta {
  display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-muted);
  margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.tip-detail-author-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gradient-tip); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; flex-shrink: 0;
}
.tip-detail-content {
  font-size: 15px; line-height: 1.8; color: var(--text-primary);
}
.tip-detail-content p { margin-bottom: 14px; }
.tip-detail-content h2 { font-size: 18px; font-weight: 700; margin: 24px 0 10px; }
.tip-detail-content h3 { font-size: 16px; font-weight: 600; margin: 20px 0 8px; }
.tip-detail-content a { color: var(--accent-light); text-decoration: underline; }
.tip-detail-content code {
  background: var(--bg-input); padding: 2px 6px;
  border-radius: 4px; font-size: 13px;
}
.tip-detail-content pre {
  background: var(--bg-input); padding: 14px;
  border-radius: var(--radius-md); overflow-x: auto;
  margin: 14px 0; font-size: 13px;
}
.tip-detail-actions {
  display: flex; gap: 10px; margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--border);
}
.tip-action-btn {
  flex: 1; height: 44px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600; color: var(--text-secondary);
  transition: all 0.15s;
}
.tip-action-btn:active { background: var(--accent-dim); color: var(--accent-light); transform: scale(0.96); }
.tip-action-btn.active { background: var(--accent-dim); color: var(--accent-light); border-color: var(--accent); }

/* ─── More Page (그래디언트 프로필) ──────────────────────────────── */
.more-page { padding: 16px; }

.profile-card {
  position: relative;
  background: linear-gradient(135deg, rgba(99,102,241,0.15) 0%, rgba(139,92,246,0.1) 50%, rgba(96,165,250,0.06) 100%);
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: var(--radius-xl); padding: 24px 20px;
  margin-bottom: 24px; overflow: hidden;
}
.profile-card::before {
  content: ''; position: absolute;
  top: -40%; right: -20%; width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(124,106,247,0.12) 0%, transparent 70%);
  border-radius: 50%;
}
.profile-top {
  display: flex; align-items: center; gap: 16px; position: relative;
}
.profile-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  object-fit: cover; border: 3px solid rgba(99,102,241,0.3);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.profile-avatar-placeholder {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--gradient-studio); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}
.profile-name { font-size: 18px; font-weight: 700; }
.profile-email { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

.menu-section { margin-bottom: 24px; }
.menu-section-title {
  font-size: 12px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.8px; margin-bottom: 10px; padding-left: 4px;
}
.menu-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 6px; -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s, background 0.15s;
}
.menu-item:active { background: var(--bg-card-hover); transform: scale(0.98); }
.menu-icon {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.menu-label { font-size: 14px; font-weight: 600; flex: 1; }
.menu-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.menu-arrow { color: var(--text-muted); }

/* ─── Creator Pages ───────────────────────────────────────────────── */
.creator-page { padding: 16px; }
.creator-hero {
  background: linear-gradient(135deg, rgba(16,185,129,0.12) 0%, rgba(52,211,153,0.06) 100%);
  border: 1px solid rgba(16,185,129,0.15);
  border-radius: var(--radius-xl); padding: 28px 20px;
  margin-bottom: 24px; text-align: center;
  position: relative; overflow: hidden;
}
.creator-hero::before {
  content: ''; position: absolute;
  top: -30%; right: -20%; width: 150px; height: 150px;
  background: radial-gradient(circle, rgba(52,211,153,0.12) 0%, transparent 70%);
  border-radius: 50%;
}
.creator-hero h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; position: relative; }
.creator-hero p { font-size: 14px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 16px; position: relative; }

.step-indicator {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-bottom: 24px;
}
.step-dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  border: 2px solid var(--border); color: var(--text-muted);
  background: var(--bg-card); flex-shrink: 0;
  transition: all 0.2s;
}
.step-dot.active { background: var(--gradient-studio); border-color: transparent; color: #fff; box-shadow: 0 2px 10px rgba(99,102,241,0.3); }
.step-dot.done { background: var(--gradient-create); border-color: transparent; color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--border); max-width: 40px; }
.step-line.done { background: var(--success); }

.select-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 16px;
}
.select-option {
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px 10px;
  text-align: center; cursor: pointer;
  transition: all 0.2s;
  font-size: 14px; font-weight: 500;
}
.select-option:active { transform: scale(0.96); }
.select-option.selected {
  border-color: var(--accent); background: var(--accent-dim); color: var(--accent-light);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.select-option .option-icon { font-size: 28px; margin-bottom: 8px; }

/* ─── Loading & States ────────────────────────────────────────────── */
.loading-spinner {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 40px 20px; gap: 16px;
  color: var(--text-muted); font-size: 14px;
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text.short { width: 60%; }
.skeleton-card {
  height: 88px; border-radius: var(--radius-lg);
  margin: 0 16px 10px;
}

.empty-state {
  text-align: center; padding: 48px 20px; color: var(--text-muted);
}
.empty-state svg { opacity: 0.3; margin-bottom: 12px; }
.empty-state p { font-size: 14px; line-height: 1.5; }

/* ─── Image Generator ─────────────────────────────────────────────── */
.image-result {
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border);
  margin-top: 16px;
}
.image-result img { width: 100%; display: block; }
.image-result-footer { padding: 12px; display: flex; gap: 8px; }

/* ─── Scroll Animations ───────────────────────────────────────────── */
.fade-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.fade-up.visible {
  opacity: 1; transform: translateY(0);
}
.fade-up:nth-child(2) { transition-delay: 0.05s; }
.fade-up:nth-child(3) { transition-delay: 0.1s; }
.fade-up:nth-child(4) { transition-delay: 0.15s; }

/* ─── Utilities ───────────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent-light); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-center { text-align: center; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.p-4 { padding: 16px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.gap-2 { gap: 8px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

.badge {
  display: inline-flex; align-items: center;
  height: 22px; padding: 0 10px;
  border-radius: 11px; font-size: 11px; font-weight: 700;
}
.badge-accent { background: var(--accent-dim); color: var(--accent-light); }
.badge-success { background: var(--success-dim); color: var(--success); }
.badge-danger { background: var(--danger-dim); color: var(--danger); }
.badge-warning { background: var(--warning-dim); color: var(--warning); }

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

/* ─── Toast Notification ──────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: rgba(20,20,32,0.95); border: 1px solid var(--border-light);
  backdrop-filter: blur(12px);
  color: var(--text-primary); padding: 12px 24px; border-radius: 24px;
  font-size: 14px; font-weight: 500; z-index: 9999; white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transition: opacity 0.3s;
  pointer-events: none;
}
.toast.error { border-color: var(--danger); }
.toast.success { border-color: var(--success); }

/* ─── Bottom Sheet ────────────────────────────────────────────────── */
.bottom-sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200; opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.bottom-sheet-overlay.active { opacity: 1; pointer-events: auto; }
.bottom-sheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  padding: 16px; z-index: 201;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
  max-height: 80vh; overflow-y: auto;
}
.bottom-sheet.active { transform: translateY(0); }
.bottom-sheet-handle {
  width: 36px; height: 4px;
  background: var(--border-light); border-radius: 2px;
  margin: 0 auto 16px;
}

/* ─── Responsive ──────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .app-main { max-width: 480px; margin: 0 auto; }
  .tab-bar { max-width: 480px; left: 50%; transform: translateX(-50%); border-radius: 20px 20px 0 0; }
  .app-header { max-width: 480px; left: 50%; transform: translateX(-50%); border-radius: 0 0 12px 12px; }
}

/* ─── Scrollbar ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 0; height: 0; }

/* ─── Pull to Refresh indicator ───────────────────────────────────── */
.ptr-indicator {
  display: flex; align-items: center; justify-content: center;
  padding: 12px; color: var(--text-muted); font-size: 13px;
  transition: opacity 0.2s;
}
