@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800;900&display=swap');
:root {
  --background: 36 33% 97%;
  --foreground: 24 30% 14%;
  --card: 0 0% 100%;
  --card-foreground: 24 30% 14%;
  --popover: 0 0% 100%;
  --popover-foreground: 24 30% 14%;
  --primary: 20 52% 50%;
  --primary-foreground: 0 0% 100%;
  --secondary: 30 20% 94%;
  --secondary-foreground: 24 30% 14%;
  --muted: 30 18% 94%;
  --muted-foreground: 30 18% 45%;
  --accent: 30 20% 94%;
  --accent-foreground: 24 30% 14%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --border: 28 20% 88%;
  --input: 30 18% 94%;
  --ring: 20 52% 50%;
  --radius: 0.75rem;
}
.text-foreground { color: hsl(var(--foreground)); }
.text-foreground\/80 { color: hsl(var(--foreground) / 0.8); }
.text-primary { color: hsl(var(--primary)); }
.text-primary-foreground { color: hsl(var(--primary-foreground)); }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }
.bg-primary { background-color: hsl(var(--primary)); }
.bg-muted { background-color: hsl(var(--muted)); }
.border-border { border-color: hsl(var(--border)); }
.border-input { border-color: hsl(var(--input)); }
@keyframes fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(194,112,62,0.05), inset 0 0 20px rgba(194,112,62,0.01); }
  50% { box-shadow: 0 0 40px rgba(194,112,62,0.1), inset 0 0 30px rgba(194,112,62,0.02); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes orb-drift {
  0% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -20px) scale(1.05); }
  50% { transform: translate(-10px, -35px) scale(0.95); }
  75% { transform: translate(-30px, -10px) scale(1.02); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes border-glow {
  0%, 100% { border-color: rgba(194,112,62,0.08); }
  50% { border-color: rgba(194,112,62,0.2); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}
@keyframes aurora {
  0% { opacity: 0.3; transform: rotate(0deg) scale(1); }
  33% { opacity: 0.5; transform: rotate(120deg) scale(1.1); }
  66% { opacity: 0.3; transform: rotate(240deg) scale(0.95); }
  100% { opacity: 0.3; transform: rotate(360deg) scale(1); }
}
@keyframes icon-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(2deg); }
}
@keyframes ring-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes glow-ring {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(1.08); }
}
@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 4px currentColor; }
  50% { box-shadow: 0 0 12px currentColor, 0 0 20px currentColor; }
}
@keyframes ext-btn-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(194,112,62,0); }
  50% { box-shadow: 0 0 12px 2px rgba(194,112,62,0.12); }
}
.animate-fade-in {
  animation: fade-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.animate-fade-up {
  animation: fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.animate-slide-up {
  animation: slide-up 0.3s ease-out;
}
.shimmer {
  background: linear-gradient(90deg, transparent 25%, rgba(194,112,62,0.04) 50%, transparent 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}
.pulse-dot {
  animation: pulse-dot 2s ease-in-out infinite;
}
.spin {
  animation: spin 1s linear infinite;
}
html, body {
  background: #faf8f5;
  overflow: hidden;
}
body {
  font-family: "Inter", system-ui, sans-serif;
  color: #2d2017;
}
code, pre, .font-mono {
  font-family: "JetBrains Mono", "Fira Code", monospace;
}
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(194,112,62,0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(194,112,62,0.35);
}

.sidebar {
  background: #ffffff;
  border-right: 1px solid #e8dfd8;
  position: relative;
  overflow: hidden;
}
.sidebar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: none;
  pointer-events: none;
}
.sidebar::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 180px;
  height: 180px;
  background: none;
  pointer-events: none;
}

.nav-item {
  position: relative;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: #5c4d3c;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  backdrop-filter: none;
}
.nav-item:hover {
  color: #2d2017;
  background: #faf8f5;
  border-color: transparent;
}
.nav-item.active {
  color: #c2703e;
  background: #f5f0eb;
  border-color: transparent;
  box-shadow: 0 1px 3px rgba(194,112,62,0.08);
}
.nav-item.active .nav-icon-box {
  box-shadow: none;
  transform: none;
}
.nav-item .nav-glow {
  position: absolute;
  left: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #d4764e, #c2703e);
  transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: none;
}
.nav-item.active .nav-glow {
  height: 65%;
}

.nav-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  position: relative;
  background: transparent !important;
}
.nav-icon-box::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  border: none;
}
.nav-icon-box svg {
  width: 18px;
  height: 18px;
  position: relative;
  z-index: 1;
  color: #8b7355 !important;
}
.nav-item.active .nav-icon-box svg {
  color: #c2703e !important;
}
.nav-item:hover .nav-icon-box svg {
  color: #5c4d3c !important;
}

.glass-card {
  background: #ffffff;
  border: 1px solid rgba(232,223,216,0.6);
  border-radius: 20px;
  backdrop-filter: none;
  box-shadow: 0 4px 20px -10px rgba(194,112,62,0.12);
  position: relative;
  overflow: hidden;
}
.glass-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  background: none;
}
.glass-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  background: none;
  pointer-events: none;
}

.response-card {
  background: #ffffff;
  border: 1px solid rgba(232,223,216,0.6);
  border-radius: 20px;
  backdrop-filter: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px -10px rgba(194,112,62,0.12);
}
.response-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  background: none;
}

.gen-btn {
  position: relative;
  border: none;
  border-radius: 14px;
  padding: 14px 28px;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, #d4764e 0%, #c2703e 100%);
  --btn-glow: rgba(194,112,62,0.25);
  box-shadow: 0 4px 14px 0 rgba(194,112,62,0.25);
}
.gen-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.25), transparent 60%);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
}
.gen-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  opacity: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 50%);
  transition: opacity 0.3s;
}
.gen-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(194,112,62,0.35);
}
.gen-btn:hover::after {
  opacity: 1;
}
.gen-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98) !important;
}
.gen-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}
.gen-btn-blue,
.gen-btn-violet,
.gen-btn-emerald,
.gen-btn-cyan,
.gen-btn-primary {
  background: linear-gradient(135deg, #d4764e 0%, #c2703e 100%);
  --btn-glow: rgba(194,112,62,0.25);
  background-size: 100% 100%;
  animation: none;
}

.input-field {
  background: #f5f0eb;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 16px;
  color: #2d2017;
  font-size: 13.5px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}
.input-field:focus {
  outline: none;
  border-color: #c2703e;
  box-shadow: 0 0 0 3px rgba(194,112,62,0.08);
  background: #ffffff;
}
.input-field::placeholder {
  color: #a38f7a;
}
select.input-field {
  cursor: pointer;
  color-scheme: light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b7355' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-color: #f5f0eb;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
select.input-field option {
  background: #ffffff;
  color: #2d2017;
  padding: 8px 12px;
  font-size: 13px;
}
textarea.input-field {
  resize: none;
  line-height: 1.65;
}

.label-text {
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: #5c4d3c;
  margin-bottom: 8px;
  display: block;
}
.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8b7355;
  padding: 0 4px;
}

.tool-panel {
  animation: fade-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.result-img {
  max-width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(232,223,216,0.6);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.result-img:hover {
  border-color: rgba(194,112,62,0.25);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08), 0 0 20px rgba(194,112,62,0.06);
}

.orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: orb-drift 20s ease-in-out infinite;
  display: none;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 48px 24px;
}
.empty-state-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
  background: #f5f0eb !important;
}
.empty-state-icon::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px dashed rgba(212,118,78,0.2);
  animation: ring-spin 10s linear infinite;
  background: none;
}
.empty-state-icon::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: rgba(245,240,235,0.5);
  animation: glow-ring 3s ease-in-out infinite;
  border: none;
  z-index: -1;
}
.empty-state-icon svg {
  color: #d4764e !important;
}

.section-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  background: #c2703e !important;
  box-shadow: none !important;
}
.section-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.2;
  filter: blur(4px);
}

button {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.code-block {
  position: relative;
}
.code-block .copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  opacity: 0;
  transition: opacity 0.2s;
}
.code-block:hover .copy-btn {
  opacity: 1;
}

.header-glass {
  background: rgba(250,248,245,0.92);
  backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid rgba(232,223,216,0.8);
}
.header-glass::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  background: none;
}

.copy-btn-small {
  font-size: 11px;
  color: #8b7355;
  background: #f5f0eb;
  border: 1px solid #e8dfd8;
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.copy-btn-small:hover {
  color: #c2703e;
  background: rgba(194,112,62,0.06);
  border-color: rgba(194,112,62,0.2);
}

.main-content {
  position: relative;
  z-index: 1;
  background: #faf8f5;
}
.main-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: none;
  pointer-events: none;
}
