/* OnePromt.ru — Main Styles */
:root {
  --bg: #0a0a0f;
  --bg2: #12121a;
  --bg3: #1a1a28;
  --accent: #7c3aed;
  --accent2: #a855f7;
  --accent-glow: rgba(124,58,237,0.3);
  --text: #e2e8f0;
  --text2: #94a3b8;
  --border: #2a2a3d;
  --success: #22c55e;
  --error: #ef4444;
  --warn: #eab308;
  --radius: 12px;
  --radius-sm: 8px;
}

* { margin:0; padding:0; box-sizing:border-box; }

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

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Header / Nav --- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a {
  color: var(--text2);
  font-size: 0.9rem;
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--accent-glow);
  text-decoration: none;
  color: #fff;
}

.btn-secondary {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); text-decoration: none; color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--accent2);
  border: 1px solid var(--accent);
}
.btn-outline:hover { background: rgba(124,58,237,0.1); text-decoration: none; }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1.1rem; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* --- Container --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 600px; margin: 0 auto; padding: 0 20px; }

/* --- Hero (Landing) --- */
.hero {
  padding: 80px 20px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(124,58,237,0.15) 0%, transparent 60%);
}
.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff, var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p { font-size: 1.2rem; color: var(--text2); max-width: 600px; margin: 0 auto 32px; }

/* --- Cards --- */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .2s, transform .2s;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

/* --- Features Section --- */
.features { padding: 60px 20px; }
.features h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-glow);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.feature-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.feature-desc { color: var(--text2); font-size: 0.9rem; }

/* --- Models Grid --- */
.model-card {
  cursor: pointer;
  position: relative;
}
.model-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
.model-card .model-name { font-weight: 600; margin-bottom: 4px; }
.model-card .model-price { color: var(--accent2); font-size: 0.85rem; }
.model-card .model-desc { color: var(--text2); font-size: 0.85rem; margin-top: 8px; }

/* --- Packages --- */
.packages { padding: 60px 20px; }
.packages h2 { text-align: center; font-size: 2rem; margin-bottom: 40px; }

.package-card { text-align: center; position: relative; }
.package-card.popular {
  border-color: var(--accent);
  box-shadow: 0 0 30px var(--accent-glow);
}
.package-card .popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.package-price {
  font-size: 2rem;
  font-weight: 700;
  margin: 16px 0;
}
.package-price span { font-size: 1rem; color: var(--text2); }
.package-gens { color: var(--text2); margin-bottom: 16px; }

/* --- Upload Zone --- */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: var(--bg2);
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(124,58,237,0.05);
}
.upload-zone .icon { font-size: 2.5rem; margin-bottom: 12px; }
.upload-zone p { color: var(--text2); }

.upload-preview {
  max-width: 200px;
  max-height: 200px;
  border-radius: var(--radius-sm);
  margin-top: 12px;
}

/* --- Prompt Input --- */
.prompt-area {
  width: 100%;
  min-height: 100px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 14px;
  font-size: 0.95rem;
  resize: vertical;
  font-family: inherit;
  transition: border-color .2s;
}
.prompt-area:focus {
  outline: none;
  border-color: var(--accent);
}

/* --- Generation Progress --- */
.progress-container {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  display: none;
}
.progress-container.active { display: block; }

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

.progress-text { color: var(--text2); }

/* --- Result --- */
.result-image {
  max-width: 512px;
  width: 100%;
  border-radius: var(--radius);
  margin: 20px auto;
  display: block;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* --- Auth Page --- */
.auth-container {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 420px;
  width: 100%;
  text-align: center;
}
.auth-box h2 { margin-bottom: 8px; }
.auth-box .subtitle { color: var(--text2); margin-bottom: 32px; }

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  margin-bottom: 12px;
  transition: all .2s;
}
.auth-btn-tg {
  background: #0088cc;
  color: #fff;
}
.auth-btn-tg:hover { background: #006daa; }

.auth-btn-vk {
  background: #0077ff;
  color: #fff;
}
.auth-btn-vk:hover { background: #0059cc; }

/* --- Profile --- */
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}
.profile-name { font-size: 1.3rem; font-weight: 600; }
.profile-meta { color: var(--text2); font-size: 0.85rem; }

.balance-card {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: var(--radius);
  padding: 24px;
  color: #fff;
  margin-bottom: 24px;
}
.balance-label { font-size: 0.85rem; opacity: 0.85; }
.balance-value { font-size: 2.5rem; font-weight: 700; }

.history-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.history-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.history-info { flex: 1; }
.history-prompt { font-size: 0.9rem; color: var(--text); }
.history-date { font-size: 0.8rem; color: var(--text2); }
.history-status {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 20px;
}
.status-success { background: rgba(34,197,94,0.15); color: var(--success); }
.status-failed { background: rgba(239,68,68,0.15); color: var(--error); }
.status-pending { background: rgba(234,179,8,0.15); color: var(--warn); }

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 32px 20px;
  border-top: 1px solid var(--border);
  color: var(--text2);
  font-size: 0.85rem;
  margin-top: 60px;
}

/* --- Section headings --- */
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.section-subtitle {
  color: var(--text2);
  margin-bottom: 24px;
}

/* --- Form helpers --- */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}

/* --- Steps --- */
.steps { display: flex; gap: 16px; margin-bottom: 32px; }
.step {
  flex: 1;
  text-align: center;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  color: var(--text2);
  font-size: 0.85rem;
  font-weight: 600;
  position: relative;
}
.step.active {
  background: var(--accent);
  color: #fff;
}
.step.done {
  background: rgba(34,197,94,0.15);
  color: var(--success);
}

/* --- Toast / Alert --- */
.toast {
  position: fixed;
  top: 80px;
  right: 20px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  color: var(--text);
  font-size: 0.9rem;
  z-index: 999;
  animation: slideIn .3s ease;
  max-width: 360px;
}
.toast.error { border-color: var(--error); }
.toast.success { border-color: var(--success); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .card-grid { grid-template-columns: 1fr; }
  .steps { flex-direction: column; }
  .navbar { padding: 12px 16px; }
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 0.8rem; }
  .profile-header { flex-direction: column; text-align: center; }
  .btn-lg { padding: 14px 24px; font-size: 1rem; }
}
