/* PromptBuilder Premium Styles */

:root {
  --surface: rgba(15, 23, 42, 0.72);
  --surface-strong: rgba(15, 23, 42, 0.9);
  --border-soft: rgba(148, 163, 184, 0.18);
  --shadow-soft: 0 20px 60px rgba(2, 6, 23, 0.25);
}

.prompt-shell {
  background:
    radial-gradient(circle at top left, rgba(92, 124, 250, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 24%),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #111827 100%);
}

.prompt-shell.theme-light {
  background:
    radial-gradient(circle at top left, rgba(92, 124, 250, 0.08), transparent 26%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.06), transparent 22%),
    radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.05), transparent 20%),
    linear-gradient(180deg, #fbfcfe 0%, #f3f6fb 52%, #edf2f7 100%);
  color: #0f172a;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --border-soft: rgba(148, 163, 184, 0.12);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.prompt-shell.theme-light::before {
  opacity: 0.18;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 90%);
}

.prompt-shell::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent 90%);
  opacity: 0.35;
}

.prompt-shell #app-root {
  position: relative;
  z-index: 1;
}

.prompt-shell #mobile-sidebar {
  display: none !important;
}

.prompt-shell main > div {
  display: block !important;
}

.prompt-shell main > div > aside {
  display: none !important;
}

.prompt-shell main > div > .min-w-0 {
  min-width: 0;
}

.prompt-shell.mobile-sidebar-open {
  overflow: hidden;
}

.prompt-shell nav {
  background: rgba(2, 6, 23, 0.7) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12) !important;
}

.prompt-shell nav button[onclick*="toggleMobileSidebar"] {
  display: none !important;
}

.prompt-shell button[onclick*="showUpdates()"] {
  display: none !important;
}

.prompt-shell nav [data-theme-toggle],
.prompt-shell nav [data-prompt-lang] {
  border-radius: 9999px !important;
}

.prompt-shell nav [data-theme-toggle].bg-brand-600,
.prompt-shell nav [data-prompt-lang].bg-brand-600 {
  box-shadow: 0 10px 24px rgba(92, 124, 250, 0.18);
}

.prompt-shell nav [data-theme-switch],
.prompt-shell nav [data-lang-switch] {
  min-height: 2.45rem;
  padding-inline: 0.85rem;
  background: rgba(255, 255, 255, 0.99) !important;
  border: 1px solid rgba(148, 163, 184, 0.98) !important;
  color: #0f172a !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1) !important;
}

.prompt-shell.theme-dark nav [data-theme-switch],
.prompt-shell.theme-dark nav [data-lang-switch] {
  background: rgba(15, 23, 42, 0.96) !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
  color: #e2e8f0 !important;
}

.prompt-shell nav [data-theme-switch] .toggle-switch-label,
.prompt-shell nav [data-lang-switch] .toggle-switch-label {
  color: inherit !important;
  opacity: 0.78;
  font-weight: 800;
  font-size: 0.72rem;
}

.prompt-shell nav [data-theme-switch].is-active .toggle-switch-label-right,
.prompt-shell nav [data-theme-switch]:not(.is-active) .toggle-switch-label-left,
.prompt-shell nav [data-lang-switch].is-active .toggle-switch-label-right,
.prompt-shell nav [data-lang-switch]:not(.is-active) .toggle-switch-label-left {
  opacity: 1;
  color: inherit !important;
}

.prompt-shell nav [data-theme-switch] .toggle-switch-track,
.prompt-shell nav [data-lang-switch] .toggle-switch-track {
  background: rgba(148, 163, 184, 0.34);
}

.prompt-shell nav [data-theme-switch].is-active .toggle-switch-track,
.prompt-shell nav [data-lang-switch].is-active .toggle-switch-track {
  background: linear-gradient(90deg, rgba(92, 124, 250, 0.96), rgba(79, 70, 229, 0.9));
}

.prompt-shell nav [data-theme-switch] .toggle-switch-knob,
.prompt-shell nav [data-lang-switch] .toggle-switch-knob {
  background: #ffffff;
}

.prompt-shell #mode-selection-card {
  display: none !important;
}

.prompt-shell [data-theme-switch],
.prompt-shell [data-lang-switch] {
  position: relative;
  gap: 0.75rem;
}

.prompt-shell [data-theme-switch] .toggle-switch-track,
.prompt-shell [data-lang-switch] .toggle-switch-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 2.7rem;
  height: 1.32rem;
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.35);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.18);
  transition: background-color 220ms ease, transform 220ms ease;
  overflow: hidden;
}

.prompt-shell [data-theme-switch] .toggle-switch-knob,
.prompt-shell [data-lang-switch] .toggle-switch-knob {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
  transform: translateX(0.14rem);
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1), background-color 180ms ease;
  will-change: transform;
}

.prompt-shell [data-theme-switch].is-active .toggle-switch-track,
.prompt-shell [data-lang-switch].is-active .toggle-switch-track {
  background: rgba(92, 124, 250, 0.55);
}

.prompt-shell [data-theme-switch].is-active .toggle-switch-knob,
.prompt-shell [data-lang-switch].is-active .toggle-switch-knob {
  transform: translateX(1.42rem);
}

.prompt-shell [data-theme-switch] .toggle-switch-label,
.prompt-shell [data-lang-switch] .toggle-switch-label {
  min-width: 2.55rem;
  text-align: center;
  opacity: 0.6;
  transition: opacity 180ms ease, color 180ms ease, transform 180ms ease;
  letter-spacing: -0.02em;
}

.prompt-shell [data-theme-switch].is-active .toggle-switch-label-right,
.prompt-shell [data-theme-switch]:not(.is-active) .toggle-switch-label-left,
.prompt-shell [data-lang-switch].is-active .toggle-switch-label-right,
.prompt-shell [data-lang-switch]:not(.is-active) .toggle-switch-label-left {
  opacity: 1;
  color: #ffffff;
}

.prompt-shell.theme-light [data-theme-switch],
.prompt-shell.theme-light [data-lang-switch] {
  background: rgba(255, 255, 255, 0.98) !important;
  color: #0f172a !important;
  border-color: rgba(203, 213, 225, 0.94) !important;
}

.prompt-shell.theme-dark footer .rounded-\[28px\] {
  background: rgba(15, 23, 42, 0.86) !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
  color: #e2e8f0 !important;
}

.prompt-shell.theme-dark footer a,
.prompt-shell.theme-dark footer button,
.prompt-shell.theme-dark footer p {
  color: #cbd5e1 !important;
}

.prompt-shell.theme-dark footer a:hover,
.prompt-shell.theme-dark footer button:hover {
  color: #ffffff !important;
}

.prompt-shell #mode-selection-card {
  display: block !important;
}

.prompt-shell #mode-selection-card {
  display: none !important;
}

.prompt-shell #mode-selection-card + .rounded-3xl {
  grid-column: 1 / -1;
}

.prompt-shell footer {
  clear: both;
}

.prompt-shell #result-section {
  position: relative;
}

@media (min-width: 1280px) {
  .prompt-shell #result-section {
    float: none !important;
    clear: both;
    width: 100% !important;
    margin: 1.5rem 0 0;
  }
}

.prompt-shell.theme-light nav {
  background: rgba(255, 255, 255, 0.9) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12) !important;
}

.prompt-shell.theme-dark .bg-white,
.prompt-shell.theme-dark .bg-white\/5,
.prompt-shell.theme-dark .bg-white\/10,
.prompt-shell.theme-dark .bg-white\/20,
.prompt-shell.theme-dark .bg-gray-50,
.prompt-shell.theme-dark .bg-gray-100,
.prompt-shell.theme-dark .bg-gray-200 {
  background-color: rgba(15, 23, 42, 0.82) !important;
  color: #e2e8f0 !important;
}

.prompt-shell.theme-light .bg-white,
.prompt-shell.theme-light .bg-white\/5,
.prompt-shell.theme-light .bg-white\/10,
.prompt-shell.theme-light .bg-white\/20,
.prompt-shell.theme-light .bg-gray-50,
.prompt-shell.theme-light .bg-gray-100,
.prompt-shell.theme-light .bg-gray-200,
.prompt-shell.theme-light .bg-gray-50,
.prompt-shell.theme-light .bg-gray-100,
.prompt-shell.theme-light .bg-gray-200 {
  background-color: rgba(255, 255, 255, 0.94) !important;
  color: #0f172a !important;
}

.prompt-shell section > div,
.prompt-shell #template-workspace > div,
.prompt-shell #optimize-workspace > div {
  box-shadow: var(--shadow-soft);
}

.prompt-shell .bg-gray-900,
.prompt-shell .bg-gray-900\/50 {
  background-color: var(--surface) !important;
  backdrop-filter: blur(16px);
}

.prompt-shell .bg-gray-900\/80 {
  background-color: var(--surface-strong) !important;
  backdrop-filter: blur(18px);
}

.prompt-shell.theme-light .bg-slate-950,
.prompt-shell.theme-light .bg-gray-950,
.prompt-shell.theme-light .bg-gray-900,
.prompt-shell.theme-light .bg-gray-900\/50,
.prompt-shell.theme-light .bg-gray-900\/60,
.prompt-shell.theme-light .bg-gray-900\/80,
.prompt-shell.theme-light .bg-slate-950\/90,
.prompt-shell.theme-light .bg-slate-950\/96,
.prompt-shell.theme-light .bg-gray-800,
.prompt-shell.theme-light .bg-gray-800\/50,
.prompt-shell.theme-light .bg-slate-900,
.prompt-shell.theme-light .bg-slate-900\/50,
.prompt-shell.theme-light .bg-slate-900\/80 {
  background-color: rgba(255, 255, 255, 0.9) !important;
  color: #0f172a !important;
}

.prompt-shell.theme-light .sidebar-surface {
  background-color: rgba(255, 255, 255, 0.94) !important;
  border-color: rgba(203, 213, 225, 0.92) !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08) !important;
}

.prompt-shell.theme-light #mobile-sidebar .sidebar-surface {
  background-color: rgba(248, 250, 252, 0.98) !important;
}

.prompt-shell.theme-light #result-section button:not(.bg-brand-600) {
  background-color: rgba(255, 255, 255, 0.98) !important;
  color: #0f172a !important;
  border-color: rgba(148, 163, 184, 0.72) !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08) !important;
}

.prompt-shell.theme-light #step-purpose .rounded-2xl,
.prompt-shell.theme-light #step-purpose .rounded-3xl,
.prompt-shell.theme-light #step-technique .rounded-2xl,
.prompt-shell.theme-light #step-technique .rounded-3xl,
.prompt-shell.theme-light #step-fields .rounded-2xl,
.prompt-shell.theme-light #step-fields .rounded-3xl,
.prompt-shell.theme-light #recommendation-section .rounded-2xl,
.prompt-shell.theme-light #recommendation-section .rounded-3xl,
.prompt-shell.theme-light #result-section .rounded-2xl,
.prompt-shell.theme-light #result-section .rounded-3xl,
.prompt-shell.theme-light #quality-checks .rounded-2xl,
.prompt-shell.theme-light #quality-checks .rounded-3xl {
  background-color: rgba(255, 255, 255, 0.98) !important;
  color: #0f172a !important;
  border-color: rgba(203, 213, 225, 0.92) !important;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06) !important;
}

.prompt-shell.theme-light #step-purpose .text-white,
.prompt-shell.theme-light #step-technique .text-white,
.prompt-shell.theme-light #step-fields .text-white,
.prompt-shell.theme-light #recommendation-section .text-white,
.prompt-shell.theme-light #result-section .text-white {
  color: #0f172a !important;
}

.prompt-shell.theme-light #step-purpose .text-slate-300,
.prompt-shell.theme-light #step-purpose .text-slate-400,
.prompt-shell.theme-light #step-technique .text-slate-300,
.prompt-shell.theme-light #step-technique .text-slate-400,
.prompt-shell.theme-light #step-fields .text-slate-300,
.prompt-shell.theme-light #step-fields .text-slate-400,
.prompt-shell.theme-light #recommendation-section .text-slate-300,
.prompt-shell.theme-light #recommendation-section .text-slate-400,
.prompt-shell.theme-light #result-section .text-slate-300,
.prompt-shell.theme-light #result-section .text-slate-400 {
  color: #475569 !important;
}

.prompt-shell.theme-light #step-purpose button:not(.bg-brand-600),
.prompt-shell.theme-light #step-technique button:not(.bg-brand-600),
.prompt-shell.theme-light #step-fields button:not(.bg-brand-600),
.prompt-shell.theme-light #recommendation-section button:not(.bg-brand-600),
.prompt-shell.theme-light #result-section button:not(.bg-brand-600) {
  background-color: rgba(255, 255, 255, 0.98) !important;
  color: #0f172a !important;
  border-color: rgba(203, 213, 225, 0.92) !important;
}

.prompt-shell.theme-light #step-purpose button:not(.bg-brand-600):hover,
.prompt-shell.theme-light #step-technique button:not(.bg-brand-600):hover,
.prompt-shell.theme-light #step-fields button:not(.bg-brand-600):hover,
.prompt-shell.theme-light #recommendation-section button:not(.bg-brand-600):hover,
.prompt-shell.theme-light #result-section button:not(.bg-brand-600):hover {
  border-color: rgba(92, 124, 250, 0.58) !important;
}

.prompt-shell.theme-light #result-section button:not(.bg-brand-600):hover {
  background-color: rgba(248, 250, 252, 1) !important;
  border-color: rgba(92, 124, 250, 0.6) !important;
}

.prompt-shell.theme-light #result-section button:not(.bg-brand-600) i,
.prompt-shell.theme-light #result-section button:not(.bg-brand-600) * {
  color: inherit !important;
}

.prompt-shell.theme-light #optimize-workspace button:not(.bg-brand-600) {
  background-color: rgba(255, 255, 255, 0.98) !important;
  color: #0f172a !important;
  border-color: rgba(148, 163, 184, 0.72) !important;
}

.prompt-shell.theme-light #optimize-workspace button:not(.bg-brand-600):hover {
  border-color: rgba(92, 124, 250, 0.6) !important;
}

.prompt-shell.theme-light #optimize-workspace button:not(.bg-brand-600) i,
.prompt-shell.theme-light #optimize-workspace button:not(.bg-brand-600) * {
  color: inherit !important;
}

.prompt-shell.theme-light #chain-section button {
  background-color: rgba(255, 255, 255, 0.98) !important;
  color: #0f172a !important;
  border-color: rgba(148, 163, 184, 0.72) !important;
}

.prompt-shell.theme-light #chain-section button:hover {
  border-color: rgba(92, 124, 250, 0.6) !important;
}

.prompt-shell.theme-light #chain-section button i,
.prompt-shell.theme-light #chain-section button * {
  color: inherit !important;
}

.prompt-shell.theme-light #result-section .rounded-3xl.border,
.prompt-shell.theme-light #result-section .rounded-3xl,
.prompt-shell.theme-light #optimize-workspace .rounded-3xl.border,
.prompt-shell.theme-light #optimize-workspace .rounded-3xl {
  background-color: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(203, 213, 225, 0.96) !important;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06) !important;
}

.prompt-shell.theme-light #result-section .rounded-3xl.border pre,
.prompt-shell.theme-light #optimize-workspace .rounded-3xl.border pre {
  color: #0f172a !important;
}

.prompt-shell.theme-light #result-section .rounded-3xl.border .text-gray-500,
.prompt-shell.theme-light #result-section .rounded-3xl.border .text-gray-400,
.prompt-shell.theme-light #result-section .rounded-3xl.border .text-slate-400,
.prompt-shell.theme-light #optimize-workspace .rounded-3xl.border .text-gray-500,
.prompt-shell.theme-light #optimize-workspace .rounded-3xl.border .text-gray-400,
.prompt-shell.theme-light #optimize-workspace .rounded-3xl.border .text-slate-400 {
  color: #64748b !important;
}

.prompt-shell.theme-light #result-section .rounded-3xl.border .border-gray-800,
.prompt-shell.theme-light #result-section .rounded-3xl.border .border-white\/10,
.prompt-shell.theme-light #optimize-workspace .rounded-3xl.border .border-gray-800,
.prompt-shell.theme-light #optimize-workspace .rounded-3xl.border .border-white\/10 {
  border-color: rgba(226, 232, 240, 0.98) !important;
}

.prompt-shell.theme-light #result-section .rounded-3xl.border button,
.prompt-shell.theme-light #optimize-workspace .rounded-3xl.border button,
.prompt-shell.theme-light #admin-dashboard button {
  color: #0f172a !important;
}

.prompt-shell.theme-light #admin-dashboard .bg-gray-950\/70,
.prompt-shell.theme-light #admin-dashboard .bg-gray-950\/60,
.prompt-shell.theme-light #admin-dashboard .bg-gray-950\/50,
.prompt-shell.theme-light #admin-dashboard .bg-gray-950\/40,
.prompt-shell.theme-light #admin-dashboard .bg-gray-900\/80,
.prompt-shell.theme-light #admin-dashboard .bg-gray-900\/60,
.prompt-shell.theme-light #admin-dashboard .bg-gray-900\/50,
.prompt-shell.theme-light #admin-dashboard .bg-slate-950\/96,
.prompt-shell.theme-light #admin-dashboard .bg-slate-950\/90,
.prompt-shell.theme-light #admin-dashboard .bg-slate-950\/80,
.prompt-shell.theme-light #admin-dashboard .bg-slate-950\/70,
.prompt-shell.theme-light #admin-dashboard .bg-slate-950\/50,
.prompt-shell.theme-light #admin-dashboard .bg-slate-950\/40,
.prompt-shell.theme-light #admin-dashboard .bg-white\/5,
.prompt-shell.theme-light #admin-dashboard .bg-white\/10,
.prompt-shell.theme-light #admin-dashboard .bg-white\/20 {
  background-color: rgba(255, 255, 255, 0.98) !important;
  color: #0f172a !important;
}

.prompt-shell.theme-light #admin-dashboard .border-gray-800,
.prompt-shell.theme-light #admin-dashboard .border-gray-700,
.prompt-shell.theme-light #admin-dashboard .border-white\/10,
.prompt-shell.theme-light #admin-dashboard .border-white\/20 {
  border-color: rgba(203, 213, 225, 0.92) !important;
}

.prompt-shell.theme-light #admin-dashboard .text-white,
.prompt-shell.theme-light #admin-dashboard .text-gray-100 {
  color: #0f172a !important;
}

.prompt-shell.theme-light #admin-dashboard .text-gray-300,
.prompt-shell.theme-light #admin-dashboard .text-gray-400,
.prompt-shell.theme-light #admin-dashboard .text-slate-200,
.prompt-shell.theme-light #admin-dashboard .text-slate-300,
.prompt-shell.theme-light #admin-dashboard .text-slate-400,
.prompt-shell.theme-light #admin-dashboard .text-gray-500 {
  color: #475569 !important;
}

.prompt-shell.theme-light #admin-dashboard .rounded-2xl.border,
.prompt-shell.theme-light #admin-dashboard .rounded-3xl.border {
  background-color: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06) !important;
}

.prompt-shell.theme-light #admin-dashboard pre {
  background-color: rgba(248, 250, 252, 0.98) !important;
  color: #0f172a !important;
}

.prompt-shell.theme-light #admin-dashboard button {
  background-color: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(148, 163, 184, 0.72) !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06) !important;
}

.prompt-shell.theme-light #admin-dashboard button:hover {
  background-color: rgba(248, 250, 252, 1) !important;
  border-color: rgba(92, 124, 250, 0.58) !important;
}

.prompt-shell.theme-light #admin-dashboard button i,
.prompt-shell.theme-light #admin-dashboard button * {
  color: inherit !important;
}

.prompt-shell.theme-light .bg-brand-500\/10,
.prompt-shell.theme-light .bg-brand-500\/15,
.prompt-shell.theme-light .bg-brand-500\/20,
.prompt-shell.theme-light .bg-blue-500\/10,
.prompt-shell.theme-light .bg-cyan-500\/10,
.prompt-shell.theme-light .bg-indigo-500\/10,
.prompt-shell.theme-light .bg-emerald-500\/10,
.prompt-shell.theme-light .bg-teal-500\/10 {
  background-color: rgba(92, 124, 250, 0.06) !important;
}

.prompt-shell.theme-light .text-white,
.prompt-shell.theme-light .text-gray-100 {
  color: #0f172a !important;
}

.prompt-shell.theme-light .text-gray-300,
.prompt-shell.theme-light .text-gray-400,
.prompt-shell.theme-light .text-slate-200,
.prompt-shell.theme-light .text-slate-300,
.prompt-shell.theme-light .text-slate-400,
.prompt-shell.theme-light .text-gray-500 {
  color: #475569 !important;
}

.prompt-shell.theme-light .border-white\/10,
.prompt-shell.theme-light .border-white\/20 {
  border-color: rgba(203, 213, 225, 0.92) !important;
}

.prompt-shell.theme-light .border-gray-800,
.prompt-shell.theme-light .border-gray-700,
.prompt-shell.theme-light .border-gray-600,
.prompt-shell.theme-light .border-gray-500,
.prompt-shell.theme-light .border-gray-200,
.prompt-shell.theme-light .border-gray-100 {
  border-color: rgba(203, 213, 225, 0.92) !important;
}

.prompt-shell.theme-light .bg-brand-500\/5,
.prompt-shell.theme-light .bg-brand-500\/10,
.prompt-shell.theme-light .bg-brand-500\/15,
.prompt-shell.theme-light .bg-brand-500\/20,
.prompt-shell.theme-light .bg-brand-50 {
  background-color: rgba(92, 124, 250, 0.06) !important;
}

.prompt-shell.theme-light .text-brand-100,
.prompt-shell.theme-light .text-brand-200,
.prompt-shell.theme-light .text-brand-300 {
  color: #3b82f6 !important;
}

.prompt-shell.theme-light .text-indigo-400,
.prompt-shell.theme-light .text-cyan-400,
.prompt-shell.theme-light .text-teal-400,
.prompt-shell.theme-light .text-emerald-400,
.prompt-shell.theme-light .text-blue-400,
.prompt-shell.theme-light .text-green-400 {
  color: #2563eb !important;
}

.prompt-shell.theme-light .text-brand-400,
.prompt-shell.theme-light .text-brand-500,
.prompt-shell.theme-light .text-brand-600 {
  color: #2563eb !important;
}

.prompt-shell.theme-light .bg-white\/5,
.prompt-shell.theme-light .bg-white\/10,
.prompt-shell.theme-light .bg-white\/20 {
  background-color: rgba(255, 255, 255, 0.98) !important;
}

.prompt-shell.theme-dark .text-slate-900,
.prompt-shell.theme-dark .text-gray-900,
.prompt-shell.theme-dark .text-black {
  color: #f8fafc !important;
}

.prompt-shell.theme-dark .text-gray-700,
.prompt-shell.theme-dark .text-gray-600,
.prompt-shell.theme-dark .text-gray-500,
.prompt-shell.theme-dark .text-slate-500,
.prompt-shell.theme-dark .text-slate-600,
.prompt-shell.theme-dark .text-slate-700 {
  color: #cbd5e1 !important;
}

.prompt-shell.theme-dark .border-white\/10,
.prompt-shell.theme-dark .border-white\/20 {
  border-color: rgba(148, 163, 184, 0.14) !important;
}

.prompt-shell.theme-dark .bg-brand-500\/5,
.prompt-shell.theme-dark .bg-brand-500\/10,
.prompt-shell.theme-dark .bg-brand-50 {
  background-color: rgba(92, 124, 250, 0.16) !important;
}

.prompt-shell .border-gray-800,
.prompt-shell .border-gray-700,
.prompt-shell .border-gray-200 {
  border-color: var(--border-soft) !important;
}

.prompt-shell .rounded-2xl,
.prompt-shell .rounded-3xl {
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

.prompt-shell button {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.prompt-shell button:hover {
  transform: translateY(-1px);
}

.prompt-shell input,
.prompt-shell textarea,
.prompt-shell pre {
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.prompt-shell.theme-dark input,
.prompt-shell.theme-dark textarea,
.prompt-shell.theme-dark pre {
  background: rgba(15, 23, 42, 0.92) !important;
  color: #e2e8f0 !important;
}

.prompt-shell.theme-light input,
.prompt-shell.theme-light textarea,
.prompt-shell.theme-light pre {
  background: rgba(255, 255, 255, 0.98) !important;
  color: #0f172a !important;
}

.prompt-shell.theme-light .rounded-2xl.border,
.prompt-shell.theme-light .rounded-3xl.border {
  border-color: rgba(203, 213, 225, 0.92) !important;
}

.prompt-shell input::placeholder,
.prompt-shell textarea::placeholder {
  color: rgba(100, 116, 139, 0.72) !important;
}

.prompt-shell pre {
  color: inherit;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.5);
}

/* Selection */
::selection {
  background: rgba(92, 124, 250, 0.3);
  color: #fff;
}

/* Smooth transitions */
* {
  scroll-behavior: smooth;
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Textarea resize handle */
textarea {
  min-height: 80px;
}

/* Pre tag styling in result */
#result-prompt {
  tab-size: 2;
  word-break: break-word;
}

.prompt-shell.theme-light #result-prompt {
  color: #0f172a !important;
}

.prompt-shell.theme-light #result-section .overflow-hidden.rounded-3xl {
  background-color: rgba(255, 255, 255, 0.99) !important;
  border-color: rgba(203, 213, 225, 0.96) !important;
}

.prompt-shell #result-section .grid.gap-4 {
  grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 0.7fr);
  align-items: start;
}

@media (max-width: 1279px) {
  .prompt-shell #result-section .grid.gap-4 {
    grid-template-columns: 1fr;
  }
}

.prompt-shell #result-section .space-y-3 {
  display: grid;
  gap: 0.75rem;
}

.prompt-shell.theme-light #result-section .overflow-hidden.rounded-3xl .border-b {
  border-color: rgba(226, 232, 240, 0.96) !important;
}

.prompt-shell.theme-light #result-section .overflow-hidden.rounded-3xl .text-slate-200,
.prompt-shell.theme-light #result-section .overflow-hidden.rounded-3xl .text-slate-300,
.prompt-shell.theme-light #result-section .overflow-hidden.rounded-3xl .text-slate-400,
.prompt-shell.theme-light #result-section .overflow-hidden.rounded-3xl .text-white {
  color: #0f172a !important;
}

.prompt-shell.theme-light #result-section details {
  background-color: rgba(255, 255, 255, 0.99) !important;
  border-color: rgba(203, 213, 225, 0.96) !important;
}

.prompt-shell.theme-light #result-section summary {
  color: #0f172a !important;
}

.prompt-shell.theme-light #result-section .space-y-3 > details,
.prompt-shell.theme-light #result-section .space-y-4 > div {
  background-color: rgba(255, 255, 255, 0.99) !important;
}

.prompt-shell.theme-light #result-section #quality-grade {
  background: linear-gradient(135deg, rgba(92, 124, 250, 0.18), rgba(37, 99, 235, 0.1)) !important;
  color: #1d4ed8 !important;
  border: 1px solid rgba(147, 197, 253, 0.8) !important;
}

.prompt-shell.theme-light #result-section #quality-score {
  color: #0f172a !important;
}

.prompt-shell.theme-light #result-section #quality-label {
  color: #334155 !important;
}

.prompt-shell.theme-light #result-section #quality-checks .rounded-2xl,
.prompt-shell.theme-light #result-section #quality-checks .rounded-3xl {
  background: rgba(248, 250, 252, 0.98) !important;
  border-color: rgba(203, 213, 225, 0.94) !important;
}

.prompt-shell.theme-light #result-section #quality-checks > div:first-child {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.98)) !important;
  border-color: rgba(191, 219, 254, 0.95) !important;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.08) !important;
}

.prompt-shell.theme-light #result-section #quality-checks > div:first-child .text-slate-700,
.prompt-shell.theme-light #result-section #quality-checks > div:first-child .text-slate-600 {
  color: #0f172a !important;
}

.prompt-shell.theme-light #result-section #quality-checks > div:first-child .text-brand-600 {
  color: #1d4ed8 !important;
}

.prompt-shell.theme-light #result-section #quality-checks > div:not(:first-child) {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(203, 213, 225, 0.92) !important;
}

.prompt-shell.theme-light #result-section #quality-checks > div:not(:first-child) .text-gray-300,
.prompt-shell.theme-light #result-section #quality-checks > div:not(:first-child) .text-gray-400,
.prompt-shell.theme-light #result-section #quality-checks > div:not(:first-child) .text-slate-500,
.prompt-shell.theme-light #result-section #quality-checks > div:not(:first-child) .text-slate-700 {
  color: #334155 !important;
}

.prompt-shell.theme-light #result-section #quality-checks > div:not(:first-child) i {
  color: #2563eb !important;
}

.prompt-shell.theme-light #result-section #quality-checks .text-slate-300,
.prompt-shell.theme-light #result-section #quality-checks .text-slate-400,
.prompt-shell.theme-light #result-section #quality-checks .text-slate-500 {
  color: #334155 !important;
}

.prompt-shell.theme-light #result-section #quality-checks i {
  color: #2563eb !important;
}

/* Focus ring for accessibility */
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(92, 124, 250, 0.5);
  outline-offset: 2px;
}

/* Pulse animation for generate button */
@keyframes subtle-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(92, 124, 250, 0.2); }
  50% { box-shadow: 0 4px 30px rgba(92, 124, 250, 0.4); }
}
#generate-btn:not(:disabled) {
  animation: subtle-pulse 3s ease-in-out infinite;
}
#generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  animation: none;
}

/* Modal backdrop */
#guide-modal > div:first-child,
#history-modal > div:first-child,
#updates-modal > div:first-child {
  animation: fadeIn 0.2s ease-out;
}
#guide-modal > div:last-child,
#history-modal > div:last-child,
#updates-modal > div:last-child {
  animation: slideUp 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Card hover lift */
.purpose-card:hover,
.technique-card:hover {
  transform: translateY(-1px);
}

.prompt-shell .purpose-card,
.prompt-shell .technique-card,
.prompt-shell .mode-btn {
  border-radius: 18px;
}

.prompt-shell #guide-modal .relative,
.prompt-shell #history-modal .relative,
.prompt-shell #updates-modal .relative {
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.prompt-shell.theme-light #guide-modal .relative,
.prompt-shell.theme-light #history-modal .relative,
.prompt-shell.theme-light #updates-modal .relative {
  box-shadow: 0 30px 80px rgba(148, 163, 184, 0.25);
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.96);
}

/* Grade badge animation */
#quality-grade {
  animation: gradeReveal 0.5s ease-out;
}
@keyframes gradeReveal {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

#updates-modal .fa-sparkles {
  animation: subtle-pulse 2.6s ease-in-out infinite;
}
