@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700;800&family=Unbounded:wght@600;800&display=swap');

:root {
  --bg: #0a0a12;
  --bg-soft: #10101c;
  --panel: #14141f;
  --panel-border: #26263a;
  --text: #eceafc;
  --text-dim: #9c99b8;
  --violet: #8a5cff;
  --pink: #ff4fd8;
  --cyan: #3ee6e0;
  --gradient: linear-gradient(120deg, var(--violet), var(--pink) 55%, var(--cyan));
  --radius: 16px;
  --shadow-glow: 0 0 40px rgba(138, 92, 255, 0.25);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

h1,
h2,
h3,
.logo {
  font-family: 'Unbounded', 'Manrope', sans-serif;
}

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

img,
canvas {
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 18, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--panel-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  font-family: inherit;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--gradient);
  color: #0a0a12;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  box-shadow: 0 0 55px rgba(255, 79, 216, 0.35);
}

.btn-ghost {
  background: transparent;
  border-color: var(--panel-border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--violet);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-danger {
  background: #ff4f6d;
  color: #1a0a10;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 100px 0 80px;
  overflow: hidden;
  text-align: center;
}

.hero-eq {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  margin: 0 0 20px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  color: var(--text-dim);
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Sections ===== */
.section {
  padding: 70px 0;
  border-top: 1px solid var(--panel-border);
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin: 0 0 12px;
  text-align: center;
}

.section-subtitle {
  color: var(--text-dim);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.step-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 28px 22px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient);
  color: #0a0a12;
  font-weight: 800;
  margin-bottom: 16px;
}

.step-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.step-card p {
  color: var(--text-dim);
  margin: 0;
  font-size: 0.92rem;
}

/* Pricing */
.pricing-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  box-shadow: var(--shadow-glow);
}

.pricing-card .price {
  font-size: 3rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 10px 0;
}

.pricing-options {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  text-align: left;
  display: grid;
  gap: 10px;
}

.pricing-options li {
  display: flex;
  justify-content: space-between;
  color: var(--text-dim);
  border-bottom: 1px dashed var(--panel-border);
  padding-bottom: 8px;
  font-size: 0.92rem;
}

.pricing-options li span:last-child {
  color: var(--cyan);
  font-weight: 700;
}

/* About / examples */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.about-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 24px;
}

.about-card h3 {
  margin-top: 0;
  font-size: 1rem;
  color: var(--cyan);
}

.about-card p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* CTA */
.cta {
  text-align: center;
  padding: 90px 0;
  background: radial-gradient(ellipse at center, rgba(138, 92, 255, 0.15), transparent 70%);
}

.cta h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  margin-bottom: 24px;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--panel-border);
  padding: 28px 0;
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 12, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

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

.modal {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 36px;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: var(--shadow-glow);
}

.modal h2 {
  margin-top: 0;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.form-field label {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.form-field input,
.form-field textarea,
.form-field select {
  background: var(--bg-soft);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--violet);
}

.form-error {
  color: #ff6b81;
  font-size: 0.85rem;
  min-height: 1.2em;
  margin-top: -8px;
  margin-bottom: 12px;
}

.form-switch {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 16px;
  text-align: center;
}

.form-switch a {
  cursor: pointer;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: auto;
}

/* ===== Cabinet ===== */
.cabinet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.cabinet-header h1 {
  margin: 0;
  font-size: 1.8rem;
}

.order-grid {
  display: grid;
  gap: 20px;
}

.order-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 24px;
}

.order-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.order-card-head h3 {
  margin: 0 0 4px;
}

.order-meta {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.status-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-new {
  background: rgba(156, 153, 184, 0.2);
  color: #c8c5e6;
}

.status-paid {
  background: rgba(62, 230, 224, 0.15);
  color: var(--cyan);
}

.status-in_progress {
  background: rgba(138, 92, 255, 0.2);
  color: var(--violet);
}

.status-done {
  background: rgba(80, 230, 140, 0.15);
  color: #59e694;
}

.status-cancelled {
  background: rgba(255, 79, 109, 0.15);
  color: #ff4f6d;
}

.order-details {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 16px;
  white-space: pre-wrap;
}

.order-details strong {
  color: var(--text);
}

.order-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.download-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 60px 20px;
}

/* ===== New order form ===== */
.new-order-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 32px;
}

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

.option-card {
  background: var(--bg-soft);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.option-card span.opt-price {
  margin-left: auto;
  color: var(--cyan);
  font-weight: 700;
  font-size: 0.85rem;
}

.price-total {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 16px 0;
}

.price-total span {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Admin ===== */
.admin-table-wrap {
  overflow-x: auto;
}

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  overflow: hidden;
}

table.admin-table th,
table.admin-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--panel-border);
  font-size: 0.88rem;
  vertical-align: top;
}

table.admin-table th {
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

table.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-order-lyrics {
  max-width: 260px;
  max-height: 120px;
  overflow-y: auto;
  color: var(--text-dim);
  white-space: pre-wrap;
  font-size: 0.82rem;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
}

.upload-form label {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.upload-form input[type='file'] {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.status-select {
  background: var(--bg-soft);
  border: 1px solid var(--panel-border);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 8px;
  font-family: inherit;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 14px 20px;
  box-shadow: var(--shadow-glow);
  z-index: 200;
  max-width: 320px;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast.error {
  border-color: #ff4f6d;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-main {
  flex: 1;
  padding: 48px 0 80px;
}

.auth-status {
  color: var(--text-dim);
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .steps,
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .steps,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 70px 0 60px;
  }

  .site-header .container {
    height: 64px;
  }
}
