/* styles.css - Modern Gray & White Theme (Perplexity Style) */

/* Auth Loading Screen */
.auth-loader{
  position:fixed;inset:0;z-index:9999;
  display:flex;align-items:center;justify-content:center;
  background:#739BD0;
  transition:opacity 0.3s ease
}
[data-theme="dark"] .auth-loader{ background:#0a1628 }
.auth-loader.hidden{ opacity:0;pointer-events:none }
.auth-loader-spinner{
  width:40px;height:40px;
  border:3px solid rgba(255,255,255,0.3);
  border-top-color:#ffffff;
  border-radius:50%;
  animation:spin 0.7s linear infinite
}
@keyframes spin{ to{ transform:rotate(360deg) } }
*{margin:0;padding:0;box-sizing:border-box}

/* CSS Variables for Light Theme - Blue & Yellow */
:root{
  --bg-primary:#739BD0;
  --bg-secondary:#5a87c5;
  --bg-tertiary:#4a74b5;
  --panel-bg:#ffffff;
  --panel-border:#e0e6ed;
  --text-primary:#0a1628;
  --text-secondary:#1a3a5c;
  --text-muted:#4a6080;
  --accent-primary:#4a74b5;
  --accent-hover:#3d6299;
  --accent-light:#e6edff;
  --border-color:#e0e6ed;
  --shadow-sm:0 1px 3px 0 rgba(74,116,181,0.12);
  --shadow-md:0 4px 6px -1px rgba(74,116,181,0.15);
  --shadow-lg:0 10px 15px -3px rgba(74,116,181,0.18);
  --shadow-xl:0 20px 25px -5px rgba(74,116,181,0.22);
  --radius-sm:8px;
  --radius-md:12px;
  --radius-lg:16px;
  --radius-xl:20px
}

/* CSS Variables for Dark Theme - Deep Blue */
[data-theme="dark"]{
  --bg-primary:#0a1628;
  --bg-secondary:#111f36;
  --bg-tertiary:#1a2d4a;
  --panel-bg:#111f36;
  --panel-border:#1a2d4a;
  --text-primary:#ffffff;
  --text-secondary:#b0c4de;
  --text-muted:#6880a0;
  --accent-primary:#4d9aff;
  --accent-hover:#6aadff;
  --accent-light:#1a2d4a;
  --border-color:#1a2d4a;
  --shadow-sm:0 1px 2px 0 rgba(0,0,0,0.3);
  --shadow-md:0 4px 6px -1px rgba(0,0,0,0.4);
  --shadow-lg:0 10px 15px -3px rgba(0,0,0,0.5);
  --shadow-xl:0 20px 25px -5px rgba(0,0,0,0.6)
}

/* Dark Mode Overrides */
[data-theme="dark"] .panel{
  background:#111f36;
  border-color:#1a2d4a
}
[data-theme="dark"] .panel:hover{
  border-color:#4d9aff
}
[data-theme="dark"] .panel-title{
  color:#ffffff
}
[data-theme="dark"] .panel-description{
  color:#6880a0
}
[data-theme="dark"] textarea{
  background:#0a1628;
  color:#e8ecf1;
  border-color:#1a2d4a
}
[data-theme="dark"] textarea:focus{
  background:#080f1e;
  border-color:#4d9aff;
  box-shadow:0 0 0 3px rgba(77,154,255,0.15)
}
[data-theme="dark"] textarea::placeholder{
  color:#405880
}
[data-theme="dark"] .output-content{
  background:#0a1628;
  color:#e8ecf1;
  border-color:#1a2d4a
}
[data-theme="dark"] #animated-bg{
  background:#0a1628
}

/* Main Background - Clean Gray */
body{
  font-family:"Inter","Helvetica Neue",Arial,sans-serif;
  background:var(--bg-primary);
  min-height:100vh;
  padding:80px 20px 20px;
  color:var(--text-primary);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  font-feature-settings:"cv02","cv03","cv04","cv11";
  font-optical-sizing:auto;
  position:relative;
  overflow-x:hidden
}

/* Headings - Lora (literary serif for writing app) */
h1,h2,h3,h4,h5,h6{
  font-family:"Lora",Georgia,serif;
  font-weight:600
}

/* Animated Dots Canvas */
#animated-bg{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  pointer-events:none;
  z-index:0;
  opacity:1;
  background:#739BD0;
}

.main-container{max-width:1200px;margin:0 auto;position:relative;z-index:1;padding-top:10px}

/* Top Navigation Header */
.top-header{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:100;
  background:rgba(115,155,208,0.95);
  backdrop-filter:blur(12px);
  border-bottom:1px solid #5a87c5;
  padding:12px 24px
}

.header-container{
  max-width:1200px;
  margin:0 auto;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:8px
}

.header-left{
  display:flex;
  align-items:center;
  justify-content:flex-start
}

.header-center{
  display:flex;
  justify-content:center;
  align-items:center
}

.header-right{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px
}

.logo-link{
  display:flex;
  align-items:center;
  text-decoration:none
}

.header-logo{
  height:40px;
  width:auto;
  transition:transform 0.2s ease
}

.header-logo:hover{
  transform:scale(1.05)
}

/* User info in header */
.user-info{
  display:flex;
  align-items:center;
  gap:8px;
  background:rgba(255,255,255,0.12);
  border-radius:24px;
  padding:4px 12px 4px 4px
}

.user-avatar{
  width:32px;
  height:32px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid rgba(255,255,255,0.4)
}

.user-details{
  display:flex;
  flex-direction:column;
  gap:1px
}

.user-name{
  font-size:13px;
  font-weight:600;
  color:#ffffff;
  line-height:1.2
}

.user-email{
  font-size:11px;
  color:rgba(255,255,255,0.7);
  line-height:1.2
}

.kofi-btn{
  display:inline-flex;
  align-items:center;
  gap:5px;
  background:#FF5E5B;
  color:#fff;
  font-size:12px;
  font-weight:600;
  border-radius:20px;
  padding:6px 14px;
  white-space:nowrap;
  transition:opacity 0.2s,transform 0.2s;
  border:none;
  cursor:pointer
}
.kofi-btn:hover{ opacity:0.88;transform:translateY(-1px) }

/* ── Burger button (mobile only) ── */
.burger-btn{
  display:none;
  flex-direction:column;
  justify-content:center;
  gap:5px;
  width:36px;
  height:36px;
  padding:6px;
  background:rgba(255,255,255,0.1);
  border:1px solid rgba(255,255,255,0.2);
  border-radius:8px;
  cursor:pointer;
  flex-shrink:0
}
.burger-btn span{
  display:block;
  height:2px;
  background:#fff;
  border-radius:2px;
  transition:transform 0.2s,opacity 0.2s
}
.burger-btn.open span:nth-child(1){ transform:translateY(7px) rotate(45deg) }
.burger-btn.open span:nth-child(2){ opacity:0 }
.burger-btn.open span:nth-child(3){ transform:translateY(-7px) rotate(-45deg) }

/* ── Mobile nav overlay ── */
.mobile-nav-overlay{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.55);
  z-index:199;
  backdrop-filter:blur(2px)
}
.mobile-nav-overlay.open{ display:block }

/* ── Mobile nav drawer ── */
.mobile-nav{
  position:fixed;
  top:0;
  left:0;
  bottom:0;
  width:260px;
  max-width:80vw;
  background:#111f36;
  border-right:1px solid #1a2d4a;
  z-index:200;
  transform:translateX(-100%);
  transition:transform 0.25s ease;
  display:flex;
  flex-direction:column
}
.mobile-nav.open{
  transform:translateX(0)
}
.mobile-nav-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 16px 14px;
  border-bottom:1px solid #1a2d4a
}
.mobile-nav-title{
  font-size:13px;
  font-weight:600;
  color:rgba(255,255,255,0.5);
  letter-spacing:0.08em;
  text-transform:uppercase
}
.mobile-nav-close{
  width:28px;
  height:28px;
  background:rgba(255,255,255,0.08);
  border:none;
  border-radius:6px;
  color:#fff;
  font-size:14px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center
}
.mobile-nav-items{
  flex:1;
  padding:12px 8px;
  display:flex;
  flex-direction:column;
  gap:2px
}
.mobile-nav-item{
  display:block;
  padding:12px 14px;
  color:rgba(255,255,255,0.85);
  text-decoration:none;
  font-size:15px;
  font-weight:500;
  border-radius:8px;
  transition:background 0.15s
}
.mobile-nav-item:hover,
.mobile-nav-item.active{ background:rgba(255,255,255,0.1);color:#fff }
.mobile-nav-footer{
  padding:16px;
  border-top:1px solid #1a2d4a
}
.kofi-btn.mobile-kofi{
  width:100%;
  justify-content:center;
  font-size:14px;
  padding:10px 16px
}

/* ── User dropdown (mobile) ── */
.user-dropdown{
  display:none;
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  background:#111f36;
  border:1px solid #1a2d4a;
  border-radius:10px;
  padding:12px 14px;
  min-width:200px;
  box-shadow:0 8px 24px rgba(0,0,0,0.4);
  z-index:150;
  flex-direction:column;
  gap:4px
}
.user-dropdown.open{ display:flex }
.user-dropdown-name{
  font-size:13px;
  font-weight:600;
  color:#fff
}
.user-dropdown-email{
  font-size:12px;
  color:rgba(255,255,255,0.55);
  word-break:break-all;
  margin-bottom:8px
}
.user-dropdown-signout{
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.12);
  border-radius:6px;
  color:rgba(255,255,255,0.8);
  font-size:12px;
  font-weight:500;
  padding:7px 10px;
  cursor:pointer;
  text-align:left;
  transition:background 0.15s
}
.user-dropdown-signout:hover{ background:rgba(255,255,255,0.14) }

/* Token cost preview bar */
.token-cost-preview{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:var(--radius-sm);
  background:rgba(74,116,181,0.08);
  border:1px solid rgba(74,116,181,0.18);
  font-size:13px;
  color:var(--text-secondary);
  margin-bottom:8px
}
[data-theme="dark"] .token-cost-preview{
  background:rgba(255,255,255,0.05);
  border-color:rgba(255,255,255,0.1);
  color:#b0c4de
}
.cost-icon{ font-size:14px }
#costBreakdown{ font-weight:600;color:var(--accent-primary) }
[data-theme="dark"] #costBreakdown{ color:#7eb3f5 }
.cost-remaining{ margin-left:auto;font-size:12px;opacity:0.7 }

/* Ko-fi pack picker modal */
.kofi-modal{ max-width:480px }
.kofi-modal-header{ margin-bottom:16px }
.kofi-modal-header h3{ margin-bottom:4px }
.kofi-packs{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:14px
}
.kofi-pack{
  display:grid;
  grid-template-columns:40px 1fr auto auto;
  align-items:center;
  gap:10px;
  background:var(--panel-bg);
  border:1.5px solid var(--panel-border);
  border-radius:10px;
  padding:12px 16px;
  cursor:pointer;
  text-align:left;
  transition:border-color 0.2s,transform 0.15s;
  position:relative;
  width:100%
}
.kofi-pack:hover{
  border-color:#FF5E5B;
  transform:translateY(-1px)
}
.kofi-pack-recommended{
  border-color:#FF5E5B;
  background:rgba(255,94,91,0.04)
}
.kofi-pack-badge{
  position:absolute;
  top:-9px;
  left:50%;
  transform:translateX(-50%);
  background:#FF5E5B;
  color:#fff;
  font-size:10px;
  font-weight:700;
  border-radius:8px;
  padding:1px 8px;
  letter-spacing:0.4px
}
.kofi-pack-icon{ font-size:18px }
.kofi-pack-name{ font-weight:600;font-size:14px }
.kofi-pack-tokens{
  font-size:13px;
  color:#FF5E5B;
  font-weight:600
}
.kofi-pack-price{
  font-size:14px;
  font-weight:700;
  color:var(--text-primary)
}
.kofi-note{ margin-bottom:12px;text-align:center }

.sign-out-btn{
  background:rgba(255,255,255,0.15);
  border:1px solid rgba(255,255,255,0.25);
  color:#ffffff;
  border-radius:12px;
  padding:3px 10px;
  font-size:11px;
  cursor:pointer;
  transition:background 0.2s ease;
  white-space:nowrap
}

.sign-out-btn:hover{
  background:rgba(255,255,255,0.28)
}

[data-theme="dark"] .user-info{
  background:rgba(255,255,255,0.08)
}

[data-theme="dark"] .sign-out-btn{
  background:rgba(255,255,255,0.1);
  border-color:rgba(255,255,255,0.2)
}

/* Logo switching by theme */
.logo-dark{ display:none }
.logo-light{ display:block }
[data-theme="dark"] .logo-dark{ display:block }
[data-theme="dark"] .logo-light{ display:none }

.header-nav{
  display:flex;
  align-items:center;
  gap:8px
}

.nav-item{
  color:#ffffff;
  text-decoration:none;
  padding:8px 16px;
  border-radius:8px;
  font-size:14px;
  font-weight:500;
  transition:all 0.2s ease;
  background:transparent
}

.nav-item:hover{
  background:rgba(255,255,255,0.15);
  color:#ffffff
}

.nav-item.active{
  background:rgba(255,255,255,0.2);
  color:#ffffff
}

/* Content Header */
.content-header{
  text-align:center;
  margin-bottom:12px;
  padding:8px 0
}

/* Legacy Header (for about page) */
.header{
  text-align:center;
  margin-bottom:40px;
  padding:20px 0
}
.header.content-header{
  margin-bottom:8px;
  padding:6px 0
}

.logo-container{
  display:inline-block;
  margin-bottom:20px;
  animation:fadeIn 0.6s ease-out
}

.logo{
  width:200px;
  height:auto;
  display:block;
  border-radius:8px
}

@keyframes pulse{
  0%, 100%{transform:scale(1)}
  50%{transform:scale(1.05)}
}

.header h1{
  font-size:42px;
  margin-bottom:8px;
  font-weight:600;
  letter-spacing:-0.5px;
  color:#ffffff;
  animation:fadeIn 0.6s ease-out
}
.header .subtitle{
  font-size:20px;
  font-weight:400;
  color:rgba(255,255,255,0.85);
  letter-spacing:0.2px
}

@keyframes fadeIn{
  from{opacity:0;transform:translateY(-10px)}
  to{opacity:1;transform:translateY(0)}
}

/* Token Balance Badge */
.token-balance{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:rgba(255,255,255,0.12);
  padding:6px 14px;
  border-radius:24px;
  font-weight:600;
  font-size:14px;
  border:1px solid rgba(255,255,255,0.2);
  box-shadow:var(--shadow-sm);
  transition:all 0.2s ease;
  color:#ffffff;
  animation:fadeIn 0.6s ease-out
}
.token-balance:hover{
  box-shadow:var(--shadow-md);
  transform:translateY(-1px)
}
.token-balance .token-icon{font-size:18px;color:#ffffff}
.token-balance .token-count{
  font-size:16px;
  letter-spacing:-0.3px;
  min-width:24px;
  text-align:center;
  color:#ffffff
}
.token-balance.low{
  color:#fca5a5
}
.token-balance.low .token-count,
.token-balance.low .token-label,
.token-balance.low .token-icon{
  color:#fca5a5
}
.purchased-tokens-badge{
  display:inline-flex;
  align-items:center;
  gap:3px;
  background:rgba(245,158,11,0.2);
  border:1px solid rgba(245,158,11,0.4);
  border-radius:10px;
  padding:1px 8px;
  font-size:12px;
  font-weight:600;
  color:#f59e0b;
  margin-left:6px
}
[data-theme="dark"] .purchased-tokens-badge{
  background:rgba(245,158,11,0.15);
  border-color:rgba(245,158,11,0.3)
}
.token-label{
  font-size:11px;
  opacity:0.8
}

/* Dark Mode Toggle */
.theme-toggle{
  position:relative;
  border-radius:8px;
  background:rgba(255,255,255,0.2);
  border:1px solid rgba(255,255,255,0.3);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:all 0.2s ease;
  margin-left:8px;
  padding:8px 14px
}
.theme-toggle:hover{
  background:rgba(255,255,255,0.3)
}
.theme-label{
  color:#ffffff;
  font-size:13px;
  font-weight:600;
  white-space:nowrap
}

/* Dark Mode Toggle - when dark theme is active */
[data-theme="dark"] .theme-toggle{
  background:rgba(255,255,255,0.1);
  border-color:rgba(255,255,255,0.2)
}
[data-theme="dark"] .theme-toggle:hover{
  background:rgba(255,255,255,0.2)
}
[data-theme="dark"] .theme-label{
  color:#ffffff
}
[data-theme="dark"] .top-header{
  background:rgba(10,22,40,0.95);
  border-bottom-color:#1a2d4a
}
[data-theme="dark"] .nav-item{
  color:#b0c4de
}
[data-theme="dark"] .nav-item:hover{
  background:rgba(255,255,255,0.08);
  color:#ffffff
}
[data-theme="dark"] .nav-item.active{
  background:rgba(255,255,255,0.12);
  color:#ffffff
}

/* Content Type Box */
.content-type-box{
  display:none;
  padding:8px 14px;
  background:var(--accent-light);
  color:var(--accent-primary);
  border:1px solid var(--accent-primary);
  border-radius:var(--radius-sm);
  font-size:14px;
  font-weight:600;
  align-items:center;
  gap:8px;
  white-space:nowrap
}
.content-type-box.active{display:flex}

.change-type-btn{
  background:transparent;
  color:var(--accent-primary);
  border:1px solid var(--accent-primary);
  padding:4px;
  border-radius:50%;
  width:24px;
  height:24px;
  min-width:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
  cursor:pointer;
  transition:all 0.2s;
  flex-shrink:0
}
.change-type-btn:hover{
  background:var(--accent-primary);
  color:#fff;
  transform:rotate(90deg)
}

/* Panels - Clean White Cards */
.content-wrapper{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  align-items:stretch
}

.panel{
  background:#ffffff;
  border-radius:var(--radius-lg);
  padding:28px;
  box-shadow:var(--shadow-md);
  border:1px solid #e0e6ed;
  display:flex;
  flex-direction:column;
  height:100%;
  transition:all 0.2s ease
}

.panel:hover{
  box-shadow:var(--shadow-lg);
  border-color:#b0c4de
}

/* Panel Titles */
.panel-title{
  font-size:20px;
  color:#0a1628;
  font-weight:600;
  margin-bottom:6px;
  letter-spacing:-0.3px
}
.panel-description{
  font-size:14px;
  color:#4a74b5;
  line-height:1.5;
  margin-bottom:18px;
  font-weight:400
}

/* Textareas */
textarea{
  width:100%;
  padding:14px;
  border:1px solid #e0e6ed;
  border-radius:var(--radius-md);
  font-size:14px;
  font-family:inherit;
  resize:vertical;
  transition:all 0.2s ease;
  flex:1;
  min-height:400px;
  background:#ffffff;
  color:#0a1628;
  line-height:1.6
}
textarea:focus{
  outline:none;
  border-color:#739BD0;
  background:#ffffff;
  box-shadow:0 0 0 3px rgba(115,155,208,0.2)
}
textarea::placeholder{color:#8090a8}

.output-content{
  background:#ffffff;
  color:#0a1628;
  border:1px solid #e0e6ed;
  border-radius:var(--radius-md);
  padding:14px
}

/* Buttons - Modern Blue */
.button-container{text-align:center;margin-bottom:12px}

button{
  background:var(--accent-primary);
  color:#fff;
  border:none;
  padding:14px 32px;
  border-radius:var(--radius-md);
  font-size:15px;
  font-weight:600;
  cursor:pointer;
  transition:all 0.2s ease;
  box-shadow:var(--shadow-sm);
  letter-spacing:0.2px;
  position:relative
}

button:hover{
  background:var(--accent-hover);
  box-shadow:var(--shadow-md);
  transform:translateY(-1px)
}
button:active{
  transform:translateY(0);
  box-shadow:var(--shadow-sm)
}

button:disabled{
  background:#d1d5db;
  color:#9ca3af;
  cursor:not-allowed;
  box-shadow:none;
  opacity:0.6
}

.secondary{
  background:var(--bg-secondary);
  color:var(--text-primary);
  border:1px solid var(--border-color);
  box-shadow:var(--shadow-sm)
}
.secondary:hover{
  background:var(--bg-tertiary);
  border-color:#d1d1d6;
  box-shadow:var(--shadow-md)
}

.copy-btn{
  background:var(--accent-primary);
  color:#fff;
  padding:10px 24px;
  font-size:14px;
  box-shadow:var(--shadow-sm)
}

.regenerate-btn{
  background:transparent;
  color:var(--accent-primary);
  border:1px solid var(--accent-primary);
  padding:10px 20px;
  font-size:14px;
  border-radius:var(--radius-md);
  cursor:pointer;
  transition:all 0.2s ease;
  font-weight:600
}
.regenerate-btn:hover{
  background:var(--accent-primary);
  color:#fff
}

/* Output actions row */
.output-actions{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
  margin-top:16px
}

/* Export wrapper + dropdown */
.export-wrapper{
  position:relative
}

.export-toggle-btn{
  background:var(--accent-primary);
  color:#fff;
  border:none;
  padding:10px 18px;
  border-radius:var(--radius-md);
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:6px;
  transition:all 0.2s ease;
  box-shadow:var(--shadow-sm)
}
.export-toggle-btn:hover{
  background:var(--accent-hover);
  box-shadow:var(--shadow-md);
  transform:translateY(-1px)
}

.export-menu{
  display:none;
  position:absolute;
  bottom:calc(100% + 8px);
  right:0;
  background:#ffffff;
  border:1px solid var(--border-color);
  border-radius:var(--radius-md);
  box-shadow:var(--shadow-lg);
  overflow:hidden;
  min-width:190px;
  z-index:50
}
.export-menu.open{ display:block }

.export-option{
  display:block;
  width:100%;
  text-align:left;
  background:none;
  border:none;
  border-radius:0;
  padding:12px 16px;
  font-size:14px;
  font-weight:500;
  cursor:pointer;
  color:var(--text-primary);
  box-shadow:none;
  transition:background 0.15s ease
}
.export-option:hover{
  background:var(--bg-secondary);
  color:var(--accent-primary);
  transform:none;
  box-shadow:none
}
.export-option + .export-option{
  border-top:1px solid var(--border-color)
}
.export-option-disabled{
  opacity:0.55;
  cursor:not-allowed
}
.export-option-disabled:hover{
  background:none;
  color:var(--text-primary);
  transform:none
}

[data-theme="dark"] .export-menu{
  background:#111f36;
  border-color:#1a2d4a
}
[data-theme="dark"] .export-option:hover{
  background:#1a2d4a
}

/* Loading & Error */
.loading{
  display:none;
  text-align:center;
  color:#ffffff;
  font-weight:500;
  margin-bottom:20px
}
.loading.active{display:block}

.spinner{
  border:3px solid var(--border-color);
  border-top:3px solid var(--accent-primary);
  border-radius:50%;
  width:40px;
  height:40px;
  animation:spin 0.8s linear infinite;
  margin:0 auto 12px
}
@keyframes spin{
  0%{transform:rotate(0deg)}
  100%{transform:rotate(360deg)}
}

/* Progress Indicator */
.progress-container{
  background:rgba(255,255,255,0.1);
  border-radius:var(--radius-md);
  padding:20px 24px;
  margin:16px 0;
  border:1px solid rgba(255,255,255,0.2);
  box-shadow:var(--shadow-sm);
  display:none
}
.progress-container.active{display:block}

.progress-steps{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
  position:relative
}

.progress-steps::before{
  content:'';
  position:absolute;
  top:16px;
  left:0;
  right:0;
  height:2px;
  background:var(--border-color);
  z-index:0
}

.progress-line{
  position:absolute;
  top:16px;
  left:0;
  height:2px;
  background:var(--accent-primary);
  transition:width 0.5s ease;
  z-index:1;
  border-radius:2px
}

.progress-step{
  position:relative;
  z-index:2;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  flex:1
}

.progress-step-circle{
  width:32px;
  height:32px;
  border-radius:50%;
  background:var(--bg-tertiary);
  border:2px solid var(--border-color);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  transition:all 0.3s ease;
  color:var(--text-muted);
  font-weight:600
}

.progress-step.active .progress-step-circle{
  background:var(--accent-primary);
  border-color:var(--accent-primary);
  color:#fff;
  box-shadow:0 0 0 4px var(--accent-light)
}

.progress-step.completed .progress-step-circle{
  background:var(--accent-primary);
  border-color:var(--accent-primary);
  color:#fff
}

.progress-step-label{
  font-size:12px;
  font-weight:500;
  color:var(--text-muted);
  transition:color 0.3s ease
}

.progress-step.active .progress-step-label{
  color:var(--text-primary);
  font-weight:600
}

.progress-step.completed .progress-step-label{
  color:var(--text-secondary)
}

.progress-message{
  text-align:center;
  font-size:13px;
  color:var(--text-secondary);
  font-weight:500;
  margin-top:8px
}

.error{
  background:#fef2f2;
  border:1px solid #fecaca;
  color:#991b1b;
  padding:14px;
  border-radius:var(--radius-md);
  margin-bottom:16px;
  display:none;
  text-align:center;
  font-weight:500;
  font-size:14px
}
.error.active{display:block}

/* Tips */
.tips{
  background:rgba(255,255,255,0.12);
  border-left:3px solid #ffffff;
  padding:10px 16px;
  border-radius:var(--radius-sm);
  margin-bottom:12px;
  font-size:14px;
  color:rgba(255,255,255,0.9);
  border:1px solid rgba(255,255,255,0.2);
  border-left:3px solid #ffffff;
  box-shadow:var(--shadow-sm);
  font-weight:400;
  line-height:1.6
}

/* Modal Styles */
.type-modal-overlay,.modal-overlay,.custom-type-modal-overlay{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.4);
  display:none;
  justify-content:center;
  align-items:center;
  z-index:1000;
  backdrop-filter:blur(4px);
  animation:fadeIn 0.2s ease
}

.type-modal,.modal,.custom-type-modal{
  background:var(--bg-secondary);
  border-radius:var(--radius-xl);
  box-shadow:var(--shadow-xl);
  animation:slideUp 0.3s ease;
  border:1px solid var(--border-color)
}

@keyframes slideUp{
  from{opacity:0;transform:translateY(20px)}
  to{opacity:1;transform:translateY(0)}
}

.type-modal{
  padding:0;
  width:100%;
  max-width:720px;
  max-height:90vh;
  overflow:hidden;
  display:flex;
  flex-direction:column
}

/* Modal Header */
.modal-header{
  padding:32px 36px 24px;
  border-bottom:1px solid var(--border-color);
  text-align:center
}
.modal-header h3{
  font-size:28px;
  margin-bottom:8px;
  color:var(--text-primary);
  font-weight:600
}
.modal-header .muted{
  color:var(--text-secondary);
  font-size:15px;
  font-weight:400;
  margin:0
}

/* Modal Footer */
.modal-footer{
  padding:20px 36px;
  border-top:1px solid var(--border-color);
  text-align:center;
  background:var(--bg-tertiary)
}

/* Type Options Grid */
.type-options{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:16px;
  padding:32px 36px;
  overflow-y:auto;
  max-height:calc(90vh - 200px)
}

/* Individual Type Option Card */
.type-option{
  padding:20px;
  border:2px solid var(--border-color);
  border-radius:var(--radius-lg);
  cursor:pointer;
  transition:all 0.2s ease;
  background:var(--bg-secondary);
  display:flex;
  align-items:flex-start;
  gap:16px;
  text-align:left;
  position:relative;
  overflow:hidden
}

.type-option::before{
  content:'';
  position:absolute;
  top:0;
  left:0;
  right:0;
  bottom:0;
  background:linear-gradient(135deg,var(--accent-light) 0%,transparent 100%);
  opacity:0;
  transition:opacity 0.2s ease;
  pointer-events:none
}

.type-option:hover{
  border-color:var(--accent-primary);
  transform:translateY(-4px);
  box-shadow:var(--shadow-lg)
}

.type-option:hover::before{
  opacity:1
}

.type-option:active{
  transform:translateY(-2px)
}

/* Type Icon */
.type-icon{
  font-size:32px;
  width:48px;
  height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--bg-tertiary);
  border-radius:var(--radius-md);
  flex-shrink:0;
  transition:all 0.2s ease;
  position:relative;
  z-index:1
}

.type-option:hover .type-icon{
  background:var(--accent-light);
  transform:scale(1.1)
}

/* Type Info */
.type-info{
  flex:1;
  position:relative;
  z-index:1
}

.type-name{
  font-size:16px;
  font-weight:600;
  color:var(--text-primary);
  margin-bottom:4px;
  letter-spacing:-0.2px
}

.type-desc{
  font-size:13px;
  color:var(--text-secondary);
  line-height:1.4
}

.type-option:hover .type-name{
  color:var(--accent-primary)
}

.modal{
  padding:28px;
  width:380px;
  text-align:center;
  max-height:90vh;
  overflow-y:auto
}

.custom-type-modal{
  padding:0;
  width:100%;
  max-width:520px;
  max-height:90vh;
  overflow:hidden;
  display:flex;
  flex-direction:column
}

.modal h3{
  font-size:24px;
  margin-bottom:12px;
  color:var(--text-primary);
  font-weight:600
}

/* Custom Modal Header */
.custom-modal-header{
  padding:32px 36px 24px;
  border-bottom:1px solid var(--border-color);
  text-align:center
}

.custom-modal-header h3{
  font-size:24px;
  margin:0 0 8px 0;
  color:var(--text-primary);
  font-weight:600
}

.custom-modal-header .muted{
  margin:0;
  font-size:14px;
  color:var(--text-secondary)
}

/* Custom Modal Body */
.custom-modal-body{
  padding:32px 36px;
  flex:1;
  overflow-y:auto
}

.input-wrapper{
  text-align:left
}

.input-wrapper label{
  display:block;
  font-size:14px;
  font-weight:500;
  color:var(--text-primary);
  margin-bottom:8px
}

.input-wrapper input{
  width:100%;
  padding:14px 16px;
  border:2px solid var(--border-color);
  border-radius:var(--radius-md);
  font-size:15px;
  box-sizing:border-box;
  transition:all 0.2s ease;
  background:var(--bg-tertiary);
  color:var(--text-primary)
}

.input-wrapper input:focus{
  outline:none;
  border-color:var(--accent-primary);
  box-shadow:0 0 0 3px var(--accent-light);
  background:var(--bg-secondary)
}

.input-wrapper input::placeholder{
  color:var(--text-muted)
}

.input-hint{
  font-size:12px;
  color:var(--text-secondary);
  margin-top:8px
}

.point-hint{
  font-size:12px;
  color:#6880a0;
  margin-top:6px;
  padding:6px 10px;
  background:rgba(74,116,181,0.08);
  border-left:3px solid #4a74b5;
  border-radius:0 4px 4px 0;
  line-height:1.5
}
.point-hint strong{
  color:#7ba3d8
}

/* Custom Modal Footer */
.custom-modal-footer{
  padding:20px 36px;
  border-top:1px solid var(--border-color);
  background:var(--bg-tertiary);
  display:flex;
  gap:12px;
  justify-content:flex-end
}

.custom-modal-footer button{
  width:auto;
  min-width:100px;
  margin:0;
  padding:12px 24px
}

.modal input{
  width:100%;
  padding:12px;
  border:1px solid var(--border-color);
  border-radius:var(--radius-md);
  margin:10px 0;
  font-size:14px;
  box-sizing:border-box;
  transition:border-color 0.2s;
  background:var(--bg-tertiary)
}
.modal input:focus{
  outline:none;
  border-color:var(--accent-primary);
  box-shadow:0 0 0 3px var(--accent-light);
  background:var(--bg-secondary)
}

.modal textarea{
  width:100%;
  min-height:120px;
  padding:12px;
  border:1px solid var(--border-color);
  border-radius:var(--radius-md);
  margin:10px 0;
  font-size:14px;
  box-sizing:border-box;
  font-family:inherit;
  transition:border-color 0.2s;
  background:var(--bg-tertiary)
}
.modal textarea:focus{
  outline:none;
  border-color:var(--accent-primary);
  box-shadow:0 0 0 3px var(--accent-light);
  background:var(--bg-secondary)
}

.modal button{width:100%;margin:8px 0;padding:12px}

.type-modal button{
  width:auto;
  margin:8px auto;
  display:block
}

.free-credits{
  background:#f0fdf4;
  padding:12px;
  border-radius:var(--radius-md);
  color:#166534;
  font-size:14px;
  margin:12px 0;
  display:none;
  border:1px solid #bbf7d0
}

.action-buttons{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.action-buttons button{width:100%}

.upgrade-btn{
  background:linear-gradient(135deg,#f59e0b,#ef4444);
  color:#fff;
  border:none;
  font-weight:600;
  letter-spacing:0.3px
}

.upgrade-btn:hover{
  background:linear-gradient(135deg,#d97706,#dc2626);
  transform:translateY(-1px)
}

/* Word Count Display */
.word-count-container{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:8px 0;
  margin:8px 0;
  font-size:13px;
  font-weight:500
}

.word-count{color:var(--text-primary)}

.word-count-status{
  padding:4px 10px;
  border-radius:12px;
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.5px;
  transition:all 0.2s
}

.word-count-status.insufficient{
  background:#fef2f2;
  color:#991b1b
}

.word-count-status.sufficient{
  background:#f0fdf4;
  color:#166534
}

/* Writing Sample */
.writing-sample-section{
  margin-top:16px;
  margin-bottom:16px;
}

.writing-sample-section[disabled]{opacity:0.6}

.writing-sample-checkbox{display:flex;align-items:center;gap:10px}
.writing-sample-checkbox input[type="checkbox"]{width:18px;height:18px;cursor:pointer;accent-color:var(--accent-primary)}
.writing-sample-checkbox label{cursor:pointer;font-weight:500;color:var(--text-primary);margin:0;display:flex;align-items:center;gap:6px;font-size:14px}

.writing-sample-token-cost{
  display:inline-block;
  background:var(--accent-primary);
  color:#fff;
  padding:2px 8px;
  border-radius:10px;
  font-size:10px;
  font-weight:600;
  letter-spacing:0.3px;
  margin-left:4px;
  text-transform:uppercase
}

.writing-sample-info{
  display:none;
  font-size:12px;
  color:var(--text-secondary);
  margin-top:8px;
  padding:6px 10px;
  background:var(--accent-light);
  border-left:3px solid var(--accent-primary);
  border-radius:0 var(--radius-sm) var(--radius-sm) 0
}
.writing-sample-info.visible{display:block}

.writing-sample-textarea{display:none;margin-top:10px}
.writing-sample-textarea.active{display:block}
.writing-sample-textarea textarea{
  width:100%;
  padding:12px;
  border:1px solid var(--border-color);
  border-radius:var(--radius-md);
  font-size:13px;
  font-family:inherit;
  resize:vertical;
  min-height:100px;
  background:var(--bg-secondary);
  color:var(--text-primary)
}
.writing-sample-textarea textarea:focus{
  outline:none;
  border-color:var(--accent-primary);
  box-shadow:0 0 0 3px var(--accent-light)
}

.coming-soon-badge{
  display:inline-block;
  background:var(--accent-primary);
  color:#fff;
  padding:2px 8px;
  border-radius:10px;
  font-size:10px;
  font-weight:600;
  letter-spacing:0.3px;
  margin-left:6px;
  text-transform:uppercase
}


/* Footer */
.footer{
  background:#ffffff;
  backdrop-filter:blur(10px);
  margin-top:60px;
  padding:32px 20px;
  text-align:center;
  color:#0a1628;
  border-top:1px solid #d0d8e4;
  position:relative;
  z-index:1
}

.footer a{
  color:#4a74b5;
  text-decoration:none
}

.footer a:hover{
  color:#3d6299
}

[data-theme="dark"] .footer{
  background:#111f36;
  color:#b0c4de;
  border-top:1px solid #1a2d4a
}
[data-theme="dark"] .footer a{
  color:#4d9aff
}

.footer-content{
  max-width:1200px;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  gap:20px;
  align-items:center
}

.footer-main{
  display:flex;
  flex-direction:column;
  gap:6px
}

.footer-main p{
  margin:0;
  font-weight:400;
  font-size:14px;
  letter-spacing:0.2px
}

.footer-main p strong{
  font-weight:600
}

/* Contact Information */
.footer-contact{
  display:flex;
  gap:16px;
  justify-content:center;
  align-items:center;
  flex-wrap:wrap;
  font-size:14px;
  opacity:0.9
}

.footer-divider{
  opacity:0.5
}

/* Custom Alert Dialog */
.alert-backdrop{
  position:fixed;
  top:0;
  left:0;
  right:0;
  bottom:0;
  background:rgba(0,0,0,0.4);
  display:flex;
  justify-content:center;
  align-items:center;
  z-index:10000;
  backdrop-filter:blur(4px);
  animation:fadeIn 0.2s ease
}

.alert-box{
  background:var(--bg-secondary);
  padding:28px;
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-xl);
  min-width:360px;
  max-width:480px;
  animation:slideUp 0.3s ease;
  border:1px solid var(--border-color)
}

.alert-content{
  text-align:center
}

.alert-content h3{
  font-size:20px;
  font-weight:600;
  margin-bottom:10px;
  color:var(--text-primary)
}

.alert-content p{
  font-size:14px;
  margin-bottom:20px;
  line-height:1.5;
  color:var(--text-secondary)
}

.alert-button{
  background:var(--accent-primary);
  color:#fff;
  border:none;
  padding:10px 32px;
  border-radius:var(--radius-md);
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  transition:all 0.2s;
  box-shadow:var(--shadow-sm)
}

.alert-button:hover{
  background:var(--accent-hover);
  box-shadow:var(--shadow-md);
  transform:translateY(-1px)
}

.alert-button:active{
  transform:translateY(0)
}

/* Suggestion Alert Modal */
.suggestion-alert-box{
  padding:0;
  max-width:560px;
  overflow:hidden;
  display:flex;
  flex-direction:column
}

.suggestion-alert-header{
  padding:32px 36px 24px;
  border-bottom:1px solid var(--border-color);
  text-align:center
}

.suggestion-alert-header h3{
  font-size:24px;
  margin:0 0 12px 0;
  color:var(--text-primary);
  font-weight:600
}

.suggestion-alert-header .muted{
  margin:0;
  font-size:14px;
  color:var(--text-secondary);
  line-height:1.5
}

.suggestion-alert-body{
  padding:32px 36px;
  text-align:left
}

.suggestion-label{
  font-size:14px;
  font-weight:600;
  color:var(--text-primary);
  margin:0 0 16px 0
}

.suggestion-buttons{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px
}

.suggestion-button{
  padding:16px 20px;
  border:2px solid var(--border-color);
  border-radius:var(--radius-md);
  background:var(--bg-secondary);
  color:var(--text-primary);
  font-size:14px;
  font-weight:500;
  cursor:pointer;
  transition:all 0.2s ease;
  text-align:center;
  position:relative;
  overflow:hidden
}

.suggestion-button::before{
  content:'';
  position:absolute;
  top:0;
  left:0;
  right:0;
  bottom:0;
  background:linear-gradient(135deg,var(--accent-light) 0%,transparent 100%);
  opacity:0;
  transition:opacity 0.2s ease;
  pointer-events:none
}

.suggestion-button:hover{
  border-color:var(--accent-primary);
  transform:translateY(-2px);
  box-shadow:var(--shadow-md);
  color:var(--accent-primary)
}

.suggestion-button:hover::before{
  opacity:1
}

.suggestion-button:active{
  transform:translateY(0)
}

.suggestion-alert-footer{
  padding:20px 36px;
  border-top:1px solid var(--border-color);
  background:var(--bg-tertiary);
  display:flex;
  justify-content:center
}

.suggestion-alert-footer button{
  min-width:120px;
  padding:12px 24px
}

/* Utilities */
.muted{font-size:0.9rem;color:var(--text-secondary);margin-bottom:12px}
.small{font-size:13px}
.title-with-type{display:flex;align-items:center;gap:12px;flex-wrap:wrap}

/* Toast Notifications */
.toast-container{
  position:fixed;
  top:20px;
  right:20px;
  z-index:10001;
  display:flex;
  flex-direction:column;
  gap:10px;
  max-width:380px;
  pointer-events:none
}

.toast{
  background:var(--bg-secondary);
  border:1px solid var(--border-color);
  padding:14px 18px;
  border-radius:var(--radius-md);
  box-shadow:var(--shadow-lg);
  display:flex;
  align-items:center;
  gap:12px;
  min-width:280px;
  animation:slideInRight 0.3s ease;
  pointer-events:auto;
  cursor:pointer
}

.toast.success{
  background:#f0fdf4;
  border-color:#bbf7d0;
  color:#166534
}

.toast.error{
  background:#fef2f2;
  border-color:#fecaca;
  color:#991b1b
}

.toast.warning{
  background:#fffbeb;
  border-color:#fde68a;
  color:#92400e
}

.toast.info{
  background:#eff6ff;
  border-color:#bfdbfe;
  color:#1e40af
}

.toast-icon{
  font-size:20px;
  flex-shrink:0
}

.toast-content{
  flex:1
}

.toast-title{
  font-weight:600;
  font-size:14px;
  margin-bottom:2px
}

.toast-message{
  font-size:13px;
  opacity:0.9;
  line-height:1.4
}

.toast-close{
  background:transparent;
  border:none;
  color:inherit;
  width:20px;
  height:20px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:all 0.2s;
  flex-shrink:0;
  font-size:14px;
  opacity:0.6
}

.toast-close:hover{
  opacity:1;
  background:rgba(0,0,0,0.05)
}

.toast-progress{
  position:absolute;
  bottom:0;
  left:0;
  height:2px;
  background:currentColor;
  width:100%;
  transform-origin:left;
  animation:shrinkProgress 5s linear forwards;
  opacity:0.3
}

.toast.hiding{
  animation:slideOutRight 0.3s ease forwards
}

@keyframes slideInRight{
  from{opacity:0;transform:translateX(100%)}
  to{opacity:1;transform:translateX(0)}
}

@keyframes slideOutRight{
  from{opacity:1;transform:translateX(0)}
  to{opacity:0;transform:translateX(100%)}
}

@keyframes shrinkProgress{
  from{transform:scaleX(1)}
  to{transform:scaleX(0)}
}

/* Panel Title with Info Button */
.panel-title-left{
  display:flex;
  align-items:center;
  gap:6px
}

.info-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  border-radius:50%;
  border:1.5px solid var(--border-color);
  background:transparent;
  cursor:pointer;
  transition:all 0.2s ease;
  padding:0;
  color:var(--text-secondary)
}

.info-button:hover{
  background:var(--accent-primary);
  color:#fff;
  border-color:var(--accent-primary);
  transform:scale(1.05)
}

.info-icon{
  font-size:14px;
  transition:transform 0.2s ease
}

.info-button:hover .info-icon{
  transform:rotate(12deg)
}

/* Tooltip Styles */
.token-tooltip{
  position:absolute;
  top:40px;
  left:8px;
  background:var(--text-primary);
  border-radius:var(--radius-md);
  padding:14px;
  box-shadow:var(--shadow-xl);
  z-index:1000;
  opacity:0;
  visibility:hidden;
  transform:translateY(-8px);
  transition:all 0.2s ease;
  min-width:260px;
  max-width:300px;
  border:1px solid rgba(0,0,0,0.1);
  color:#fff
}

.token-tooltip.show{
  opacity:1;
  visibility:visible;
  transform:translateY(0)
}

.tooltip-header{
  font-size:15px;
  font-weight:600;
  margin-bottom:10px;
  padding-bottom:8px;
  border-bottom:1px solid rgba(255,255,255,0.2)
}

.tooltip-content{
  color:#fff
}

.tooltip-notice{
  font-size:13px;
  margin-bottom:10px;
  opacity:0.9;
  line-height:1.4
}

.tooltip-pricing{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom:10px
}

.tooltip-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:6px 8px;
  background:rgba(255,255,255,0.1);
  border-radius:6px;
  transition:background 0.2s ease
}

.tooltip-item:hover{
  background:rgba(255,255,255,0.15)
}

.tooltip-type{
  font-size:13px;
  font-weight:500
}

.tooltip-cost{
  font-size:12px;
  font-weight:600;
  background:rgba(255,255,255,0.2);
  padding:3px 8px;
  border-radius:10px
}

.tooltip-footer{
  font-size:11px;
  opacity:0.7;
  margin-top:8px;
  padding-top:8px;
  border-top:1px solid rgba(255,255,255,0.2);
  text-align:center;
  font-style:italic
}

/* Responsive */
@media(max-width:968px){
  .content-wrapper{grid-template-columns:1fr}
  textarea{min-height:300px}
  .type-modal{max-width:90vw}
  .modal-header{padding:28px 24px 20px}
  .modal-footer{padding:16px 24px}
  .type-options{
    grid-template-columns:1fr;
    gap:12px;
    padding:24px
  }
  .type-icon{
    width:44px;
    height:44px;
    font-size:28px
  }
  .type-name{font-size:15px}
  .type-desc{font-size:12px}
  .header h1{font-size:36px}
  button{padding:12px 28px;font-size:14px}
  .top-header{padding:10px 16px}
  .header-logo{height:32px}
  .nav-item{padding:6px 10px;font-size:13px}
}

@media(max-width:768px){
  body{padding:16px}
  .main-container{padding:0 8px}
  .panel-title{font-size:18px}
  .panel-description{font-size:13px}
  .panel{padding:20px}
  button{padding:12px 24px;font-size:14px}
  .copy-btn{align-self:stretch}
  .title-with-type{gap:8px}
  .content-type-box{font-size:13px;padding:6px 12px}
  .token-balance{padding:6px 10px;font-size:13px;gap:5px}
  .token-balance .token-icon{font-size:15px}
  .token-balance .token-count{font-size:14px}
  .token-label{display:none}
  .toast-container{
    top:16px;
    right:16px;
    left:16px;
    max-width:none
  }
  .toast{
    min-width:0;
    width:100%
  }
  .footer-contact{
    gap:8px;
    flex-direction:column
  }
  .footer-divider{
    display:none
  }
  /* Show burger, hide desktop nav */
  .burger-btn{display:flex}
  .header-nav .nav-item{display:none}
  .header-nav .kofi-btn{display:none}
  /* User info: hide details + sign-out, show only avatar */
  .user-details{display:none}
  .sign-out-btn{display:none}
  .user-info{
    position:relative;
    cursor:pointer;
    padding:2px;
    background:transparent
  }
  .user-avatar{width:34px;height:34px}
}

@media(max-width:480px){
  body{padding:70px 12px 12px}
  .top-header{padding:8px 12px}
  .header-logo{height:28px}
  .header-nav{gap:4px}
  .theme-toggle{width:32px;height:32px;margin-left:4px}
  .theme-toggle svg{width:16px;height:16px}
  .user-name{display:none}
  .user-email{font-size:10px}
  .type-modal{width:95%;max-width:95vw}
  .modal-header{padding:24px 20px 16px}
  .modal-header h3{font-size:24px}
  .modal-header .muted{font-size:14px}
  .modal-footer{padding:16px 20px}
  .type-options{
    grid-template-columns:1fr;
    gap:12px;
    padding:20px
  }
  .type-option{
    padding:16px;
    gap:12px
  }
  .type-icon{
    width:40px;
    height:40px;
    font-size:24px
  }
  .type-name{font-size:14px}
  .type-desc{font-size:12px}
  .modal{width:90%;max-width:90vw;padding:24px}
  .custom-type-modal{width:90%;max-width:90vw}
  .custom-modal-header{padding:24px 20px 20px}
  .custom-modal-body{padding:24px 20px}
  .custom-modal-footer{padding:16px 20px;flex-direction:column}
  .custom-modal-footer button{width:100%;min-width:auto}
  .suggestion-alert-box{width:90%;max-width:90vw}
  .suggestion-alert-header{padding:24px 20px 20px}
  .suggestion-alert-body{padding:24px 20px}
  .suggestion-buttons{grid-template-columns:1fr;gap:10px}
  .suggestion-button{padding:14px 16px;font-size:13px}
  .suggestion-alert-footer{padding:16px 20px}
  .header{margin-bottom:32px}
  .header h1{font-size:32px}
  .header .subtitle{font-size:17px}
  .panel{padding:16px}
  .content-wrapper{gap:12px}
  .tips{font-size:13px;padding:12px}
  textarea{min-height:250px;font-size:13px;padding:12px}
  button{padding:12px 20px;font-size:13px;width:100%}
  .copy-btn{padding:10px 16px}
  .alert-box{min-width:90%;max-width:90vw;padding:24px}
  .alert-content h3{font-size:18px}
  .alert-content p{font-size:13px}
  .token-balance{position:static;margin:12px auto 0;padding:8px 14px;font-size:13px}
  .token-balance .token-icon{font-size:16px}
  .token-balance .token-count{font-size:14px}
  .footer{
    padding:24px 12px;
    margin-top:40px
  }
  .footer-main p{
    font-size:13px
  }
  .footer-contact{
    font-size:12px
  }
  .token-tooltip{
    left:50%;
    transform:translateX(-50%) translateY(-8px);
    min-width:240px
  }
  .token-tooltip.show{
    transform:translateX(-50%) translateY(0)
  }
  .info-button{
    width:28px;
    height:28px
  }
  .info-icon{
    font-size:16px
  }
}

/* ========================================
   About Page Styles
   ======================================== */

.page-navigation{
  margin-top:24px
}

.nav-link{
  color:var(--accent-primary);
  text-decoration:none;
  font-size:1rem;
  padding:10px 20px;
  border:1px solid var(--border-color);
  border-radius:var(--radius-md);
  background:var(--bg-secondary);
  display:inline-block;
  transition:all 0.2s ease
}

.nav-link:hover{
  background:var(--accent-primary);
  color:white;
  border-color:var(--accent-primary);
  transform:translateX(-4px)
}

.footer-link{
  color:var(--accent-primary);
  text-decoration:none;
  transition:color 0.2s ease
}

.footer-link:hover{
  color:var(--text-primary);
  text-decoration:underline
}

.about-content{
  max-width:900px;
  margin:0 auto;
  padding:40px 20px 80px
}

.about-section{
  background:var(--bg-secondary);
  border:1px solid var(--border-color);
  border-radius:var(--radius-lg);
  padding:40px;
  margin-bottom:32px;
  box-shadow:var(--shadow-md);
  position:relative;
  z-index:1
}

.about-section h2{
  color:var(--text-primary);
  font-size:1.75rem;
  margin-bottom:20px;
  font-weight:600
}

.about-section p{
  color:var(--text-secondary);
  line-height:1.8;
  margin-bottom:16px;
  font-size:1.05rem
}

.section-icon{
  font-size:3rem;
  margin-bottom:16px;
  display:block
}

.process-steps{
  margin-top:32px
}

.process-step{
  display:flex;
  gap:24px;
  margin-bottom:32px;
  align-items:flex-start
}

.process-step:last-child{
  margin-bottom:0
}

.step-number{
  width:48px;
  height:48px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--accent-primary),var(--accent-hover));
  color:white;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.5rem;
  font-weight:700;
  flex-shrink:0;
  box-shadow:0 4px 12px rgba(96,165,250,0.3)
}

.step-content h3{
  color:var(--text-primary);
  font-size:1.25rem;
  margin-bottom:12px;
  font-weight:600
}

.step-content p{
  margin-bottom:0;
  font-size:1rem
}

.privacy-list,.tech-list,.tips-list{
  list-style:none;
  padding:0;
  margin-top:20px
}

.privacy-list li,.tech-list li,.tips-list li{
  color:var(--text-secondary);
  padding:12px 0;
  border-bottom:1px solid var(--border-color);
  line-height:1.6;
  font-size:1rem
}

.privacy-list li:last-child,.tech-list li:last-child,.tips-list li:last-child{
  border-bottom:none
}

.tech-list li strong{
  color:var(--accent-primary);
  font-weight:600
}

.contact-section{
  background:linear-gradient(135deg,var(--bg-secondary),var(--bg-tertiary));
  border-color:var(--accent-primary);
  border-width:2px
}

.contact-links{
  display:flex;
  gap:16px;
  margin-top:24px;
  flex-wrap:wrap
}

.contact-button{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:14px 24px;
  background:var(--accent-primary);
  color:white;
  text-decoration:none;
  border-radius:var(--radius-md);
  font-weight:500;
  transition:all 0.2s ease;
  box-shadow:var(--shadow-sm)
}

.contact-button:hover{
  background:var(--accent-hover);
  transform:translateY(-2px);
  box-shadow:var(--shadow-md)
}

.contact-button span{
  font-size:1.25rem
}

/* Workflow Diagram */
.workflow-section{
  text-align:center
}

.workflow-diagram{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin-top:32px;
  flex-wrap:wrap;
  padding:24px;
  background:var(--bg-tertiary);
  border-radius:var(--radius-lg)
}

.workflow-step{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  padding:20px;
  background:var(--bg-secondary);
  border-radius:var(--radius-md);
  border:1px solid var(--border-color);
  min-width:100px;
  transition:all 0.2s ease
}

.workflow-step:hover{
  transform:translateY(-4px);
  box-shadow:var(--shadow-md);
  border-color:var(--accent-primary)
}

.workflow-icon{
  font-size:2rem
}

.workflow-label{
  font-weight:600;
  font-size:0.9rem;
  color:var(--text-primary)
}

.workflow-desc{
  font-size:0.75rem;
  color:var(--text-muted)
}

.workflow-arrow{
  font-size:1.5rem;
  color:var(--accent-primary);
  font-weight:bold
}

@media(max-width:768px){
  .about-section{
    padding:24px
  }
  .about-section h2{
    font-size:1.5rem
  }
  .section-icon{
    font-size:2.5rem
  }
  .process-step{
    flex-direction:column;
    gap:16px
  }
  .contact-links{
    flex-direction:column
  }
  .contact-button{
    justify-content:center
  }
  .workflow-diagram{
    flex-direction:column;
    gap:8px
  }
  .workflow-arrow{
    transform:rotate(90deg)
  }
  .workflow-step{
    min-width:80%;
    padding:16px
  }
}

/* Google Sign-In Button */
.google-signin-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  width:100%;
  padding:12px 20px;
  background:#ffffff;
  color:#3c4043;
  border:1px solid #dadce0;
  border-radius:var(--radius-md);
  font-size:15px;
  font-weight:500;
  font-family:inherit;
  cursor:pointer;
  transition:box-shadow 0.2s,background 0.2s;
  margin-top:8px
}
.google-signin-btn:hover{
  box-shadow:0 1px 4px rgba(0,0,0,0.2);
  background:#f8f9fa
}
.google-signin-btn:disabled{
  opacity:0.7;
  cursor:not-allowed
}
[data-theme="dark"] .google-signin-btn{
  background:#1a2d4a;
  color:#e8eaed;
  border-color:#3c4556
}
[data-theme="dark"] .google-signin-btn:hover{
  background:#1f3455;
  box-shadow:0 1px 4px rgba(0,0,0,0.4)
}

/* ============================================
   Full-Screen Login Overlay
   ============================================ */
.login-overlay{
  position:fixed;
  inset:0;
  z-index:2000;
  background:var(--bg-primary);
  display:flex;
  align-items:stretch;
  overflow:auto
}

.login-page{
  display:flex;
  width:100%;
  min-height:100vh
}

.login-brand-col{
  flex:1;
  background:var(--bg-secondary);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:60px 48px
}

.login-brand-content{
  max-width:480px;
  width:100%
}

.login-app-logo{
  height:52px;
  width:auto;
  margin-bottom:28px;
  display:block
}

.login-app-title{
  font-size:40px;
  font-weight:700;
  color:var(--text-primary);
  margin-bottom:12px;
  font-family:"Lora",Georgia,serif;
  line-height:1.2
}

.login-app-tagline{
  font-size:18px;
  color:var(--text-secondary);
  margin-bottom:44px;
  line-height:1.6
}

.login-features{
  display:flex;
  flex-direction:column;
  gap:24px
}

.login-feature{
  display:flex;
  gap:16px;
  align-items:flex-start
}

.login-feature .feature-icon{
  font-size:22px;
  width:44px;
  height:44px;
  min-width:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--accent-light);
  border-radius:12px
}

.login-feature strong{
  display:block;
  font-size:15px;
  font-weight:600;
  color:var(--text-primary);
  margin-bottom:3px
}

.login-feature span{
  font-size:14px;
  color:var(--text-secondary);
  line-height:1.5
}

.login-card-col{
  width:440px;
  flex-shrink:0;
  background:var(--panel-bg);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:60px 48px;
  border-left:1px solid var(--border-color)
}

.login-card{
  width:100%;
  max-width:340px
}

.login-card h2{
  font-size:30px;
  font-weight:700;
  color:var(--text-primary);
  margin-bottom:8px
}

.login-subtitle{
  font-size:15px;
  color:var(--text-muted);
  margin-bottom:36px
}

.login-disclaimer{
  font-size:12px;
  color:var(--text-muted);
  margin-top:20px;
  line-height:1.6;
  text-align:center
}

@media(max-width:800px){
  .login-page{flex-direction:column}
  .login-brand-col{padding:40px 24px}
  .login-card-col{
    width:100%;
    border-left:none;
    border-top:1px solid var(--border-color);
    padding:40px 24px
  }
  .login-app-title{font-size:30px}
  .login-app-tagline{font-size:16px;margin-bottom:32px}
}

/* ── Share button ─────────────────────────────────────────────────────────── */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.share-btn:hover { background: var(--bg-secondary); border-color: var(--accent-primary); }


/* ── Style nudge card ────────────────────────────────────────────────────── */
.style-nudge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent-primary);
}
.style-nudge-icon { font-size: 1.3rem; flex-shrink: 0; }
.style-nudge-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.style-nudge-body strong { font-size: 0.88rem; color: var(--text-primary); }
.style-nudge-body span  { font-size: 0.8rem;  color: var(--text-muted); }
.style-nudge-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.style-nudge-add {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: none;
  background: var(--accent-primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.style-nudge-dismiss {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
}
@media (max-width: 600px) {
  .style-nudge { flex-wrap: wrap; }
  .style-nudge-actions { width: 100%; }
}


/* ════════════════════════════════════════════════════════════════════════════
   HOMEPAGE SECTIONS  (hp- prefix throughout)
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Shared layout ─────────────────────────────────────────────────────────── */
.hp-section {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 5rem 1.25rem;
}
.hp-container {
  max-width: 1080px;
  margin: 0 auto;
}
.hp-heading {
  font-family: Lora, Georgia, serif;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  line-height: 1.25;
}
.hp-subtext {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

/* ── CTA buttons ───────────────────────────────────────────────────────────── */
.hp-cta-btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  background: var(--accent-primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}
.hp-cta-btn:hover { opacity: 0.85; }
.hp-cta-btn--outline {
  background: transparent;
  border: 1.5px solid var(--accent-primary);
  color: var(--accent-primary);
}
.hp-cta-btn--outline:hover { background: var(--accent-primary); color: #fff; opacity: 1; }


/* ════════════════════════════════════════════════════════════════════════════
   SECTION 1 — How it works
   ════════════════════════════════════════════════════════════════════════════ */
.hp-how {
  background: var(--panel-bg);
  border-top: 1px solid var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
}
.hp-steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-top: 2.5rem;
}
.hp-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.hp-step-num {
  font-family: Lora, Georgia, serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--panel-border);
}
[data-theme="dark"] .hp-step-num { color: #1e3454; }
.hp-step-body strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}
.hp-step-body p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.hp-step-arrow {
  flex: 0 0 auto;
  align-self: center;
  padding: 0 1.5rem;
  font-size: 1.4rem;
  color: var(--panel-border);
  margin-bottom: 3rem;
}
[data-theme="dark"] .hp-step-arrow { color: #1e3454; }

@media (max-width: 680px) {
  .hp-steps { flex-direction: column; gap: 2rem; }
  .hp-step-arrow { display: none; }
  .hp-step { flex-direction: row; gap: 1rem; align-items: flex-start; }
  .hp-step-num { font-size: 2.2rem; min-width: 2rem; }
}


/* ════════════════════════════════════════════════════════════════════════════
   SECTION 2 — Content types
   ════════════════════════════════════════════════════════════════════════════ */
.hp-types { background: var(--bg-primary); }

.hp-cat-group {
  margin-bottom: 2rem;
}
.hp-cat-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}
.hp-cat--social       { background: rgba(77,154,255,0.14);  color: #4d9aff; }
.hp-cat--marketing    { background: rgba(251,188,5,0.14);   color: #c8950a; }
.hp-cat--professional { background: rgba(100,116,139,0.14); color: #64748b; }
.hp-cat--longform     { background: rgba(20,184,166,0.14);  color: #0d9488; }
.hp-cat--creative     { background: rgba(167,139,250,0.14); color: #8b5cf6; }
[data-theme="dark"] .hp-cat--marketing    { color: #f5c842; }
[data-theme="dark"] .hp-cat--professional { color: #94a3b8; }
[data-theme="dark"] .hp-cat--longform     { color: #2dd4bf; }

.hp-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.hp-pill {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s, transform 0.1s;
  white-space: nowrap;
}
.hp-pill:hover { transform: translateY(-1px); }

.hp-pill--social       { background: rgba(77,154,255,0.08);  border-color: rgba(77,154,255,0.25);  color: var(--text-primary); }
.hp-pill--marketing    { background: rgba(251,188,5,0.08);   border-color: rgba(251,188,5,0.25);   color: var(--text-primary); }
.hp-pill--professional { background: rgba(100,116,139,0.08); border-color: rgba(100,116,139,0.25); color: var(--text-primary); }
.hp-pill--longform     { background: rgba(20,184,166,0.08);  border-color: rgba(20,184,166,0.25);  color: var(--text-primary); }
.hp-pill--creative     { background: rgba(167,139,250,0.08); border-color: rgba(167,139,250,0.25); color: var(--text-primary); }

.hp-pill--social:hover       { background: rgba(77,154,255,0.18);  border-color: rgba(77,154,255,0.5); }
.hp-pill--marketing:hover    { background: rgba(251,188,5,0.18);   border-color: rgba(251,188,5,0.5); }
.hp-pill--professional:hover { background: rgba(100,116,139,0.18); border-color: rgba(100,116,139,0.5); }
.hp-pill--longform:hover     { background: rgba(20,184,166,0.18);  border-color: rgba(20,184,166,0.5); }
.hp-pill--creative:hover     { background: rgba(167,139,250,0.18); border-color: rgba(167,139,250,0.5); }


/* ════════════════════════════════════════════════════════════════════════════
   SECTION 3 — Multi-model callout
   ════════════════════════════════════════════════════════════════════════════ */
.hp-models {
  background: var(--panel-bg);
  border-top: 1px solid var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
}
.hp-model-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.hp-model-card {
  background: var(--bg-primary);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
[data-theme="dark"] .hp-model-card { background: var(--bg-secondary); }
.hp-model-name {
  font-family: Lora, Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}
.hp-model-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-primary);
  background: rgba(77,154,255,0.1);
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  width: fit-content;
}
.hp-model-why {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}
.hp-model-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  border-left: 3px solid var(--panel-border);
  padding-left: 0.75rem;
  margin-top: 0.5rem;
  line-height: 1.6;
}

@media (max-width: 720px) {
  .hp-model-cards { grid-template-columns: 1fr; }
}


/* ════════════════════════════════════════════════════════════════════════════
   SECTION 4 — Example outputs
   ════════════════════════════════════════════════════════════════════════════ */
.hp-examples { background: var(--bg-primary); }
.hp-example-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.hp-example {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.hp-example-input {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
}
.hp-ex-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.hp-ex-input-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.55;
}
.hp-example-divider {
  text-align: center;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1;
}
.hp-example-output {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
[data-theme="dark"] .hp-example-output { background: var(--bg-secondary); }
.hp-ex-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.hp-ex-type-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  background: rgba(77,154,255,0.12);
  color: var(--accent-primary);
}
.hp-ex-output-text {
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.75;
  white-space: pre-wrap;
  flex: 1;
}
.hp-ex-credit {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--panel-border);
}
.hp-examples-cta {
  text-align: center;
  padding-top: 0.5rem;
}

@media (max-width: 680px) {
  .hp-example-cols { grid-template-columns: 1fr; }
}


/* ════════════════════════════════════════════════════════════════════════════
   SECTION 5 — Writing style callout
   ════════════════════════════════════════════════════════════════════════════ */
.hp-style {
  background: var(--panel-bg);
  border-top: 1px solid var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
}
[data-theme="dark"] .hp-style { background: #0f1e35; }

.hp-style-cols {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  margin-bottom: 2rem;
  align-items: start;
}
.hp-style-intro {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.9rem;
  line-height: 1.6;
}
.hp-style-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.hp-style-list li {
  font-size: 0.875rem;
  color: var(--text-primary);
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.5;
}
.hp-style-list li::before {
  content: "check";
  font-family: sans-serif;
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-size: 0.8rem;
  font-weight: 700;
}
.hp-style-right {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.hp-ba-block {
  border-radius: 10px;
  padding: 1rem 1.1rem;
  border: 1px solid var(--panel-border);
}
.hp-ba-without { background: var(--bg-primary); }
[data-theme="dark"] .hp-ba-without { background: var(--bg-primary); }
.hp-ba-with {
  background: var(--panel-bg);
  border-color: var(--accent-primary);
  border-left-width: 3px;
}
[data-theme="dark"] .hp-ba-with { background: var(--bg-secondary); }
.hp-ba-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 0.5rem;
}
.hp-ba-without .hp-ba-label { color: var(--text-muted); }
.hp-ba-with    .hp-ba-label { color: var(--accent-primary); }
.hp-ba-block p {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.7;
  white-space: pre-wrap;
  margin: 0;
}
.hp-ba-without p { color: var(--text-muted); }

.hp-style-footer {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.hp-style-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
  min-width: 200px;
}

@media (max-width: 720px) {
  .hp-style-cols { grid-template-columns: 1fr; gap: 2rem; }
  .hp-style-footer { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

/* ── Global mobile tightening for hp- sections ─────────────────────────────── */
@media (max-width: 480px) {
  .hp-section { padding: 3.5rem 1rem; }
  .hp-heading { font-size: 1.4rem; }
  .hp-subtext { font-size: 0.9rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MARKETING HEADER  (.hp-marketing-header)
   ═══════════════════════════════════════════════════════════════════════════ */
.hp-marketing-header .header-container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}
.hp-header-nav { display: flex; gap: 0.25rem; }
.hp-header-nav .nav-item {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  opacity: 0.75;
  transition: opacity 0.15s, background 0.15s;
}
.hp-header-nav .nav-item:hover { opacity: 1; background: rgba(255,255,255,0.08); }
[data-theme="light"] .hp-header-nav .nav-item:hover { background: rgba(0,0,0,0.06); }

/* Header sign-in button */
.hp-signin-btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 7px;
  background: var(--accent-primary);
  color: #fff;
  border: none; cursor: pointer;
  font-size: 0.8rem; font-weight: 600;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.hp-signin-btn:hover { opacity: 0.88; }

/* App workspace header */
.app-workspace-header .header-container {
  display: flex; align-items: center; justify-content: space-between;
}
.app-history-link {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  margin-left: 0.5rem;
  transition: color 0.15s, background 0.15s;
}
.app-history-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.08); }
[data-theme="light"] .app-history-link:hover { background: rgba(0,0,0,0.06); }

/* ═══════════════════════════════════════════════════════════════════════════
   HERO SECTION  (.hp-hero)
   ═══════════════════════════════════════════════════════════════════════════ */
.hp-hero {
  min-height: 90vh;
  display: flex; align-items: center;
  padding: 6rem 1.5rem 4rem;
}
.hp-hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hp-hero-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-primary);
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 20px;
  padding: 0.3rem 0.75rem;
  margin-bottom: 1.25rem;
}
.hp-hero-title {
  font-family: 'Lora', serif;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.18;
  color: var(--text-primary);
  margin-bottom: 1.1rem;
}
.hp-hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 2rem;
  max-width: 520px;
}
.hp-hero-actions {
  display: flex; gap: 0.85rem; flex-wrap: wrap; align-items: center;
  margin-bottom: 1rem;
}
.hp-hero-cta {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent-primary);
  color: #fff;
  border: none; border-radius: 9px;
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}
.hp-hero-cta:hover { opacity: 0.9; transform: translateY(-1px); }
.hp-hero-secondary {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid currentColor;
  transition: color 0.15s;
}
.hp-hero-secondary:hover { color: var(--text-primary); }
.hp-hero-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
}
.hp-hero-features {
  display: flex; flex-direction: column; gap: 1.25rem;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 2rem;
}
.hp-hero-feature {
  display: flex; align-items: flex-start; gap: 0.9rem;
}
.hp-hero-feature-icon {
  font-size: 1.3rem; flex-shrink: 0;
  margin-top: 0.1rem;
}
.hp-hero-feature strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}
.hp-hero-feature span {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}
@media (max-width: 820px) {
  .hp-hero { padding: 4rem 1.25rem 3rem; min-height: auto; }
  .hp-hero-container { grid-template-columns: 1fr; gap: 2.5rem; }
  .hp-hero-features { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
}
@media (max-width: 520px) {
  .hp-hero-features { grid-template-columns: 1fr; }
  .hp-hero-title { font-size: 1.8rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   GENERATOR PREVIEW  (.hp-preview)
   ═══════════════════════════════════════════════════════════════════════════ */
.hp-preview-card {
  position: relative;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 1.75rem;
  max-width: 700px;
  margin: 2rem auto 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.hp-preview-types {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.hp-preview-type {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem; cursor: pointer;
  transition: all 0.15s;
}
.hp-preview-type:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.hp-preview-type.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  font-weight: 600;
}
.hp-preview-textarea {
  width: 100%;
  min-height: 120px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--panel-border);
  border-radius: 9px;
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}
[data-theme="light"] .hp-preview-textarea { background: rgba(0,0,0,0.02); }
.hp-preview-textarea:focus { border-color: var(--accent-primary); }
.hp-preview-footer {
  display: flex; align-items: center; gap: 1rem; margin-top: 1rem; flex-wrap: wrap;
}
.hp-preview-generate {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  background: var(--accent-primary);
  color: #fff;
  border: none; border-radius: 8px;
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  transition: opacity 0.15s;
}
.hp-preview-generate:hover { opacity: 0.88; }
.hp-preview-note { font-size: 0.75rem; color: var(--text-muted); }

/* Inline sign-in overlay */
.hp-preview-signin {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  z-index: 10;
}
.hp-preview-signin-inner {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 1.75rem 2rem;
  text-align: center;
  max-width: 340px;
  width: 90%;
}
.hp-preview-signin-msg {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 1.1rem;
  line-height: 1.5;
}
.hp-preview-google-btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.65rem 1.25rem;
  background: var(--panel-bg);
  border: 1.5px solid var(--panel-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9rem; font-weight: 500; cursor: pointer;
  width: 100%; justify-content: center;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 0.65rem;
}
.hp-preview-google-btn:hover { border-color: var(--accent-primary); background: rgba(99,102,241,0.06); }
.hp-preview-signin-cancel {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 0.8rem;
  text-decoration: underline; padding: 0.25rem;
}
.hp-preview-signin-cancel:hover { color: var(--text-primary); }

/* ═══════════════════════════════════════════════════════════════════════════
   BOTTOM CTA  (.hp-bottom-cta)
   ═══════════════════════════════════════════════════════════════════════════ */
.hp-bottom-cta {
  text-align: center;
  background: linear-gradient(135deg, rgba(99,102,241,0.12) 0%, rgba(139,92,246,0.08) 100%);
  border-top: 1px solid rgba(99,102,241,0.15);
}
.hp-bottom-cta-inner { max-width: 560px; }
.hp-bottom-cta-title {
  font-family: 'Lora', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}
.hp-bottom-cta-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  line-height: 1.6;
}
.hp-bottom-cta-btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  background: var(--accent-primary);
  color: #fff;
  border: none; border-radius: 10px;
  font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  margin-bottom: 0.85rem;
}
.hp-bottom-cta-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.hp-bottom-cta-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER  (.hp-footer)
   ═══════════════════════════════════════════════════════════════════════════ */
.hp-footer {
  border-top: 1px solid var(--panel-border);
  padding: 3rem 1.5rem 2rem;
}
.hp-footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
  max-width: 900px;
  margin: 0 auto 2rem;
}
.hp-footer-logo { margin-bottom: 0.65rem; display: inline-block; }
.hp-footer-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 260px;
}
.hp-footer-links { display: flex; gap: 3rem; }
.hp-footer-col { display: flex; flex-direction: column; gap: 0.6rem; }
.hp-footer-col strong {
  font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted); margin-bottom: 0.25rem;
}
.hp-footer-col a {
  font-size: 0.85rem; color: var(--text-muted);
  text-decoration: none; transition: color 0.15s;
}
.hp-footer-col a:hover { color: var(--text-primary); }
.hp-footer-bottom {
  max-width: 900px; margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--panel-border);
  text-align: center;
}
.hp-footer-bottom p { font-size: 0.78rem; color: var(--text-muted); opacity: 0.7; }
@media (max-width: 640px) {
  .hp-footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hp-footer-links { gap: 2rem; }
}

/* Output empty state */
/* Output tips panel (shown before generation) */
.output-tips {
  flex: 1;
  padding: 10px 4px 18px;
  transition: opacity 0.4s ease;
}
.output-tips.fading-out {
  opacity: 0;
  pointer-events: none;
}
.tips-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted, #6b7280);
  margin-bottom: 14px;
  opacity: 0.7;
}
.tips-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tips-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.tips-icon {
  font-size: 16px;
  line-height: 1.4;
  flex-shrink: 0;
  opacity: 0.85;
}
.tips-list li div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tips-list li strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}
.tips-list li span {
  font-size: 12px;
  color: var(--text-muted, #6b7280);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION A — Platform at a glance  (.hp-glance)
   ═══════════════════════════════════════════════════════════════════════════ */
.hp-glance {
  padding-top: 4rem;
  padding-bottom: 2rem;
}
.hp-glance-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.25rem;
  align-items: stretch;
}
.hp-glance-card {
  background: var(--panel-bg);
  border: 0.5px solid var(--panel-border);
  border-radius: 16px;
  padding: 2rem 2rem;
}
.hp-glance-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
}
.hp-glance-number {
  font-family: 'Lora', serif;
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
}
.hp-glance-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.hp-glance-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 180px;
}
.hp-glance-right-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.hp-model-rows {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.hp-model-row {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.hp-model-inline-badge {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  border-radius: 20px;
  border: 0.5px solid var(--panel-border);
  background: rgba(255,255,255,0.07);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}
[data-theme="light"] .hp-model-inline-badge {
  background: rgba(0,0,0,0.05);
}
.hp-model-row-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 680px) {
  .hp-glance-row { grid-template-columns: 1fr; }
  .hp-glance-left { padding: 1.5rem; }
  .hp-glance-number { font-size: 3rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION B — Feature grid  (.hp-feat-grid)
   ═══════════════════════════════════════════════════════════════════════════ */
.hp-feat-grid {
  padding-top: 2rem;
  padding-bottom: 4rem;
}
.hp-feat-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.hp-feat-card {
  background: var(--panel-bg);
  border: 0.5px solid var(--panel-border);
  border-radius: 14px;
  padding: 1.5rem 1.5rem 1.5rem 1.25rem;
  border-left-width: 3px;
  border-left-style: solid;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.hp-feat--gemini { border-left-color: #14b8a6; }
.hp-feat--gpt    { border-left-color: #3b82f6; }
.hp-feat--claude { border-left-color: #8b5cf6; }
.hp-feat--style  { border-left-color: #f59e0b; }

.hp-feat-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  border: 0.5px solid var(--panel-border);
  background: rgba(255,255,255,0.07);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  align-self: flex-start;
}
[data-theme="light"] .hp-feat-badge {
  background: rgba(0,0,0,0.05);
}
.hp-feat-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0;
}
.hp-feat-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}
.hp-feat-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
  opacity: 0.75;
}

@media (max-width: 520px) {
  .hp-feat-cards { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Left glance card — clickable affordance
   ═══════════════════════════════════════════════════════════════════════════ */
a.hp-glance-left {
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
a.hp-glance-left:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.hp-glance-view-all {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-primary);
  opacity: 0.85;
}
a.hp-glance-left:hover .hp-glance-view-all { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   Content Types Modal  (#types-modal)
   Uses CSS :target — no JavaScript needed
   ═══════════════════════════════════════════════════════════════════════════ */
.hp-types-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(5px);
  overflow-y: auto;
  padding: 2rem 1rem 3rem;
  align-items: flex-start;
  justify-content: center;
}
#types-modal:target {
  display: flex;
}
.hp-types-modal {
  background: var(--panel-bg);
  border: 0.5px solid var(--panel-border);
  border-radius: 18px;
  width: 100%;
  max-width: 780px;
  overflow: hidden;
  position: relative;
  margin-top: 2rem;
}
.hp-types-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.75rem 1.25rem;
  border-bottom: 0.5px solid var(--panel-border);
  position: sticky;
  top: 0;
  background: var(--panel-bg);
  z-index: 1;
}
.hp-types-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.2rem;
}
.hp-types-modal-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}
.hp-types-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  border: 0.5px solid var(--panel-border);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1rem;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.hp-types-modal-close:hover {
  background: rgba(255,255,255,0.14);
  color: var(--text-primary);
}
[data-theme="light"] .hp-types-modal-close {
  background: rgba(0,0,0,0.04);
}
[data-theme="light"] .hp-types-modal-close:hover {
  background: rgba(0,0,0,0.09);
}
.hp-types-modal-body {
  padding: 1.25rem 1.75rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.hp-types-modal-group { display: flex; flex-direction: column; gap: 0.6rem; }

@media (max-width: 520px) {
  .hp-types-modal-header { padding: 1.25rem 1.25rem 1rem; }
  .hp-types-modal-body { padding: 1rem 1.25rem 1.5rem; }
}
