/* ============ G-Cosmetic Parfums — Prototyp Styles ============ */

:root {
  --bg: #121014;
  --bg-alt: #17141a;
  --card: #1e1a22;
  --card-hover: #241f29;
  --border: #2e2833;
  --gold: #c9a227;
  --gold-light: #f2d27a;
  --gold-soft: rgba(201, 162, 39, 0.15);
  --text: #f5f1ea;
  --text-muted: #a89f92;
  --text-faint: #756b60;
  --success: #6fbf73;
  --danger: #e0685f;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 30px rgba(0,0,0,0.35);
  --font-serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(circle at 20% 0%, #1c1720 0%, var(--bg) 45%);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; margin: 0 0 8px; letter-spacing: 0.3px; }
p { margin: 0 0 12px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); font-size: 13px; }

/* ---------- Buttons ---------- */
.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #1a1409;
  box-shadow: 0 6px 18px rgba(201,162,39,0.35);
}
.btn-primary:hover { box-shadow: 0 8px 22px rgba(201,162,39,0.5); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--card-hover); border-color: var(--gold); }
.btn-small { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.link-btn {
  background: none; border: none; color: var(--gold-light);
  font-size: 14px; margin: 14px auto 0; display: block; text-decoration: underline;
  text-underline-offset: 3px;
}
.icon-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all 0.15s ease;
}
.icon-btn:hover { color: var(--gold-light); border-color: var(--gold); }

/* ---------- Login Screen ---------- */
.login-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 36px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.5s ease;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--font-serif); font-size: 20px; letter-spacing: 2px; color: var(--gold-light); }
.brand-name.small { font-size: 15px; letter-spacing: 1.5px; }
.brand-sub { font-size: 11px; color: var(--text-faint); letter-spacing: 0.5px; text-transform: uppercase; }

.field { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--text-muted); }
.field input, .field textarea {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.15s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.error-msg { color: var(--danger); font-size: 13px; min-height: 18px; margin: 0 0 8px; }

.divider { display: flex; align-items: center; text-align: center; margin: 22px 0 16px; color: var(--text-faint); font-size: 12px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider span { padding: 0 12px; }

/* ---------- App Shell ---------- */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(18,16,20,0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; gap: 20px; }
.brand-compact { gap: 10px; }

.main-nav { display: flex; gap: 6px; }
.main-nav a {
  padding: 8px 16px; border-radius: 999px; font-size: 14px; color: var(--text-muted);
  transition: all 0.15s ease;
}
.main-nav a:hover { color: var(--text); background: var(--card); }
.main-nav a.active { color: #1a1409; background: linear-gradient(135deg, var(--gold-light), var(--gold)); font-weight: 600; }

.topbar-right { display: flex; align-items: center; gap: 12px; }
.points-badge {
  display: flex; align-items: center; gap: 6px;
  background: var(--gold-soft);
  border: 1px solid rgba(201,162,39,0.4);
  color: var(--gold-light);
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
}
.points-icon { font-size: 13px; }

.mobile-nav { display: none; }

.app-main { flex: 1; max-width: 1100px; margin: 0 auto; padding: 32px 24px 60px; width: 100%; animation: fadeIn 0.35s ease; }

.app-footer { text-align: center; padding: 22px; color: var(--text-faint); font-size: 12px; border-top: 1px solid var(--border); }
.app-footer span { color: var(--gold-light); }

/* ---------- Section headers ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.section-head h2 { margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: 2px; font-size: 11px; color: var(--gold); font-weight: 700; margin-bottom: 6px; display: block; }

/* ---------- Home ---------- */
.hero {
  background: linear-gradient(135deg, #241c2e 0%, #1a1520 60%, #14111a 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; right: -60px; top: -60px; width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(201,162,39,0.25), transparent 70%);
}
.hero-greeting { font-size: 26px; margin-bottom: 4px; }
.hero-sub { max-width: 480px; }

.loyalty-card {
  margin-top: 20px;
  background: linear-gradient(135deg, #2a2130, #191420);
  border: 1px solid rgba(201,162,39,0.35);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
}
.loyalty-points { font-family: var(--font-serif); font-size: 40px; color: var(--gold-light); line-height: 1; }
.loyalty-points small { font-family: var(--font-sans); font-size: 13px; color: var(--text-muted); display: block; margin-top: 4px; font-weight: 400;}
.tier-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase;
}
.tier-bronze { background: rgba(184,115,51,0.2); color: #d99a5b; }
.tier-silver { background: rgba(192,192,200,0.18); color: #d9d9e0; }
.tier-gold { background: var(--gold-soft); color: var(--gold-light); }

.progress-wrap { flex: 1; min-width: 220px; }
.progress-track { height: 8px; border-radius: 99px; background: var(--bg-alt); overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: 99px; transition: width 0.4s ease; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 28px 0; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: center; }
.stat-card .num { font-family: var(--font-serif); font-size: 28px; color: var(--gold-light); }
.stat-card .label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ---------- Product grid ---------- */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chip {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  transition: all 0.15s ease;
}
.chip:hover { border-color: var(--gold); color: var(--text); }
.chip.active { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #1a1409; border-color: transparent; font-weight: 700; }

.search-input {
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  padding: 9px 16px; color: var(--text); font-size: 14px; width: 100%; max-width: 260px;
}
.search-input:focus { outline: none; border-color: var(--gold); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(201,162,39,0.4); }
.product-visual {
  height: 170px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.product-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-family { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); font-weight: 700; }
.product-name { font-family: var(--font-serif); font-size: 18px; margin: 0; }
.product-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.product-price { font-weight: 700; color: var(--text); }
.reviewed-tag {
  font-size: 11px; color: var(--success); display: inline-flex; align-items: center; gap: 4px; font-weight: 600;
}

.stars { color: var(--gold-light); letter-spacing: 2px; font-size: 14px; }
.stars .off { color: #3a3340; }
.rating-line { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }

/* ---------- Bottle SVG common ---------- */
.bottle-svg { filter: drop-shadow(0 10px 16px rgba(0,0,0,0.4)); }

/* ---------- Modal / product detail ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(8,7,10,0.72);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto; z-index: 100;
  animation: fadeIn 0.2s ease;
  backdrop-filter: blur(3px);
}
.modal {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 22px;
  max-width: 760px; width: 100%;
  position: relative;
  box-shadow: var(--shadow);
  animation: popIn 0.25s ease;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--card); border: 1px solid var(--border); color: var(--text-muted);
  width: 34px; height: 34px; border-radius: 50%; font-size: 14px; z-index: 5;
}
.modal-close:hover { color: var(--gold-light); border-color: var(--gold); }

.detail-header { display: grid; grid-template-columns: 220px 1fr; gap: 0; }
.detail-visual {
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.06), transparent 60%);
  display: flex; align-items: center; justify-content: center;
  border-radius: 22px 0 0 0;
  padding: 20px;
}
.detail-info { padding: 28px 28px 20px 10px; }
.detail-family { font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold); font-weight: 700; margin-bottom: 6px; }
.detail-price { font-size: 22px; font-weight: 700; margin: 10px 0; }
.detail-price .size { font-size: 13px; color: var(--text-muted); font-weight: 400; margin-left: 8px; }

.notes-pyramid { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.note-row { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.note-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); width: 90px; flex-shrink: 0; }
.note-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.note-tag { background: var(--card); border: 1px solid var(--border); padding: 3px 10px; border-radius: 999px; font-size: 12px; color: var(--text-muted); }

.modal-section { padding: 0 28px 24px; }
.modal-section h3 { font-size: 16px; margin-bottom: 12px; }
.hr { height: 1px; background: var(--border); margin: 0 28px; }

.review-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.review-item:last-child { border-bottom: none; }
.review-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.review-author { font-weight: 600; font-size: 14px; }
.review-date { font-size: 12px; color: var(--text-faint); }
.review-text { font-size: 14px; color: var(--text-muted); margin: 4px 0 0; }

.feedback-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.feedback-done { background: rgba(111,191,115,0.1); border: 1px solid rgba(111,191,115,0.4); border-radius: var(--radius); padding: 18px; text-align: center; color: var(--success); font-weight: 600; }

.star-picker { display: flex; gap: 6px; font-size: 26px; margin: 10px 0 16px; }
.star-picker span { cursor: pointer; color: #3a3340; transition: color 0.1s ease, transform 0.1s ease; }
.star-picker span.active { color: var(--gold-light); }
.star-picker span:hover { transform: scale(1.1); }

.points-hint { font-size: 12px; color: var(--gold-light); background: var(--gold-soft); border-radius: 999px; padding: 4px 12px; display: inline-flex; align-items: center; gap: 4px; margin-bottom: 12px; }

/* ---------- Rewards ---------- */
.rewards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.reward-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
}
.reward-icon { font-size: 26px; }
.reward-cost { color: var(--gold-light); font-weight: 700; font-size: 15px; }
.reward-title { font-family: var(--font-serif); font-size: 17px; margin: 0; }

/* ---------- History ---------- */
.history-list { display: flex; flex-direction: column; gap: 2px; }
.history-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 4px; border-bottom: 1px solid var(--border);
}
.history-item:last-child { border-bottom: none; }
.history-desc { font-size: 14px; }
.history-date { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.history-amount { font-weight: 700; font-size: 14px; white-space: nowrap; }
.history-amount.pos { color: var(--success); }
.history-amount.neg { color: var(--danger); }

/* ---------- Account ---------- */
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.card-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.avatar-circle {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #1a1409; font-family: var(--font-serif); font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}

/* ---------- Toasts ---------- */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--card); border: 1px solid var(--gold); color: var(--text);
  padding: 14px 18px; border-radius: var(--radius-sm); box-shadow: var(--shadow);
  min-width: 240px; display: flex; align-items: center; gap: 10px;
  animation: slideIn 0.25s ease;
  font-size: 14px;
}
.toast .toast-star { color: var(--gold-light); font-size: 16px; }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .emoji { font-size: 40px; margin-bottom: 10px; }

/* ---------- Animations ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .account-grid { grid-template-columns: 1fr; }
  .detail-header { grid-template-columns: 1fr; }
  .detail-visual { border-radius: 22px 22px 0 0; height: 160px; }
  .detail-info { padding: 22px; }
}
@media (max-width: 720px) {
  .main-nav { display: none; }
  .mobile-nav {
    display: flex; justify-content: space-around;
    border-top: 1px solid var(--border);
    padding: 8px 6px;
  }
  .mobile-nav a { font-size: 12px; color: var(--text-muted); padding: 6px 10px; border-radius: 10px; }
  .mobile-nav a.active { color: var(--gold-light); font-weight: 700; }
  .app-main { padding: 22px 16px 90px; }
  .topbar-inner { padding: 12px 16px; }
  .loyalty-card { flex-direction: column; align-items: flex-start; }
}
