:root {
  --neon-blue: #00f2ff;
  --deep-bg: #050507;
  --glass: rgba(0, 0, 0, 0.65);
  --glass-strong: rgba(0, 0, 0, 0.75);
  --border: rgba(255, 255, 255, 0.12);
  --border-bright: rgba(0, 242, 255, 0.38);
  --text: #e0e0e0;
  --muted: #a7b4c0;
  --gold: #f7c905;
  --danger: #ff4d6d;
  --success: #39f5a6;
  --warning: #ffd166;
  --shadow: rgba(0, 0, 0, 0.58);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background-color: var(--deep-bg);
  background-image:
    radial-gradient(circle at top left, rgba(0, 242, 255, 0.11), transparent 32%),
    radial-gradient(circle at bottom right, rgba(247, 201, 5, 0.08), transparent 28%),
    url('/static/images/background.jpg');
  background-size: auto, auto, cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.32);
  z-index: -1;
}

a {
  color: var(--neon-blue);
  text-decoration: none;
}

a:hover {
  color: #fff;
  text-decoration: none;
}

.container {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
}

.brand {
  color: var(--neon-blue);
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0, 242, 255, 0.45);
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s, text-shadow 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.user-link {
  margin-left: 10px;
  padding-left: 15px;
  border-left: 1px solid var(--border);
}

.user-name {
  color: var(--neon-blue);
  font-weight: 700;
  font-size: 0.9rem;
}

.user-link:hover .user-name {
  color: #fff;
  text-shadow: 0 0 15px var(--neon-blue);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links a:hover {
  color: var(--neon-blue);
}

.user-name {
  font-size: 0.85rem;
  color: var(--muted);
  border-left: 1px solid var(--border);
  padding-left: 12px;
  margin-left: 4px;
}

main.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.system-notice {
  padding: 10px 18px;
  border-radius: 12px;
  margin: 12px 0 20px 0;
  background: rgba(247, 201, 5, 0.15);
  border: 1px solid var(--gold);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 15px;
  animation: pulse-border 3s infinite ease-in-out;
}

.notice-icon {
  font-size: 1.4rem;
}

.notice-content {
  color: #fff;
  font-weight: 500;
  line-height: 1.5;
  font-size: 0.95rem;
  flex-grow: 1;
}

.notice-dismiss {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 5px;
  line-height: 1;
  transition: color 0.2s, transform 0.2s;
}

.notice-dismiss:hover {
  color: #fff;
  transform: scale(1.2);
}

@keyframes pulse-border {
  0% {
    border-color: rgba(247, 201, 5, 0.3);
  }

  50% {
    border-color: rgba(247, 201, 5, 0.8);
    box-shadow: 0 0 30px rgba(247, 201, 5, 0.15);
  }

  100% {
    border-color: rgba(247, 201, 5, 0.3);
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 4fr 5fr;
  gap: 28px;
  align-items: center;
}

.hero h1,
.section>h1,
h1 {
  color: var(--neon-blue);
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 14px;
  line-height: 1.04;
  text-shadow: 0 0 10px rgba(0, 242, 255, 0.4);
}

.hero h1,
.section>h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

h2 {
  color: #fff;
  font-size: 1.24rem;
  margin: 0 0 12px;
}

h3 {
  font-size: 1rem;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(255, 51, 102, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 12px 0 8px;
  border-left: 2px solid var(--neon-blue);
  padding-left: 8px;
}

p {
  color: var(--text);
}

.hero p {
  color: var(--text);
  font-size: 1.08rem;
}

.hero-desc {
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 18px;
  margin: 14px 0 20px;
  display: inline-block;
  line-height: 1.6;
}

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

.card,
.glass-panel {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 25px 50px -12px var(--shadow);
}

.card:hover {
  border-color: rgba(0, 242, 255, 0.22);
}

.offerings-card {
  padding: 14px 18px;
}

.offerings-card p {
  margin: 5px 0;
  font-size: 0.95rem;
}

.offerings-card h2 {
  margin-bottom: 10px;
}

.compact-card {
  padding: 12px 20px;
  margin-bottom: 20px;
}

.compact-card p {
  margin: 0;
  line-height: 1.5;
}

.cards,
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

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

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 5px;
}

.section {
  padding: 16px 0;
}

.form-row {
  margin-bottom: 14px;
}

label {
  display: block;
  margin-bottom: 6px;
  color: #fff;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: #fff;
  padding: 10px 12px;
  font: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: rgba(224, 224, 224, 0.52);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 14px rgba(0, 242, 255, 0.24);
}

select option {
  color: #111;
}

.btn,
button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: var(--neon-blue);
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  margin-top: 8px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.btn:hover,
button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 242, 255, 0.5);
  background: #fff;
  color: #000;
}

#generate-button {
  font-size: 1.25rem;
  padding: 14px 28px;
  width: 100%;
}

button:disabled,
.btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn.secondary {
  background: #111827;
  color: #fff;
  border: 1px solid var(--border);
}

.btn.light {
  background: rgba(0, 242, 255, 0.14);
  color: var(--neon-blue);
  border: 1px solid var(--border-bright);
}

/* Custom Confirmation Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: var(--glass-strong);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: min(320px, 90%);
  padding: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
  opacity: 1;
}

.modal-header {
  color: var(--neon-blue);
  font-weight: 900;
  font-size: 1.1rem;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-body {
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.5;
  font-size: 0.95rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.modal-btn {
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  border: none;
}

.modal-btn.confirm {
  background: var(--danger);
  color: #fff;
}

.modal-btn.cancel {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px solid var(--border);
}

.modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn.danger {
  background: var(--danger);
  color: #fff;
}

.btn.full {
  width: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 242, 255, 0.12);
  color: var(--neon-blue);
  border: 1px solid var(--border-bright);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan p {
  margin: 0;
  line-height: 1.25;
}

.plan h3 {
  margin-top: 0;
}

.price {
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
}

.kpi {
  color: var(--neon-blue);
  font-size: 2rem;
  font-weight: 900;
}

.flash {
  padding: 10px 18px;
  border-radius: 12px;
  margin: 12px 0;
  background: var(--glass-strong);
  border: 1px solid var(--border);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.flash p {
  margin: 0;
}

.flash.success {
  background: rgba(57, 245, 166, 0.12);
  border-color: var(--success);
}

.flash.danger {
  background: rgba(255, 77, 109, 0.12);
  border-color: var(--danger);
}

.flash.warning {
  background: rgba(255, 209, 102, 0.12);
  border-color: var(--warning);
}

.flash.info {
  background: rgba(0, 242, 255, 0.12);
  border-color: var(--neon-blue);
}

.btn.small {
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: 8px;
  margin-top: 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

.table th,
.table td {
  padding: 4px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  line-height: 1.2;
}

.table th {
  color: var(--gold);
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.7px;
}

.progress-wrap {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  height: 20px;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--neon-blue), #fff);
  color: #000;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 900;
  transition: width 0.25s ease;
}

.hidden {
  display: none !important;
}

.story-text {
  white-space: pre-wrap;
  line-height: 1.4;
  background: var(--glass);
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 20px;
  color: var(--text);
}

audio {
  width: 100%;
}

.footer {
  margin-top: 30px;
  padding: 20px 0;
  background: var(--glass);
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.footer p {
  color: var(--muted);
  margin-bottom: 8px;
}

.footer-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.support-link {
  color: var(--neon-blue);
  font-weight: 700;
}

@media (max-width: 520px) {
  .footer-links {
    flex-direction: column;
    align-items: flex-start;
  }
}

.sidebar {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
}

.left-sidebar {
  left: 20px;
}

.right-sidebar {
  right: 20px;
}

.sidebar-heading {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--neon-blue);
  margin-bottom: 8px;
  text-shadow: 0 0 8px rgba(0, 242, 255, 0.4);
  max-width: 160px;
  word-wrap: break-word;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.sidebar:hover .sidebar-heading {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.sidebar img {
  max-width: 160px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.sidebar:hover img {
  transform: scale(1.05);
  border-color: var(--neon-blue);
}

@media (max-width: 1370px) {
  .sidebar {
    display: none;
  }
}

@media (max-width: 900px) {

  .hero-grid,
  .grid-2,
  .grid-3,
  .cards {
    grid-template-columns: 1fr;
  }

  .nav-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    gap: 10px;
  }

  .hero {
    padding-top: 28px;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, 1040px);
  }

  .card {
    padding: 16px;
  }
}

@keyframes halo-pulse {
  0% {
    box-shadow: 0 0 20px 2px rgba(0, 242, 255, 0.2);
    border-color: rgba(0, 242, 255, 0.3);
  }

  50% {
    box-shadow: 0 0 45px 8px rgba(0, 242, 255, 0.6);
    border-color: rgba(0, 242, 255, 1);
  }

  100% {
    box-shadow: 0 0 20px 2px rgba(0, 242, 255, 0.2);
    border-color: rgba(0, 242, 255, 0.3);
  }
}

.showcase-card {
  animation: halo-pulse 2s infinite ease-in-out;
  transition: all 0.3s ease;
}

.showcase-card:hover {
  animation-play-state: paused;
  box-shadow: 0 0 55px 12px rgba(0, 242, 255, 0.8);
  border-color: #fff;
}

/* Password visibility toggle styling */
.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  padding-right: 42px !important;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  user-select: none;
  transition: color 0.2s ease;
}

.password-toggle:hover {
  color: var(--neon-blue);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}