:root {
  --bg: #070907;
  --card: #111812;
  --gold: #c9a24a;
  --gold2: #f0cf78;
  --green: #0f5a38;
  --white: #f8f5ed;
  --muted: #b9b4a8;
  --line: rgba(240,207,120,.24);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(18,168,106,.16), transparent 34%),
    radial-gradient(circle at top right, rgba(201,162,74,.16), transparent 35%),
    linear-gradient(180deg, #050705, #0b0f0b 55%, #050705);
  color: var(--white);
  min-height: 100vh;
}

.page {
  width: min(1200px, 94vw);
  margin: 0 auto;
  padding: 28px 0 60px;
}

.hero {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(13,18,13,.78);
  padding: 34px 22px;
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: 0 28px 80px rgba(0,0,0,.35);
}

.logo-circle {
  width: 160px;
  height: 160px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 74px;
  color: #0b0f0b;
  background: linear-gradient(145deg, var(--gold2), var(--gold));
  margin-bottom: 15px;
  box-shadow: 0 22px 52px rgba(201,162,74,.22);
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 6vw, 78px);
  letter-spacing: -2px;
  line-height: .92;
}

.hero p {
  margin: 10px 0 4px;
  color: var(--gold2);
  font-weight: 900;
  font-size: 19px;
}

.hero span { color: var(--muted); }

.plan {
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(15,90,56,.22), rgba(201,162,74,.10));
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.plan strong { display: block; color: var(--gold2); font-size: 18px; }
.plan small { font-family: Georgia, serif; font-size: 32px; color: var(--white); }
.plan ul { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.plan li { border: 1px solid rgba(255,255,255,.10); padding: 8px 10px; border-radius: 999px; color: #efe8da; background: rgba(0,0,0,.18); font-weight: 800; font-size: 12px; }

.layout {
  display: grid;
  grid-template-columns: 430px 1fr;
  gap: 22px;
  align-items: start;
}

.card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(19,27,19,.96), rgba(8,12,8,.96));
  box-shadow: 0 24px 65px rgba(0,0,0,.35);
  padding: 22px;
}

h2 { margin: 0 0 18px; }
h3 { margin: 20px 0 8px; color: var(--gold2); font-size: 13px; letter-spacing: .8px; text-transform: uppercase; }

label {
  display: block;
  color: #efe6cf;
  font-weight: 900;
  margin: 15px 0 8px;
  font-size: 13px;
}

select, textarea, input[type="file"], input[type="text"] {
  width: 100%;
  border: 1px solid rgba(240,207,120,.22);
  background: rgba(255,255,255,.045);
  color: var(--white);
  border-radius: 16px;
  padding: 13px;
  outline: none;
}

select option { color: #111; }
textarea { min-height: 95px; resize: vertical; }


.topic-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.topic-tools small {
  color: var(--muted);
  line-height: 1.4;
}

.topic-tools button {
  border: 1px solid rgba(240,207,120,.25);
  background: rgba(201,162,74,.10);
  color: var(--gold2);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.topic-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 310px;
  overflow: auto;
  padding: 2px 4px 2px 0;
}

.topic-chip {
  border: 1px solid rgba(240,207,120,.18);
  background: linear-gradient(135deg, rgba(255,255,255,.052), rgba(15,90,56,.11));
  color: #efe8da;
  border-radius: 15px;
  padding: 11px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  line-height: 1.35;
}

.topic-chip:hover,
.topic-chip.active {
  border-color: rgba(240,207,120,.62);
  background: linear-gradient(135deg, rgba(201,162,74,.20), rgba(15,90,56,.18));
  color: #fff;
}

.topic-chip span {
  color: var(--gold2);
  font-weight: 950;
  margin-right: 7px;
}

.classes, .formats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.logo-position {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.logo-position .chip:nth-child(3) {
  grid-column: 1 / -1;
}

.chip {
  border: 1px solid rgba(240,207,120,.18);
  background: rgba(255,255,255,.05);
  color: #e8e1d1;
  padding: 11px 9px;
  border-radius: 15px;
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
}

.classes .chip:nth-child(1) { background: linear-gradient(135deg, rgba(139,30,45,.26), rgba(255,255,255,.035)); }
.classes .chip:nth-child(2) { background: linear-gradient(135deg, rgba(15,90,56,.26), rgba(255,255,255,.035)); }
.classes .chip:nth-child(3) { background: linear-gradient(135deg, rgba(201,162,74,.24), rgba(255,255,255,.035)); }
.classes .chip:nth-child(4) { background: linear-gradient(135deg, rgba(16,42,67,.28), rgba(255,255,255,.035)); }
.classes .chip:nth-child(5) { background: linear-gradient(135deg, rgba(88,28,135,.26), rgba(255,255,255,.035)); }
.classes .chip:nth-child(6) { background: linear-gradient(135deg, rgba(127,29,29,.24), rgba(255,255,255,.035)); }
.classes .chip:nth-child(7) { background: linear-gradient(135deg, rgba(11,94,215,.22), rgba(255,255,255,.035)); }
.classes .chip:nth-child(8) { background: linear-gradient(135deg, rgba(59,47,47,.30), rgba(255,255,255,.035)); }
.classes .chip:nth-child(9) { background: linear-gradient(135deg, rgba(5,80,72,.25), rgba(255,255,255,.035)); }
.classes .chip:nth-child(10) { background: linear-gradient(135deg, rgba(190,18,60,.22), rgba(255,255,255,.035)); }
.classes .chip:nth-child(11) { background: linear-gradient(135deg, rgba(77,72,36,.28), rgba(255,255,255,.035)); }
.classes .chip:nth-child(12) { background: linear-gradient(135deg, rgba(31,41,55,.34), rgba(255,255,255,.035)); }

.chip.active {
  border-color: rgba(240,207,120,.78);
  box-shadow: 0 0 0 2px rgba(240,207,120,.14) inset;
  color: #fff;
}


.palette {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.swatch {
  width: 100%;
  height: 42px;
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,.16);
  cursor: pointer;
  position: relative;
  padding: 0;
}

.swatch.active {
  outline: 3px solid var(--gold2);
  outline-offset: 2px;
}

.swatch.active::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0,0,0,.8);
}

.palette-tip {
  display: block;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.45;
}

.primary, .view-card, .download, .result button, .modal button {
  appearance: none;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--gold2), var(--gold));
  color: #0b0f0b;
  font-weight: 950;
  padding: 14px 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  margin-top: 16px;
}


.text-output-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 18px 0;
}

.text-output-card {
  border: 1px solid rgba(240,207,120,.22);
  border-radius: 20px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(201,162,74,.09), rgba(15,90,56,.08)),
    rgba(255,255,255,.035);
}

.text-output-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.text-output-top strong {
  color: var(--gold2);
  font-size: 18px;
  letter-spacing: .8px;
}

.text-output-top span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .7px;
}

.text-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.text-actions button {
  margin-top: 0;
  padding: 11px 12px;
  font-size: 12px;
  border: 1px solid rgba(240,207,120,.24);
  background: rgba(255,255,255,.07);
  color: var(--white);
}

.result p {
  color: #eee9df;
  line-height: 1.6;
}

.result-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.view-card {
  background: linear-gradient(135deg, rgba(201,162,74,.22), rgba(15,90,56,.24));
  border: 1px solid rgba(240,207,120,.38);
  color: var(--gold2);
}

.loading {
  padding: 16px;
  border: 1px solid rgba(240,207,120,.24);
  border-radius: 16px;
  color: var(--gold2);
  background: rgba(201,162,74,.08);
}

.hidden { display: none !important; }

.creative-img {
  width: min(430px, 100%);
  display: block;
  border-radius: 20px;
  border: 1px solid rgba(240,207,120,.32);
  box-shadow: 0 22px 52px rgba(0,0,0,.36);
}

.download { margin-right: 10px; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(10px);
  padding: 24px;
  overflow: auto;
  z-index: 1000;
}

.modal-content {
  width: min(980px, 96vw);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #0b0f0b;
  padding: 20px;
}

.modal-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.modal-top strong { font-size: 24px; color: var(--gold2); }
.modal-img { width: min(420px, 100%); border-radius: 22px; display: block; margin: 0 auto 20px; }
.modal-text { max-width: 720px; margin: 0 auto; }

@media (max-width: 960px) {
  .layout, .plan { grid-template-columns: 1fr; flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
  .classes, .formats, .logo-position { grid-template-columns: 1fr; }
  .logo-position .chip:nth-child(3) { grid-column: auto; }
  .palette { grid-template-columns: repeat(4, 1fr); }
  .logo-circle { width: 130px; height: 130px; font-size: 60px; }
}
