/* ========================================
   AI Prompt Builder V2 - Design System
   ======================================== */

:root {
  --bg-primary: #08080e;
  --bg-secondary: #0e0e18;
  --bg-tertiary: #161625;
  --bg-card: rgba(18, 18, 32, 0.7);
  --bg-hover: #1c1c32;
  --bg-input: #0a0a16;

  --accent: #a855f7;
  --accent-dark: #7c3aed;
  --accent-glow: rgba(168, 85, 247, 0.15);
  --pink: #ec4899;
  --pink-glow: rgba(236, 72, 153, 0.15);
  --cyan: #06b6d4;

  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-accent: #d8b4fe;

  --border: #333355;
  --border-active: #a855f7;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

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

html { font-size: 14.5px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Noto Sans Thai', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* High Contrast Placeholders (Ultra-Sharp & Readable) */
::placeholder {
  color: #e2e8f0 !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}
::-webkit-input-placeholder {
  color: #e2e8f0 !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}
:-moz-placeholder {
  color: #e2e8f0 !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}
::-moz-placeholder {
  color: #e2e8f0 !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}
:-ms-input-placeholder {
  color: #e2e8f0 !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}

body::before {
  content: '';
  position: fixed; top:0; left:0; width:100%; height:100%;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(168,85,247,0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 100%, rgba(236,72,153,0.05) 0%, transparent 50%);
  pointer-events: none; z-index: 0;
}

/* Container */
.app-container { position:relative; z-index:1; max-width:1600px; margin:0 auto; padding:0 18px; }

/* ========== HEADER ========== */
.app-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 0; border-bottom:1px solid var(--border);
  margin-bottom:20px;
  position:sticky; top:0; z-index:100;
  background:rgba(8,8,14,0.92); backdrop-filter:blur(20px);
}
.header-left { display:flex; align-items:center; gap:12px; }
.logo-icon { font-size:1.8rem; filter:drop-shadow(0 0 10px rgba(168,85,247,0.4)); }
.app-header h1 {
  font-size:1.3rem; font-weight:700;
  background:linear-gradient(135deg, var(--accent), var(--pink));
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.version { font-size:0.7rem; font-weight:800; letter-spacing:2px; }
.subtitle { font-size:0.75rem; color:var(--text-muted); }
.header-right { display:flex; gap:6px; }

/* ========== BUTTONS ========== */
.btn {
  display:inline-flex; align-items:center; gap:5px;
  padding:7px 14px; border:none; border-radius:var(--radius-md);
  font-family:inherit; font-size:0.82rem; font-weight:500;
  cursor:pointer; transition:all 200ms ease; white-space:nowrap;
}
.btn-ghost {
  background:var(--bg-tertiary); color:var(--text-secondary);
  border:1px solid var(--border);
}
.btn-ghost:hover { background:var(--bg-hover); color:var(--text-primary); border-color:var(--accent); }

.btn-accent {
  background:linear-gradient(135deg, var(--accent), var(--pink));
  color:#fff; border:none; font-weight:600;
  box-shadow:0 2px 12px rgba(139,92,246,0.3);
}
.btn-accent:hover {
  transform:translateY(-1px);
  box-shadow:0 4px 20px rgba(139,92,246,0.5);
}

.btn-small {
  padding:4px 10px; font-size:0.75rem;
  background:var(--bg-tertiary); color:var(--text-secondary);
  border:1px solid var(--border); border-radius:var(--radius-sm);
  cursor:pointer; transition:all 150ms ease;
}
.btn-small:hover { background:var(--accent); color:white; border-color:var(--accent); }

.btn-accent-sm {
  background:linear-gradient(135deg, var(--accent), var(--accent-dark));
  color:white; border:none; box-shadow:0 2px 10px rgba(168,85,247,0.3);
}
.btn-accent-sm:hover { transform:translateY(-1px); box-shadow:0 4px 18px rgba(168,85,247,0.45); }

.btn-icon-sm {
  width:26px; height:26px; display:inline-flex; align-items:center; justify-content:center;
  background:var(--bg-tertiary); border:1px solid var(--border); border-radius:4px;
  color:var(--text-muted); cursor:pointer; font-size:0.75rem; transition:all 150ms;
}
.btn-icon-sm:hover { background:rgba(239,68,68,0.2); border-color:#ef4444; color:#ef4444; }

/* ========== LAYOUT ========== */
.main-content { display:grid; grid-template-columns:1fr 400px; gap:20px; align-items:start; padding-bottom:50px; }

/* ========== BUILDER SECTIONS ========== */
.builder-panel { display:flex; flex-direction:column; gap:16px; }

.builder-section {
  background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:18px; transition:border-color 250ms;
  animation: fadeInUp 0.35s ease forwards;
}
.builder-section:hover { border-color:rgba(168,85,247,0.2); }
.builder-section:nth-child(1) { animation-delay:0.05s; }
.builder-section:nth-child(2) { animation-delay:0.1s; }
.builder-section:nth-child(3) { animation-delay:0.15s; }
.builder-section:nth-child(4) { animation-delay:0.2s; }

.section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.section-header h2 { font-size:0.95rem; font-weight:600; }

.badge {
  font-size:0.65rem; padding:2px 9px;
  background:var(--accent-glow); color:var(--text-accent);
  border-radius:20px; border:1px solid rgba(168,85,247,0.2);
}
.badge-pink {
  background:var(--pink-glow); color:var(--pink);
  border-color:rgba(236,72,153,0.2);
}
.badge-cyan {
  background:rgba(6,182,212,0.1); color:var(--cyan);
  border-color:rgba(6,182,212,0.2);
}

/* ========== TEMPLATE GRID ========== */
.template-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(180px,1fr)); gap:8px; }

.template-card {
  padding:10px 12px; background:var(--bg-input); border:1px solid var(--border);
  border-radius:var(--radius-md); cursor:pointer; transition:all 200ms;
  position:relative; overflow:hidden;
}
.template-card::before {
  content:''; position:absolute; top:0; left:0; width:100%; height:2px;
  background:linear-gradient(90deg,var(--accent),var(--pink)); opacity:0; transition:opacity 200ms;
}
.template-card:hover { border-color:var(--accent); background:var(--bg-hover); transform:translateY(-1px); }
.template-card:hover::before { opacity:1; }
.template-card.active { border-color:var(--accent); background:var(--accent-glow); }
.template-card.active::before { opacity:1; }
.template-card .emoji { font-size:1.2rem; margin-bottom:4px; display:block; }
.template-card .name { font-size:0.78rem; font-weight:600; color:var(--text-primary); margin-bottom:2px; }
.template-card .desc { font-size:0.68rem; color:var(--text-muted); }

/* ========== FORMS ========== */
.options-row { display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr)); gap:10px; margin-bottom:10px; }

.input-group { display:flex; flex-direction:column; gap:4px; }
.input-group.full-width { grid-column:1/-1; }

.input-group label {
  font-size: 0.78rem; font-weight: 600; color: #e2e8f0;
  text-transform: uppercase; letter-spacing: 0.5px;
}

select, .input-text, .input-mini, textarea, input[type="text"], input[type="password"], input[type="number"] {
  width: 100%; padding: 10px 14px; background: #0d0d1c;
  border: 1.5px solid #333355; border-radius: var(--radius-md);
  color: #ffffff; font-family: inherit; font-size: 0.92rem; font-weight: 500;
  transition: all 180ms ease; outline: none;
}
select:focus, .input-text:focus, .input-mini:focus, textarea:focus, input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); background: #111124;
}
select:hover, .input-text:hover, textarea:hover, input:hover { border-color: rgba(168,85,247,0.45); }
select option { background: var(--bg-secondary); color: #ffffff; }

.input-mini { width: 75px; text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; font-weight: 600; }

/* Large Crisp Prompt Inputs (High Contrast & Ultra-Sharp Typography) */
#thaiPromptInput, #thaiTranslation {
  font-size: 1.18rem !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  background: #181832 !important;
  border: 2px solid #818cf8 !important;
  border-radius: var(--radius-md) !important;
  padding: 16px 20px !important;
  line-height: 1.7 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
}

#thaiPromptInput:focus, #thaiTranslation:focus {
  border-color: #ec4899 !important;
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.35), 0 6px 24px rgba(0, 0, 0, 0.6) !important;
  background: #202040 !important;
}

#thaiPromptInput::-webkit-input-placeholder,
#thaiTranslation::-webkit-input-placeholder {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 0.95 !important;
  font-size: 1.1rem !important;
  font-weight: 500 !important;
}

#thaiPromptInput::placeholder,
#thaiTranslation::placeholder {
  color: #ffffff !important;
  opacity: 0.95 !important;
  font-size: 1.1rem !important;
  font-weight: 500 !important;
}

#thaiPromptInput:-ms-input-placeholder,
#thaiTranslation:-ms-input-placeholder {
  color: #ffffff !important;
}

/* ========== SHOT CARDS ========== */
.shot-card {
  background:var(--bg-input); border:1px solid var(--border); border-radius:var(--radius-md);
  padding:14px; margin-bottom:10px; transition:border-color 200ms;
  position:relative;
}
.shot-card:hover { border-color:rgba(168,85,247,0.25); }
.shot-card::before {
  content:''; position:absolute; left:0; top:0; bottom:0; width:3px;
  background:linear-gradient(180deg, var(--accent), var(--pink));
  border-radius:3px 0 0 3px;
}

.shot-header {
  display:flex; align-items:center; gap:10px; margin-bottom:12px;
}
.shot-number {
  font-size:0.78rem; font-weight:700; color:var(--text-accent);
  background:var(--accent-glow); padding:3px 10px; border-radius:12px;
}
.shot-time { display:flex; align-items:center; gap:4px; font-size:0.72rem; color:var(--text-muted); }

.shot-fields { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.shot-field { display:flex; flex-direction:column; gap:3px; }
.shot-field.full { grid-column:1/-1; }
.shot-field label { font-size:0.68rem; color:var(--text-muted); }

/* ========== OUTPUT PANEL ========== */
.output-panel { position:sticky; top:75px; }
.output-sticky { display:flex; flex-direction:column; }

.output-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.output-header h2 { font-size:0.9rem; font-weight:600; }

.output-box {
  background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:16px; font-size:0.92rem; line-height:1.7; color:#ffffff;
  word-wrap:break-word; transition:border-color 250ms;
}
.output-box:hover { border-color:rgba(168,85,247,0.35); }
.prompt-output {
  min-height:280px; max-height:400px; overflow-y:auto; white-space:pre-wrap;
  font-family:'JetBrains Mono','Inter',monospace; font-size:0.9rem; line-height:1.8;
  color:#ffffff; font-weight:500;
}
.format-hint { font-size:0.78rem; color:#94a3b8; margin-top:8px; line-height:1.5; }
.prompt-output::-webkit-scrollbar { width:4px; }
.prompt-output::-webkit-scrollbar-thumb { background:var(--border); border-radius:4px; }

.neg-box { min-height:auto; font-size:0.82rem; color:#cbd5e1; padding:12px; }

.output-stats { display:flex; gap:14px; padding:6px 4px; font-size:0.75rem; color:#94a3b8; font-weight:500; }
.placeholder-text { color:#94a3b8 !important; text-align:center; padding:55px 14px; font-size:0.95rem; font-weight:500; line-height:1.7; }

/* History */
.history-list { max-height:200px; overflow-y:auto; display:flex; flex-direction:column; gap:6px; }
.history-list::-webkit-scrollbar { width:3px; }
.history-list::-webkit-scrollbar-thumb { background:var(--border); border-radius:3px; }

.history-item {
  padding:8px 10px; background:var(--bg-input); border:1px solid var(--border);
  border-radius:var(--radius-sm); font-size:0.7rem; color:var(--text-secondary);
  cursor:pointer; transition:all 150ms; display:flex; justify-content:space-between;
  align-items:flex-start; gap:6px;
}
.history-item:hover { border-color:var(--accent); background:var(--bg-hover); }
.history-item .text { flex:1; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.history-item .time { font-size:0.6rem; color:var(--text-muted); white-space:nowrap; }

/* ========== TOAST ========== */
.toast {
  position:fixed; bottom:25px; left:50%;
  transform:translateX(-50%) translateY(80px);
  background:linear-gradient(135deg,var(--accent-dark),var(--accent));
  color:white; padding:10px 24px; border-radius:25px;
  font-size:0.85rem; font-weight:500;
  box-shadow:0 6px 25px rgba(168,85,247,0.4);
  z-index:9999; opacity:0;
  transition:all 350ms cubic-bezier(0.4,0,0.2,1); pointer-events:none;
}
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* Animations */
@keyframes fadeInUp {
  from { opacity:0; transform:translateY(12px); }
  to { opacity:1; transform:translateY(0); }
}

/* Responsive */
@media (max-width:1100px) {
  .main-content { grid-template-columns:1fr; }
  .output-panel { position:static; }
}
@media (max-width:600px) {
  .options-row { grid-template-columns:1fr; }
  .shot-fields { grid-template-columns:1fr; }
  .template-grid { grid-template-columns:1fr 1fr; }
}

/* ========================================
   AI Prompt & Visual Gallery (1:1) Styles
   ======================================== */
.gallery-section {
  margin-top: 36px;
  margin-bottom: 50px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.gallery-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.gallery-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gallery-icon {
  font-size: 1.8rem;
  padding: 6px 10px;
  background: linear-gradient(135deg, var(--accent-glow), var(--pink-glow));
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

.gallery-title {
  font-size: 1.35rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gallery-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.gallery-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.gallery-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  min-width: 260px;
  transition: all 0.2s ease;
}

.gallery-search-box:focus-within {
  border-color: var(--border-active);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.gallery-search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  width: 100%;
}

.gallery-btn-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  display: none;
}
.gallery-btn-clear.show { display: block; }
.gallery-btn-clear:hover { color: var(--text-primary); }

.gallery-stats-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gallery-stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.78rem;
}

.gallery-stat-label { color: var(--text-muted); }
.gallery-stat-val { color: var(--accent); font-weight: 700; }

/* State Boxes */
.gallery-state-box {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-secondary);
}

.gallery-state-box.hidden { display: none; }

.gallery-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(168, 85, 247, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 14px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.gallery-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.gallery-state-box h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.gallery-state-box code {
  background: var(--bg-input);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

.gallery-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card:hover {
  border-color: var(--border-active);
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.22);
}

.gallery-card-media {
  position: relative;
  aspect-ratio: 9 / 13;
  overflow: hidden;
  cursor: pointer;
  background: #05050a;
}

.gallery-card-media img,
.gallery-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-card-media img,
.gallery-card:hover .gallery-card-media video {
  transform: scale(1.04);
}

.gallery-card-type {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.9), rgba(236, 72, 153, 0.9));
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.45);
  z-index: 2;
  pointer-events: none;
}

.gallery-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(8, 8, 14, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  z-index: 2;
}

.gallery-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 14, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1;
}

.gallery-card:hover .gallery-card-overlay {
  opacity: 1;
}

.gallery-card-overlay-btn {
  background: rgba(168, 85, 247, 0.85);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
  cursor: pointer;
  transform: translateY(6px);
  transition: all 0.2s ease;
}

.gallery-card:hover .gallery-card-overlay-btn {
  transform: translateY(0);
}

.gallery-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.gallery-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.gallery-card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.gallery-card-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.gallery-card-prompt-wrap {
  position: relative;
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 12px;
  max-height: 85px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s;
}

.gallery-card-prompt-wrap:hover {
  border-color: var(--border-active);
}

.gallery-card-prompt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.gallery-card-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 35px;
  background: linear-gradient(to top, var(--bg-input) 15%, transparent);
  pointer-events: none;
}

.gallery-card-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
}

.gallery-card-actions button {
  flex: 1;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-danger-admin {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.45) !important;
  color: #fca5a5 !important;
  font-weight: 700 !important;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-danger-admin:hover {
  background: rgba(239, 68, 68, 0.3) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.35);
  transform: translateY(-1px);
}

.gallery-card-actions .btn-danger-admin {
  flex: 0 0 auto;
  padding: 6px 12px;
}

/* Lightbox Modal */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gallery-lightbox.hidden {
  display: none;
}

.gallery-lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 8, 0.88);
  backdrop-filter: blur(12px);
}

.gallery-lightbox-content {
  position: relative;
  z-index: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 35px rgba(168, 85, 247, 0.25);
  animation: lightboxIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.gallery-lightbox-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.gallery-lightbox-close:hover {
  background: var(--pink);
  transform: rotate(90deg);
}

.gallery-lightbox-image-wrap {
  flex: 1.2;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 350px;
}

.gallery-lightbox-image-wrap img,
.gallery-lightbox-image-wrap video {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
}

.gallery-lightbox-details {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  background: var(--bg-tertiary);
  overflow-y: auto;
  max-height: 85vh;
}

.gallery-lightbox-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.gallery-lightbox-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.gallery-lightbox-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gallery-lightbox-prompt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  flex: 1;
  overflow-y: auto;
}

@media (max-width: 900px) {
  .gallery-lightbox-content {
    flex-direction: column;
    max-height: 92vh;
    overflow-y: auto;
  }
  .gallery-lightbox-image-wrap {
    min-height: 250px;
  }
}

/* ================================================================
   Authentication & Session System Styles
   ================================================================ */

.auth-blurred {
  filter: blur(8px) saturate(0.5);
  pointer-events: none;
  user-select: none;
  transition: filter 0.4s ease;
}

/* Header User Pill */
.auth-header-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(22, 22, 37, 0.85);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  backdrop-filter: blur(10px);
}

.user-role-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.badge-admin {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.25), rgba(168, 85, 247, 0.3));
  border: 1px solid rgba(236, 72, 153, 0.6);
  color: #f472b6;
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.25);
}

.badge-user {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #38bdf8;
}

.badge-vip {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(249, 115, 22, 0.3));
  border: 1px solid rgba(234, 179, 8, 0.8);
  color: #fde047;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.4);
  font-weight: 800;
}

.user-name {
  font-weight: 600;
  color: var(--text-primary);
}

.user-ip {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-logout {
  color: #f87171 !important;
  border-color: rgba(248, 113, 113, 0.2) !important;
}

.btn-logout:hover {
  background: rgba(248, 113, 113, 0.15) !important;
  border-color: #f87171 !important;
  box-shadow: 0 0 15px rgba(248, 113, 113, 0.25) !important;
}

/* Fullscreen Auth Overlay Modal */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(4, 4, 10, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
}

.auth-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Glow Card */
.auth-card {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: rgba(14, 14, 28, 0.94);
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: 20px;
  padding: 30px 26px 24px;
  box-shadow:
    0 0 60px rgba(168, 85, 247, 0.22),
    0 25px 50px -12px rgba(0, 0, 0, 0.9);
  animation: authCardEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #a855f7, #ec4899, transparent);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.8);
}

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

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo {
  font-size: 40px;
  display: inline-block;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 16px rgba(168, 85, 247, 0.6));
  animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.auth-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 30%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.auth-policy-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 4px 10px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 999px;
  font-size: 0.72rem;
  color: #c084fc;
}

/* Auth Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form.hidden {
  display: none !important;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrapper input {
  width: 100%;
  background: #080812;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.auth-input-wrapper input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2), 0 0 15px rgba(168, 85, 247, 0.15);
}

.auth-toggle-pass {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-muted);
  padding: 4px;
  transition: color 0.2s ease;
}

.auth-toggle-pass:hover {
  color: var(--text-primary);
}

.auth-error-box {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-error-box.hidden {
  display: none;
}

.shake {
  animation: shakeAnim 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shakeAnim {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

.auth-btn-submit {
  margin-top: 6px;
  padding: 13px;
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.35);
}

.auth-btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.5);
  filter: brightness(1.1);
}

.auth-btn-submit:active:not(:disabled) {
  transform: translateY(0);
}

.auth-btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/* Auth Navigation Tabs */
.auth-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
  gap: 6px;
}

.auth-tab {
  flex: 1;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}

.auth-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.auth-tab.active {
  background: rgba(168, 85, 247, 0.2);
  color: #ffffff;
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.25);
}

/* Auth Step Containers */
.auth-step-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: authStepFade 0.25s ease;
}

.auth-step-container.hidden {
  display: none !important;
}

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

/* Auth Info & Simulated Notice Boxes */
.auth-info-box {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: center;
}

.auth-simulated-box {
  background: rgba(234, 179, 8, 0.14);
  border: 1px dashed rgba(234, 179, 8, 0.5);
  color: #fde047;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  line-height: 1.4;
  text-align: center;
  margin-top: 6px;
}

.auth-simulated-box.hidden {
  display: none !important;
}

/* Monospace OTP Input */
.auth-otp-input {
  text-align: center !important;
  font-family: 'JetBrains Mono', 'Consolas', monospace !important;
  font-size: 1.7rem !important;
  font-weight: 700 !important;
  letter-spacing: 12px !important;
  padding: 10px 14px !important;
  color: #c084fc !important;
  background: #05050e !important;
  border-color: rgba(168, 85, 247, 0.4) !important;
}

.auth-otp-input:focus {
  border-color: #a855f7 !important;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.3), 0 0 20px rgba(168, 85, 247, 0.25) !important;
}

/* Secondary Button (Resend etc) */
.auth-btn-secondary {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}

.auth-btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.auth-btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Auth Switch Link */
.auth-switch-link {
  display: block;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-top: 10px;
  cursor: pointer;
  transition: color 0.2s;
}

.auth-switch-link strong {
  color: #c084fc;
}

.auth-switch-link:hover {
  color: #e9d5ff;
  text-decoration: underline;
}

/* Footer metadata in modal */
.auth-meta-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.auth-meta-pill {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-secondary);
}

/* Admin Sessions Modal */
.admin-sessions-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.admin-sessions-modal.hidden {
  display: none;
}

.admin-sessions-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-active);
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75);
}

.admin-sessions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.admin-sessions-body {
  padding: 20px 24px;
  overflow-y: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th, .admin-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.admin-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3) !important;
  border-color: #ef4444 !important;
}

/* User Management Modal & Form Styles */
.user-mgmt-modal-content {
  max-width: 1040px !important;
}

.user-form-card {
  background: rgba(22, 22, 38, 0.95);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 25px rgba(168, 85, 247, 0.1);
  animation: fadeInDown 0.3s ease;
}

.user-form-card.hidden {
  display: none;
}

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

.user-form-header {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.user-form-header h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-accent);
}

.user-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.auth-select {
  width: 100%;
  background: #080812;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 12px;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

.user-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* User Status Badges */
.user-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
}

.user-status-pill.online {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.user-status-pill.offline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Password Mask / Reveal */
.pass-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
}

.pass-text {
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.btn-toggle-pass {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-toggle-pass:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

/* Demo Role Badge */
.user-role-badge.badge-demo {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

/* Gallery Demo Banner */
.gallery-demo-banner {
  margin: 0 0 20px 0;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(129, 140, 248, 0.12));
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.gallery-demo-banner.hidden {
  display: none !important;
}

.gallery-demo-banner-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.gallery-demo-banner-icon {
  font-size: 1.6rem;
}

.gallery-demo-banner-text {
  font-size: 0.94rem;
  color: #f1f5f9;
  line-height: 1.5;
}

.gallery-demo-banner-text strong {
  color: #fbbf24;
}

/* Demo Limit Modal */
.demo-limit-modal-content {
  max-width: 520px;
  padding: 30px;
  text-align: center;
  border: 1px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 35px rgba(245, 158, 11, 0.25);
  background: linear-gradient(180deg, #18182f 0%, #101022 100%);
}

.demo-limit-header {
  margin-bottom: 18px;
}

.demo-limit-header h3 {
  font-size: 1.35rem;
  color: #ffffff;
  font-weight: 700;
}

.demo-limit-icon-circle {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px auto;
  background: rgba(245, 158, 11, 0.15);
  border: 2px solid #fbbf24;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.demo-limit-info-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  text-align: left;
  margin-bottom: 22px;
}

.demo-limit-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Card Lock / Unlock Badges for Demo Users */
.card-unlocked-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  z-index: 3;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.card-locked-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  z-index: 3;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Site Top Announcement Bar - Natural Document Flow (Zero Overlap) */
.site-announcement-bar {
  position: relative;
  width: 100%;
  background: linear-gradient(90deg, #130a2a 0%, #2a0845 50%, #130a2a 100%);
  border-bottom: 2px solid #eab308;
  padding: 10px 18px;
  font-size: 0.95rem;
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.announcement-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1400px;
  line-height: 1.6;
  text-align: center;
}

.announcement-tag {
  background: linear-gradient(135deg, #f59e0b, #eab308);
  color: #000;
  font-weight: 900;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.6);
}

.announcement-text-main {
  font-size: 0.96rem;
  color: #f8fafc;
}

.announcement-badge-no-gen {
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid rgba(239, 68, 68, 0.8);
  color: #fca5a5;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  margin: 0 3px;
  display: inline-block;
}

.announcement-badge-course {
  background: rgba(234, 179, 8, 0.2);
  border: 1px solid rgba(234, 179, 8, 0.7);
  color: #fde047;
  padding: 2px 10px;
  border-radius: 6px;
  font-weight: 800;
  display: inline-block;
}

.announcement-link-fb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #1877f2, #0d5cb6);
  border: 1px solid #60a5fa;
  color: #ffffff !important;
  padding: 5px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.88rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(24, 119, 242, 0.4);
}

.announcement-link-fb:hover {
  background: linear-gradient(135deg, #2583fa, #1877f2);
  box-shadow: 0 0 20px rgba(24, 119, 242, 0.8);
  transform: translateY(-2px);
}

/* Auth Modal Notice Card - BIG, BOLD, PROMINENT */
.auth-notice-card {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.14) 0%, rgba(168, 85, 247, 0.12) 100%);
  border: 2px solid #eab308;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 20px;
  box-shadow: 0 0 30px rgba(234, 179, 8, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-align: left;
}

.auth-notice-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fde047;
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(234, 179, 8, 0.25);
  padding-bottom: 8px;
}

.auth-notice-body {
  font-size: 0.88rem;
  color: #e2e8f0;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-notice-body strong {
  color: #ffffff;
  font-weight: 700;
}

.auth-notice-highlight {
  display: block;
  background: rgba(239, 68, 68, 0.22);
  border: 1px solid rgba(239, 68, 68, 0.6);
  color: #fca5a5;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 700;
  margin-top: 4px;
}

.auth-notice-course-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1.5px dashed rgba(234, 179, 8, 0.6);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  text-align: center;
}

.auth-course-price {
  color: #fde047;
  font-weight: 800;
  font-size: 0.98rem;
}

.auth-notice-fb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #1877f2, #0d5cb6);
  border: 1px solid #60a5fa;
  color: #ffffff !important;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 8px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(24, 119, 242, 0.4);
  cursor: pointer;
}

.auth-notice-fb-btn:hover {
  background: linear-gradient(135deg, #2583fa, #1877f2);
  box-shadow: 0 0 25px rgba(24, 119, 242, 0.8);
  transform: translateY(-2px);
}

/* ====================================================
   VIP ALL-ACCESS 599.- / MONTH PROMO & PAYMENT MODAL
   ==================================================== */

/* Top Announcement VIP Button */
.announcement-vip-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
  color: #111827 !important;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 5px 14px;
  border-radius: 9999px;
  border: 1px solid #fde68a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.announcement-vip-btn:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.65), 0 0 20px rgba(251, 191, 36, 0.5);
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
}

/* Header VIP Button */
.btn-vip-header {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.25) 100%);
  border: 1px solid rgba(245, 158, 11, 0.6) !important;
  color: #fbbf24 !important;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 7px 15px;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.2);
}

.btn-vip-header:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #111827 !important;
  border-color: #fde68a !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5);
}

/* Auth Notice VIP Box */
.auth-notice-vip-box {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(180, 83, 9, 0.18) 100%);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 10px;
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
}

.auth-notice-vip-box:hover {
  border-color: #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(180, 83, 9, 0.28) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.25);
}

.auth-vip-badge {
  font-size: 0.85rem;
  font-weight: 800;
  color: #fbbf24;
  margin-bottom: 5px;
  letter-spacing: 0.5px;
}

.auth-vip-text {
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.45;
  margin-bottom: 8px;
}

.btn-auth-vip-action {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #111827;
  font-weight: 800;
  font-size: 0.82rem;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 7px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-auth-vip-action:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.5);
}

/* Demo Limit VIP Button */
.btn-vip-limit {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #111827 !important;
  font-weight: 800 !important;
  border: 1px solid #fde68a !important;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.4) !important;
}

.btn-vip-limit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.65) !important;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
}

/* ====================================================
   VIP MODAL POPUP (FULL OVERLAY)
   ==================================================== */
.vip-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100005;
  background: rgba(3, 4, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.vip-modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.vip-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 94vh;
  background: radial-gradient(circle at 50% 0%, rgba(30, 24, 16, 0.98), rgba(12, 13, 20, 0.98));
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 20px;
  box-shadow: 
    0 0 60px rgba(245, 158, 11, 0.15),
    0 25px 80px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: vipModalPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes vipModalPop {
  from {
    transform: translateY(24px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.vip-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #cbd5e1;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.vip-modal-close:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.6);
  color: #ffffff;
  transform: rotate(90deg);
}

/* Modal Header */
.vip-modal-header {
  padding: 16px 24px 10px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, transparent 100%);
}

.vip-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.vip-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 3px;
  background: linear-gradient(135deg, #ffffff 40%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.vip-subtitle {
  font-size: 0.84rem;
  color: #94a3b8;
  margin: 0 0 8px;
  line-height: 1.45;
}

.vip-subtitle strong {
  color: #f1f5f9;
}

.vip-price-container {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  padding: 4px 18px;
}

.vip-price-main {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.vip-price-currency {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fbbf24;
}

.vip-price-amount {
  font-size: 1.85rem;
  font-weight: 900;
  color: #fbbf24;
  line-height: 1;
}

.vip-price-period {
  font-size: 0.9rem;
  color: #cbd5e1;
  font-weight: 600;
  margin-left: 2px;
}

.vip-price-limited-pill {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 9999px;
  margin-left: 8px;
  border: 1px solid #fca5a5;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.88; transform: scale(1.04); }
}

.vip-price-note {
  font-size: 0.74rem;
  color: #fca5a5;
  margin-top: 3px;
  font-weight: 500;
}

.vip-price-note strong {
  color: #ffffff;
  font-weight: 700;
}

.vip-price-highlight {
  font-size: 0.72rem;
  color: #fde68a;
  font-weight: 600;
  margin-top: 2px;
}

/* Modal Body */
.vip-modal-body {
  padding: 14px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Sleek custom scrollbar */
.vip-modal-body::-webkit-scrollbar {
  width: 6px;
}

.vip-modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 999px;
}

.vip-modal-body::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.35);
  border-radius: 999px;
}

.vip-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.65);
}

/* Feature Cards Grid (2 Columns) */
.vip-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.vip-feature-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 12px 14px;
  transition: all 0.25s ease;
}

.vip-feature-card.highlight {
  background: rgba(245, 158, 11, 0.04);
  border-color: rgba(245, 158, 11, 0.3);
}

.vip-feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.vip-feature-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.vip-feature-icon {
  font-size: 22px;
  line-height: 1;
}

.vip-feature-card-header h4 {
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0;
  color: #f1f5f9;
}

.vip-feature-tag {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 500;
}

.vip-feature-tag.badge-pro {
  color: #fbbf24;
  font-weight: 700;
}

.vip-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.vip-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.79rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.vip-feature-list .check {
  color: #10b981;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Payment Section */
.vip-payment-section {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 14px;
  background: rgba(18, 19, 32, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 16px;
  padding: 12px 14px;
  align-items: stretch;
}

.vip-contact-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(145deg, rgba(30, 32, 54, 0.85), rgba(15, 17, 30, 0.95));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  padding: 16px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-align: center;
}

.vip-contact-header {
  margin-bottom: 6px;
}

.contact-badge {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.contact-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 3px 0;
}

.contact-card-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  margin: 0;
}

.vip-contact-price-display {
  margin: 10px 0 8px 0;
  padding: 8px 10px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245, 158, 11, 0.35);
  border-radius: 10px;
}

.contact-price-num {
  font-size: 1.65rem;
  font-weight: 900;
  color: #fbbf24;
  line-height: 1;
}

.contact-price-unit {
  font-size: 0.72rem;
  color: #cbd5e1;
  margin-top: 3px;
}

.contact-notice-text {
  font-size: 0.76rem;
  color: #e2e8f0;
  line-height: 1.4;
  margin-bottom: 10px;
}

.btn-vip-contact-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: linear-gradient(135deg, #1877f2 0%, #0d5bbd 100%);
  color: #ffffff !important;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(24, 119, 242, 0.4);
  transition: all 0.2s ease;
}

.btn-vip-contact-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(24, 119, 242, 0.6);
  filter: brightness(1.1);
}

.vip-contact-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 8px;
}

/* Steps Container */
.vip-steps-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.steps-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0;
}

.vip-step-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 8px 10px;
  transition: all 0.2s ease;
}

.vip-step-box:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(245, 158, 11, 0.3);
}

.step-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #111827;
  font-weight: 900;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-text strong {
  display: block;
  font-size: 0.82rem;
  color: #f8fafc;
  margin-bottom: 1px;
}

.step-text p {
  margin: 0;
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.35;
}

.step-text p em {
  color: #cbd5e1;
  font-style: normal;
}

/* CTA Facebook Button */
.btn-vip-fb-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #1877f2 0%, #0d5cb6 100%);
  border: 1px solid #60a5fa;
  color: #ffffff !important;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 10px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(24, 119, 242, 0.45);
  cursor: pointer;
  margin-top: 2px;
}

.btn-vip-fb-cta:hover {
  background: linear-gradient(135deg, #2583fa 0%, #1877f2 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(24, 119, 242, 0.7);
}

/* Modal Footer */
.vip-modal-footer {
  padding: 8px 24px 10px;
  display: flex;
  justify-content: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
}

.btn-vip-close-bottom {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-vip-close-bottom:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.06);
}

/* Responsive for Mobile */
@media (max-width: 768px) {
  .vip-modal-dialog {
    max-height: 94vh;
    border-radius: 16px;
  }
  .vip-modal-header {
    padding: 14px 14px 8px;
  }
  .vip-title {
    font-size: 1.25rem;
  }
  .vip-modal-body {
    padding: 12px 14px;
    gap: 10px;
  }
  .vip-features-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .vip-payment-section {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }
  .vip-contact-card {
    padding: 12px 10px;
  }
  .btn-vip-fb-cta {
    font-size: 0.86rem;
    padding: 9px 12px;
  }
}


/* App-only access (HWID): login card shown when username/password login is closed */
#authAppOnlyBox.hidden, #authLoginModal .auth-tabs.hidden { display: none !important; }
#authAppOnlyBox { margin: 12px 0 4px; }
#authAppOnlyMsg { margin-top: 10px; }
#authAppOnlyMsg.hidden { display: none; }
