/* CinePrompt Studio - Modern AI Video Suite Styles */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Prompt:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600&display=swap');

:root {
  /* Default Theme: Electric Indigo & Cyan */
  --bg-main: #080c14;
  --bg-header: rgba(13, 19, 33, 0.85);
  --bg-card: #0f172a;
  --bg-card-subtle: #141f36;
  --bg-input: #0b1120;
  --border-card: #1e293b;
  --border-focus: #0ea5e9;
  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-secondary: #0ea5e9;
  --accent-teal: #10b981;
  --accent-violet: #8b5cf6;
  --accent-amber: #f59e0b;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --font-thai: 'Prompt', 'Sarabun', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --card-glow: rgba(14, 165, 233, 0.15);
}

/* Emerald Theme */
body.theme-emerald {
  --bg-main: #060e0a;
  --bg-header: rgba(10, 24, 18, 0.85);
  --bg-card: #0b1e15;
  --bg-card-subtle: #11291e;
  --bg-input: #08160f;
  --border-card: #183827;
  --border-focus: #10b981;
  --accent-primary: #10b981;
  --accent-primary-hover: #059669;
  --accent-secondary: #06b6d4;
  --card-glow: rgba(16, 185, 129, 0.15);
}

/* Amber Theme */
body.theme-amber {
  --bg-main: #0d0a08;
  --bg-header: rgba(26, 18, 12, 0.85);
  --bg-card: #1a130e;
  --bg-card-subtle: #241a13;
  --bg-input: #120c08;
  --border-card: #332317;
  --border-focus: #f59e0b;
  --accent-primary: #f59e0b;
  --accent-primary-hover: #d97706;
  --accent-secondary: #fb923c;
  --card-glow: rgba(245, 158, 11, 0.15);
}

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

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(14, 165, 233, 0.05) 0%, transparent 50%);
  color: var(--text-primary);
  font-family: var(--font-thai);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s ease;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #25334d;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

/* Selection */
::selection {
  background-color: rgba(14, 165, 233, 0.35);
  color: #ffffff;
}

/* Base Card Styling */
.studio-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.25s ease-in-out;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.studio-card:hover {
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: 0 8px 25px var(--card-glow);
}

.studio-card.card-disabled {
  opacity: 0.4;
  filter: grayscale(0.7);
}

/* Card Header */
.card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}

/* Form Controls */
.form-group {
  margin-bottom: 0.85rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.form-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-style: italic;
}

.studio-select, .studio-input, .studio-textarea {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid #1e293b;
  border-radius: 8px;
  color: #f1f5f9;
  padding: 0.5rem 0.75rem;
  font-size: 0.83rem;
  font-family: var(--font-thai);
  transition: all 0.2s ease;
  outline: none;
}

.studio-select:focus, .studio-input:focus, .studio-textarea:focus {
  border-color: var(--accent-secondary);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.25);
  background-color: #0d1527;
}

.studio-select option {
  background-color: #0f172a;
  color: #f8fafc;
  padding: 8px;
}

.studio-textarea {
  resize: vertical;
  min-height: 70px;
}

/* Checkbox styling */
.studio-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.83rem;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
}

.studio-checkbox {
  appearance: none;
  width: 16px;
  height: 16px;
  background-color: var(--bg-input);
  border: 1px solid #334155;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.studio-checkbox:checked {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.studio-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 11px;
  font-weight: bold;
}

/* Pill Badges & Buttons */
.badge-pill {
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  user-select: none;
}

.pill-indigo {
  background-color: rgba(99, 102, 241, 0.18);
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.4);
}
.pill-indigo:hover {
  background-color: var(--accent-primary);
  color: white;
}

.pill-teal {
  background-color: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}
.pill-teal:hover {
  background-color: var(--accent-teal);
  color: #000;
}

/* Action Buttons */
.btn-action-main {
  padding: 0.75rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  user-select: none;
}

/* Primary Indigo-to-Cyan Gradient */
.btn-primary-indigo {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}
.btn-primary-indigo:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45);
}

/* Emerald Teal Gradient */
.btn-teal-green {
  background: linear-gradient(135deg, #0d9488 0%, #10b981 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}
.btn-teal-green:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Royal Violet Gradient */
.btn-violet-purple {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}
.btn-violet-purple:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* Steel Slate Button */
.btn-steel-slate {
  background-color: #1e293b;
  border: 1px solid #334155;
  color: #cbd5e1;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.btn-steel-slate:hover {
  background-color: #27354f;
  color: #ffffff;
  border-color: #475569;
  transform: translateY(-1px);
}

/* Sub-Random Buttons */
.btn-sub-random {
  background-color: #131d31;
  border: 1px solid #22324e;
  color: #cbd5e1;
  padding: 0.5rem 0.75rem;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.btn-sub-random:hover {
  border-color: var(--accent-secondary);
  color: #38bdf8;
  background-color: #18253e;
}

/* Prompt Output Box */
.prompt-output-container {
  background-color: #070b14;
  border: 1px solid #1e293b;
  border-radius: 9px;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #e2e8f0;
  max-height: 460px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

.prompt-summary-box {
  background-color: #0a0f1d;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 0.85rem;
  font-size: 0.78rem;
  color: #cbd5e1;
  max-height: 160px;
  overflow-y: auto;
  line-height: 1.6;
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #0f172a;
  border: 1px solid var(--accent-secondary);
  color: #ffffff;
  padding: 0.8rem 1.4rem;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  z-index: 1000;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideInUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Modal styling */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1.5rem;
}

.modal-dialog {
  background-color: var(--bg-card);
  border: 1px solid #334155;
  border-radius: 14px;
  max-width: 650px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
}

/* Auth Gate & Protection */
.auth-locked-blur {
  filter: blur(10px) brightness(0.65);
  pointer-events: none !important;
  user-select: none !important;
  transition: filter 0.3s ease;
}

.auth-gate-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(15, 23, 42, 0.95), rgba(6, 10, 18, 0.98));
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.25rem;
}

.auth-card {
  background: linear-gradient(145deg, #0f182c, #0b1220);
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(99, 102, 241, 0.2);
  border-radius: 18px;
  width: 100%;
  max-width: 480px;
  padding: 2.25rem 2rem;
  position: relative;
  overflow: hidden;
  animation: authCardPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #38bdf8, #6366f1, #a855f7);
}

@keyframes authCardPop {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(15px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.auth-tab-btn {
  flex: 1;
  padding: 0.65rem 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.auth-tab-active {
  background: #1e293b;
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.auth-tab-inactive {
  color: #94a3b8;
}

.auth-tab-inactive:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.03);
}

.auth-input {
  width: 100%;
  background: #090e17;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: #f8fafc;
  font-size: 0.875rem;
  outline: none;
  transition: all 0.2s ease;
}

.auth-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
  background: #0d1422;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #10192d;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.3rem 0.75rem;
  border-radius: 8px;
  font-size: 0.78rem;
}

/* Payment & Subscription Components */
.payment-card {
  background: linear-gradient(150deg, #0e172a, #070c16);
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(56, 189, 248, 0.15);
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  padding: 2rem 1.75rem;
  position: relative;
  overflow: hidden;
  animation: authCardPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.payment-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #06b6d4, #6366f1);
}

.qr-code-frame {
  background: #ffffff;
  padding: 12px;
  border-radius: 14px;
  display: inline-block;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  border: 2px solid #e2e8f0;
}

.slip-dropzone {
  border: 2px dashed #243552;
  background: #090f1d;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.slip-dropzone:hover {
  border-color: #38bdf8;
  background: #0d162a;
}

.admin-tab {
  padding: 0.5rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.admin-tab-active {
  background: #1e293b;
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.admin-tab-inactive {
  color: #94a3b8;
  border: 1px solid transparent;
}

.admin-tab-inactive:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.04);
}


