:root{
  --bg:#050608;
  --text:#f5f6fc;
  --muted:#b6bed6;
  --muted2:#7d88a7;
  --stroke:rgba(255,255,255,0.06);
  --blue1:#2b64ff;
  --blue2:#4487ff;

  --card-accent: rgba(120,20,20,0.85);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  background:var(--bg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color:var(--text);
}

/* ===== Шапка ===== */
.site-header{
  position:fixed;
  top:0; left:0; right:0;
  height:60px;
  padding:12px 20px;
  display:flex;
  align-items:center;
  backdrop-filter: blur(8px) saturate(140%);
  background: rgba(6,6,6,0.45);
  z-index:80;
  border-bottom:1px solid rgba(255,255,255,0.02);
}
.header-inner{
  width:100%;
  max-width:1280px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.brand-name{ color:#fff; text-decoration:none; font-weight:600; letter-spacing:.6px; }
.header-nav{ display:flex; gap:16px; align-items:center; }
.nav-btn{ color:#cfe0ff; text-decoration:none; font-size:14px; opacity:.9; }

/* ===== PAGE ===== */
.page{
  padding-top:80px;
  display:flex;
  flex-direction:column;
  min-height:100vh;
}
.hero{
  padding:40px 16px 24px;
}
.hero-inner{
  max-width:1100px;
  margin:0 auto;
}
.hero-title{
  margin:0 0 8px;
  font-size:32px;
}
.hero-text{
  color:var(--muted);
  max-width:820px;
  line-height:1.6;
}

.layout{
  max-width:1100px;
  margin:0 auto;
  padding:0 16px 40px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:32px;
}
@media (max-width:980px){
  .layout{ grid-template-columns:1fr; }
}

/* ===== PREVIEW ===== */
.preview{
  display:flex;
  flex-direction:column;
  align-items:center;
}

/* ===== CARD (важное) ===== */
/* Карта меняет размер под экран, но внутренние элементы НЕ меняют размер */
.gift-preview-card{
  width:100%;
  max-width:820px;
  aspect-ratio: 1.586 / 1;

  position:relative;
  border-radius:34px;
  padding:28px;
  overflow:hidden;

  background:
    radial-gradient(circle at 78% 82%, var(--card-accent) 0%, transparent 55%),
    radial-gradient(circle at 10% 10%, rgba(0, 0, 0, 0.95) 0%, rgba(26, 5, 5, 0.98) 62%);

  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 26px 80px rgba(0,0,0,0.95);

  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

/* ===== фиксированные размеры текста (НЕ масштабируются) ===== */
.gift-card-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
}
.gift-card-name{
  font-size:20px;
  font-weight:50;
  line-height:1.1;
  max-width:70%;
  word-break:break-word;
  overflow-wrap:anywhere;
}
.gift-card-brand{
  font-size:16px;
  letter-spacing:2px;
  opacity:.85;
  white-space:nowrap;
}

/* центр: пожелание */
.gift-card-center{
  text-align:center;
  padding:0 8px;
}
.gift-card-wish-center{
  font-size:30px;
  font-weight:100;
  line-height:1.25;
  white-space:pre-line;
  word-break:break-word;
  overflow-wrap:anywhere;
}

/* низ: услуги слева, цена справа */
.gift-card-bottom{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
}
.gift-card-services{
  max-width:70%;
  font-size:14px;
  line-height:1.5;
  color:#d6dbf0;
  opacity:.95;
  white-space:pre-line;
  word-break:break-word;
  overflow-wrap:anywhere;
}

.gift-card-price{
  text-align:right;
  white-space:nowrap;
}
.gift-card-price-label{
  display:block;
  font-size:12px;
  color:var(--muted2);
  margin-bottom:4px;
}
.gift-card-price-value{
  font-size:20px;
  font-weight:90;
}

/* На очень узких экранах мы НЕ меняем размер текста,
   но не даём карте становиться слишком маленькой */
@media (max-width:420px){
  .gift-preview-card{ min-width: 360px; }
  .preview{ overflow:auto; width:100%; }
}

/* ===== FORM ===== */
.form .panel{
  background:linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border-radius:28px;
  padding:28px;
  box-shadow:0 0 0 1px rgba(255,255,255,0.04);
}

.field{ margin-bottom:18px; }
.label{
  display:block;
  margin-bottom:6px;
  font-size:14px;
  color:var(--muted);
}
.input,
.textarea{
  width:100%;
  padding:14px 16px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.06);
  background:#07080a;
  color:#fff;
  font-size:14px;
}
.textarea{ resize:vertical; }

.segmented{ display:flex; gap:10px; }
.seg-btn{
  padding:10px 16px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.08);
  background:transparent;
  color:#cfd6ff;
  cursor:pointer;
}
.seg-btn.is-active{
  background:#fff;
  color:#000;
}

.split{
  display:flex;
  gap:14px;
  align-items:flex-end;
  justify-content:space-between;
  flex-wrap:wrap;
}
.check{
  display:flex;
  gap:10px;
  align-items:center;
  user-select:none;
}

.field-inline{ min-width:240px; }

.actions{ margin-top:12px; }
.btn-primary{
  width:100%;
  padding:16px;
  border-radius:999px;
  border:none;
  background:linear-gradient(135deg,var(--blue1),var(--blue2));
  color:#fff;
  font-weight:600;
  cursor:pointer;
  box-shadow:0 14px 34px rgba(25,80,230,0.6);
}

.result{ margin-top:20px; }
.result-title{ margin-bottom:8px; color:var(--muted); font-size:14px; }
.result-row{ display:flex; gap:10px; }
.btn-secondary{
  padding:12px 16px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.08);
  background:#0b0c10;
  color:#fff;
  cursor:pointer;
}
.result-note{ margin-top:8px; color:var(--muted2); font-size:12px; line-height:1.5; }

.error{
  margin-top:14px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(255,59,48,0.35);
  background: rgba(255,59,48,0.12);
  color:#ffd3d0;
  font-size:13px;
  line-height:1.5;
}

.details{ margin-top:28px; }
.details-title{ margin:0 0 8px; }
.details-text{ color:var(--muted); line-height:1.6; }

/* ===== FOOTER ===== */
.mb-footer{
  width: 100%;
  background: #0a0a0c;
  padding: 32px 20px;
  margin-top: auto;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.05);
}
.mb-footer-inner{
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  color: #e6e6ea;
  font-size: 14px;
  line-height: 1.6;
}
.mb-footer-inner p{ margin:4px 0; }

/* ===== ДВЕ КНОПКИ: создать (синяя) + уточнить условия (красная) ===== */
.actions{
  margin-top:12px;
  display:flex;
  gap:12px;
  align-items:center;
}

.btn-primary,
.btn-danger{
  flex:1;
  padding:16px;
  border-radius:999px;
  border:none;
  font-weight:600;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
}

/* синяя — создать карту */
.btn-primary{
  background:linear-gradient(135deg,var(--blue1),var(--blue2));
  color:#fff;
  box-shadow:0 14px 34px rgba(25,80,230,0.6);
}

/* красная — уточнить условия */
.btn-danger{
  background:linear-gradient(135deg,#ff3b30,#d81b1b);
  color:#fff;
  box-shadow:0 14px 34px rgba(255,59,48,0.35);
}

/* на мобиле — в столбик */
@media (max-width:560px){
  .actions{ flex-direction:column; }
  .btn-primary,.btn-danger{ width:100%; }
}

