
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
  color-scheme: light;
  --bg: #f5efe8;
  --surface: #fffdf9;
  --surface-2: #f0e7dc;
  --border: #e7dbcd;
  --text: #302a26;
  --muted: #81756c;
  --accent: #a66c4d;
  --accent-2: #80513b;
  --radius: 20px;
}

* { box-sizing: border-box; }

html { min-height: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 15% 0%, #fffaf1, transparent 45%),
    var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.6;
}

button, input, select, textarea { font: inherit; }
button, select, input[type="radio"], input[type="file"] { cursor: pointer; }

.topbar {
  min-height: 76px;
  padding: 16px 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 253, 249, .88);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
}

.brand-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #c89570, #9b6549);
  color: white;
  font-size: 26px;
}

.brand small {
  display: block;
  align-self: center;
  color: var(--muted);
  font: 600 9px 'DM Sans', sans-serif;
  letter-spacing: 1.5px;
}

.top-note { color: var(--muted); font-size: 13px; }
.page { width: min(1160px, 90%); margin: 0 auto; }
.hero { padding: 68px 0 38px; text-align: center; }

.eyebrow {
  margin: 0 0 13px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.2px;
}

h1, h2, h3 { font-family: 'Playfair Display', serif; }

.hero h1 {
  margin: 0;
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.12;
  letter-spacing: -1.5px;
}

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

.intro {
  max-width: 560px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 16px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 22px;
  align-items: start;
  padding-bottom: 42px;
}

.panel, .result-panel {
  min-width: 0;
  padding: 27px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 35px rgba(75, 48, 29, .06);
}

.panel h2, .result-panel h2 {
  margin: 0 0 23px;
  font-size: 23px;
}

.field-label {
  display: block;
  margin: 20px 0 9px;
  font-size: 13px;
  font-weight: 600;
}

.optional { color: var(--muted); font-weight: 400; }

.upload {
  min-height: 165px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed #c6a58e;
  border-radius: 16px;
  background: #fcf7f0;
  text-align: center;
  cursor: pointer;
  transition: .2s ease;
}

.upload:hover, .upload:focus-within {
  border-color: var(--accent);
  background: #f8eee3;
}

.upload input[type="file"] {
  max-width: 100%;
  color: var(--muted);
  font-size: 12px;
}

.upload-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f0dfd0;
  color: var(--accent-2);
  font-size: 24px;
}

.upload strong { font-size: 13px; }
.upload > span:not(.upload-icon) { color: var(--muted); font-size: 11px; }

#preview {
  width: 100%;
  max-height: 230px;
  object-fit: contain;
  border-radius: 12px;
}

select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fffdf9;
  color: var(--text);
  outline: none;
}

select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(166, 108, 77, .12);
}

textarea { resize: vertical; }

.styles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.style-option {
  min-width: 0;
  min-height: 103px;
  padding: 12px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #fffdf9;
  text-align: center;
  cursor: pointer;
  transition: .2s ease;
}

.style-option:hover { border-color: #c6a58e; }

.style-option:has(input:checked) {
  border-color: var(--accent);
  background: #f8eee5;
  box-shadow: inset 0 0 0 1px rgba(166, 108, 77, .15);
}

.style-option input { accent-color: var(--accent); }
.style-option b { font-size: 12px; }
.style-option small { color: var(--muted); font-size: 10px; }

.swatch {
  width: 27px;
  height: 27px;
  border: 2px solid rgba(0, 0, 0, .08);
  border-radius: 9px;
}

.minimal { background: linear-gradient(135deg, #f2eadc, #b8b5aa); }
.boho { background: linear-gradient(135deg, #c68b61, #60765c); }
.scandi { background: linear-gradient(135deg, #f6f1e8, #a4c2c1); }
.luxe { background: linear-gradient(135deg, #d5b879, #4c3d32); }
.industrial { background: linear-gradient(135deg, #89919b, #343a47); }
.indian { background: linear-gradient(135deg, #e7a447, #a83d43); }

#generate-btn {
  width: 100%;
  margin-top: 23px;
  padding: 15px 18px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(100deg, #a66c4d, #c08a65);
  color: white;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(166, 108, 77, .17);
  transition: transform .2s, box-shadow .2s;
}

#generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(166, 108, 77, .25);
}

#generate-btn:disabled { opacity: .65; cursor: wait; transform: none; }

.privacy, .status { color: var(--muted); font-size: 11px; }
.privacy { margin-bottom: 0; text-align: center; }
.status:empty { display: none; }

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

.result-heading h2 { margin-bottom: 20px; }
.sparkle { color: var(--accent); font-size: 27px; }

.result-area {
  min-height: 340px;
  padding: 17px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #faf5ed;
  text-align: center;
}

.result-area > img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
  border-radius: 12px;
}

.result-area h3 { margin: 20px 0 4px; font-size: 17px; }
.result-area p { margin: 0; color: var(--muted); font-size: 12px; }

.empty-art {
  position: relative;
  width: min(100%, 330px);
  height: 210px;
  overflow: hidden;
  border: 1px solid #e6d9c9;
  border-radius: 13px;
  background: linear-gradient(150deg, #e9ddce, #c8b6a0 68%);
}

.sun {
  position: absolute;
  top: 19px;
  right: 32px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f8e4b7, #d8a46e);
}

.art-window {
  position: absolute;
  top: 24px;
  left: 22px;
  width: 95px;
  height: 91px;
  border: 5px solid #f7f0e6;
  border-radius: 4px;
  background: linear-gradient(145deg, #c4d8d1, #86a79d);
}

.art-window span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 48%;
  border-left: 3px solid #f7f0e6;
}

.art-frame {
  position: absolute;
  top: 26px;
  left: 145px;
  width: 57px;
  height: 72px;
  border: 5px solid #a66c4d;
  background: linear-gradient(145deg, #e5c6a7, #b77d59);
}

.plant {
  position: absolute;
  bottom: 46px;
  left: 24px;
  width: 45px;
  height: 55px;
  border-bottom: 22px solid #b77c58;
  border-radius: 0 0 8px 8px;
}

.plant i {
  position: absolute;
  bottom: 23px;
  left: 17px;
  width: 13px;
  height: 33px;
  border-radius: 100% 0 100% 0;
  background: #71977a;
  transform: rotate(-22deg);
}

.plant i:nth-child(2) { transform: rotate(32deg); left: 3px; height: 27px; }
.plant i:nth-child(3) { transform: rotate(62deg); left: 24px; height: 28px; }
.plant i:nth-child(4) { transform: rotate(-52deg); left: 8px; height: 23px; }

.sofa {
  position: absolute;
  right: 23px;
  bottom: 42px;
  width: 170px;
  height: 62px;
  border-radius: 13px 13px 7px 7px;
  background: linear-gradient(180deg, #d5b69b, #b48d70);
}

.sofa div {
  position: absolute;
  top: 7px;
  bottom: 5px;
  width: 30%;
  border-radius: 6px;
  background: rgba(255, 255, 255, .2);
}

.sofa div:nth-child(1) { left: 5px; }
.sofa div:nth-child(2) { left: 35%; }
.sofa div:nth-child(3) { right: 5px; }

.table {
  position: absolute;
  right: 73px;
  bottom: 23px;
  width: 62px;
  height: 18px;
  border-radius: 50%;
  background: #8d644b;
}

.rug {
  position: absolute;
  right: 18px;
  bottom: 11px;
  width: 196px;
  height: 28px;
  border-radius: 50%;
  background: rgba(166, 108, 77, .17);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.secondary, .text-button {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
}

.text-button { background: transparent; color: var(--muted); }

.tip {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding: 15px;
  border: 1px solid #eadbcc;
  border-radius: 13px;
  background: #fcf7f0;
}

.tip > span { color: var(--accent); }
.tip p { margin: 0; color: var(--muted); font-size: 12px; }
.tip b { color: var(--text); }

footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 24px 0 30px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

/* If the sidebar HTML is still present, hide it for the classic layout. */
.sidebar,
.mobile-menu {
  display: none !important;
}

.app-shell {
  margin-left: 0 !important;
}

.app-shell .brand {
  display: inline-flex;
}

.app-shell .page {
  width: min(1160px, 90%);
}

.app-shell .topbar {
  padding: 16px 6%;
}

@media (max-width: 820px) {
  .workspace { grid-template-columns: 1fr; }
  .hero { padding-top: 50px; }
  .panel, .result-panel { padding: 22px; }
}

@media (max-width: 480px) {
  .topbar { padding: 13px 5%; }
  .brand { font-size: 18px; }
  .brand-icon { width: 35px; height: 35px; }
  .top-note { display: none; }
  .page, .app-shell .page { width: 92%; }
  .hero h1 { letter-spacing: -1px; }
  .intro { font-size: 14px; }
  .panel, .result-panel { padding: 17px; }
  .styles { gap: 7px; }
  .style-option { min-height: 96px; }
  footer { flex-direction: column; gap: 4px; }
}

/* Classic RoomBloom styling compatibility */

.brand-mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #c89570, #9b6549);
  color: white;
  font-family: 'Playfair Display', serif;
}

.brand em,
.footer-brand em {
  color: #a66c4d;
  font-style: normal;
}

.hero-description {
  max-width: 560px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 16px;
}

.decor-form,
.result-panel {
  min-width: 0;
  padding: 27px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 35px rgba(75, 48, 29, .06);
}

.decor-form {
  margin: 0;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: 22px;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.step-number {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.field-label {
  display: block;
  margin: 20px 0 9px;
  font-size: 13px;
  font-weight: 600;
}

.field-label span {
  color: var(--muted);
  font-weight: 400;
}

.upload-card {
  min-height: 165px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #c6a58e;
  border-radius: 16px;
  background: #fcf7f0;
  text-align: center;
  cursor: pointer;
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.upload-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f0dfd0;
  color: var(--accent-2);
  font-size: 24px;
}

.upload-content strong {
  font-size: 13px;
}

.upload-content span,
.upload-content small {
  color: var(--muted);
  font-size: 11px;
}

.image-preview {
  width: 100%;
  max-height: 230px;
  object-fit: contain;
  border-radius: 12px;
}

.field-group {
  margin-top: 22px;
}

.compact-heading {
  margin-bottom: 13px;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.style-option {
  min-width: 0;
  min-height: 103px;
  padding: 12px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  text-align: center;
  cursor: pointer;
}

.style-option:has(input:checked) {
  border-color: var(--accent);
  background: #f8eee5;
}

.style-option input {
  position: absolute;
  opacity: 0;
}

.style-swatch {
  width: 100%;
  height: 34px;
  border-radius: 8px;
}

.swatch-modern { background: linear-gradient(135deg, #d4c6ad, #96a293); }
.swatch-boho { background: linear-gradient(135deg, #c68b61, #60765c); }
.swatch-scandi { background: linear-gradient(135deg, #f6f1e8, #a4b2a3); }
.swatch-luxury { background: linear-gradient(135deg, #d5b879, #4c3d32); }
.swatch-industrial { background: linear-gradient(135deg, #89919b, #343a47); }
.swatch-indian { background: linear-gradient(135deg, #e7a447, #a83d43); }

.style-name {
  font-size: 12px;
  font-weight: 700;
}

.style-description {
  color: var(--muted);
  font-size: 10px;
}

select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fffdf9;
  color: var(--text);
}

.generate-btn {
  width: 100%;
  margin-top: 23px;
  padding: 15px 18px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(100deg, #a66c4d, #c08a65);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.generate-btn:disabled {
  opacity: .65;
  cursor: wait;
}

.form-note,
.status-message {
  color: var(--muted);
  font-size: 11px;
}

.form-note {
  text-align: center;
}

.status-message:empty {
  display: none;
}

.result-heading h2 {
  margin: 0 0 20px;
}

.result-sparkle {
  color: var(--accent);
  font-size: 27px;
}

.result-canvas {
  min-height: 340px;
  padding: 17px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #faf5ed;
  text-align: center;
}

.result-image {
  display: block;
  width: 100%;
  max-height: 600px;
  object-fit: contain;
  border-radius: 12px;
}

.result-placeholder h3 {
  margin: 20px 0 4px;
  font-size: 17px;
}

.result-placeholder p,
.result-caption p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.placeholder-flower,
.result-caption span {
  color: var(--accent);
  font-size: 24px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.secondary-btn {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.result-caption {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding: 15px;
  border-radius: 13px;
  background: #fcf7f0;
}

.bottom-note {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 10px 0 25px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fcf7f0;
  color: var(--muted);
  font-size: 13px;
}

.bottom-note p {
  margin: 0;
}

.bottom-note strong {
  color: var(--text);
}

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 24px 0 30px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.footer-brand {
  color: var(--text);
  text-decoration: none;
  font-family: 'Playfair Display', serif;
}

@media (max-width: 820px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .decor-form,
  .result-panel {
    padding: 22px;
  }
}

@media (max-width: 480px) {
  .decor-form,
  .result-panel {
    padding: 17px;
  }

  .style-grid {
    gap: 7px;
  }

  .style-option {
    min-height: 96px;
  }

  .page-footer {
    flex-direction: column;
    gap: 4px;
  }
}
