﻿/* ═══════════════════════════════════════════════════════════
   NeoDevelopment — Design System
   Premium dark theme with purple/blue gradients & glassmorphism
   ═══════════════════════════════════════════════════════════ */

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

/* ─── CSS Variables ─── */
:root {
  --bg-primary: #06060f;
  --bg-secondary: #0d0d1a;
  --bg-card: rgba(15, 15, 30, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);
  --bg-input: rgba(255, 255, 255, 0.05);

  --border-glass: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(139, 92, 246, 0.5);

  --text-primary: #f0f0f5;
  --text-secondary: #8b8ba3;
  --text-muted: #5a5a72;

  --accent-purple: #8b5cf6;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-orange: #f59e0b;
  --accent-pink: #ec4899;

  --gradient-main: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 50%, #06b6d4 100%);
  --gradient-hero: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(59, 130, 246, 0.1) 50%, rgba(6, 182, 212, 0.05) 100%);
  --gradient-card: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(59, 130, 246, 0.04) 100%);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --nav-height: 70px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

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

/* ─── Background decoration ─── */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(59, 130, 246, 0.04) 0%, transparent 50%),
              radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.03) 0%, transparent 50%);
  z-index: -1;
  animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, -1%) rotate(1deg); }
  66% { transform: translate(-1%, 2%) rotate(-1deg); }
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.5); }

/* ─── Links ─── */
a {
  color: var(--accent-purple);
  text-decoration: none;
  transition: var(--transition);
}
a:hover { color: var(--accent-blue); }

/* ═══════════════════════════════════════════════════════════
   Navigation
   ═══════════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(6, 6, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-brand-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-main);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: white;
}

.nav-brand-text {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-brand-text span {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-glass-hover);
}

.nav-links a.active {
  color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.1);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 0.25rem;
}

.lang-btn {
  background: none;
  border: none;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.lang-btn.active {
  background: var(--accent-purple);
  color: white;
}

.lang-btn:hover:not(.active) {
  color: var(--text-primary);
}

/* User avatar in nav */
.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: white;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.nav-avatar:hover { border-color: var(--accent-purple); }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Nav dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  min-width: 180px;
  padding: 0.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 1001;
}

.nav-dropdown-content.show { display: block; }

.nav-dropdown-content a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
}
.nav-dropdown-content a:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

/* Mobile menu */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════
   Main Content
   ═══════════════════════════════════════════════════════════ */
.main-content {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════════
   Cards & Glass Components
   ═══════════════════════════════════════════════════════════ */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
}

.glass-card:hover {
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.glass-card-static {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-main);
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
  color: white;
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}
.btn-secondary:hover {
  background: var(--bg-glass-hover);
  border-color: rgba(139, 92, 246, 0.3);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.btn-success:hover {
  background: rgba(16, 185, 129, 0.25);
}

.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* ═══════════════════════════════════════════════════════════
   Form Elements
   ═══════════════════════════════════════════════════════════ */
.form-group {
  margin-bottom: 1.25rem;
}

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

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b8ba3' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════
   Hero Section (Home)
   ═══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  padding: 6rem 0 4rem;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  position: relative;
}

.hero-title .gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Animated grid background ─── */
.hero-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* ═══════════════════════════════════════════════════════════
   Feature Cards
   ═══════════════════════════════════════════════════════════ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.feature-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
  background: var(--gradient-card);
  border: 1px solid var(--border-glass);
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════
   Stats Section
   ═══════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
}

.stat-card {
  text-align: center;
  padding: 1.5rem;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ═══════════════════════════════════════════════════════════
   Scripts Grid
   ═══════════════════════════════════════════════════════════ */
.scripts-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}
.search-box input:focus {
  border-color: var(--border-focus);
}

.search-box::before {
  content: '🔍';
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
}

.filter-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-glass);
  border-radius: var(--radius-full);
  padding: 0.25rem;
  border: 1px solid var(--border-glass);
}

.filter-tab {
  background: none;
  border: none;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-tab.active {
  background: var(--accent-purple);
  color: white;
}

.filter-tab:hover:not(.active) { color: var(--text-primary); }

.scripts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.script-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.script-thumb {
  width: 100%;
  height: 180px;
  background: var(--gradient-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-muted);
}

.script-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.script-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.script-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.script-price {
  font-weight: 700;
  font-size: 0.9rem;
}

.script-price.free { color: var(--accent-green); }
.script-price.paid { color: var(--accent-orange); }

.script-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.script-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.script-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-glass);
}

.script-downloads {
  color: var(--text-muted);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ═══════════════════════════════════════════════════════════
   Chat
   ═══════════════════════════════════════════════════════════ */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--nav-height) - 4rem);
  max-height: 700px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-message {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
  position: relative;
  animation: messageIn 0.3s ease;
}

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

.chat-message:hover {
  background: var(--bg-glass);
}

.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.chat-avatar img { width: 100%; height: 100%; object-fit: cover; }

.chat-body { flex: 1; min-width: 0; }

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.chat-username {
  font-weight: 600;
  font-size: 0.9rem;
}

.chat-username.admin {
  color: var(--accent-red) !important;
  font-weight: 700;
}

.chat-time {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.chat-content {
  color: var(--text-secondary);
  font-size: 0.9rem;
  word-break: break-word;
}

.chat-delete {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  opacity: 0;
  transition: var(--transition);
}

.chat-message:hover .chat-delete { opacity: 1; }

.chat-input-bar {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  border-top: 1px solid var(--border-glass);
}

.chat-input-bar input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}
.chat-input-bar input:focus {
  border-color: var(--border-focus);
}

/* ═══════════════════════════════════════════════════════════
   Tickets
   ═══════════════════════════════════════════════════════════ */
.tickets-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ticket-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  cursor: pointer;
}

.ticket-info { flex: 1; min-width: 0; }

.ticket-subject {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.ticket-meta {
  display: flex;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.ticket-status {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ticket-status.open {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
}
.ticket-status.in-progress {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-orange);
}
.ticket-status.closed {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
}

/* Ticket detail */
.ticket-detail {
  max-width: 800px;
}

.ticket-replies {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.ticket-reply {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
}

/* ═══════════════════════════════════════════════════════════
   Auth Forms
   ═══════════════════════════════════════════════════════════ */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height));
  padding: 2rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  text-align: center;
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.auth-card .form-input {
  text-align: left;
}

.auth-footer {
  margin-top: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════════════════
   Profile
   ═══════════════════════════════════════════════════════════ */
.profile-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 2rem;
  color: white;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  font-size: 0.8rem;
  color: white;
}

.profile-avatar:hover .profile-avatar-overlay { opacity: 1; }

.profile-info h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.profile-role {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.profile-role.admin { color: var(--accent-red); }
.profile-role.user { color: var(--accent-purple); }

/* ═══════════════════════════════════════════════════════════
   Admin Panel
   ═══════════════════════════════════════════════════════════ */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.admin-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-stat {
  padding: 1.25rem;
  text-align: center;
}

.admin-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.admin-stat-label {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* Script list in admin */
.admin-script-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-script-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
}

.admin-script-item span {
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   Toast Notifications
   ═══════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: calc(var(--nav-height) + 1rem);
  right: 1rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  font-size: 0.9rem;
  font-weight: 500;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  max-width: 350px;
}

.toast.success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--accent-green);
}

.toast.error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--accent-red);
}

.toast.info {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--accent-blue);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

/* ═══════════════════════════════════════════════════════════
   Empty State
   ═══════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state-text {
  font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════════
   Modal
   ═══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

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

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  animation: modalIn 0.3s ease;
}

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

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════
   Loading Spinner
   ═══════════════════════════════════════════════════════════ */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-glass);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 0.75rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════
   Badge
   ═══════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-admin {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
}

/* ═══════════════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════════════ */
.footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4rem;
}

/* ═══════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .navbar { padding: 0 1rem; }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(6, 6, 15, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border-glass);
  }
  .nav-links.show { display: flex; }

  .nav-hamburger { display: block; }

  .hero-title { font-size: 2.25rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero { padding: 3rem 0 2rem; }

  .scripts-toolbar { flex-direction: column; }
  .filter-tabs { overflow-x: auto; }

  .scripts-grid { grid-template-columns: 1fr; }

  .chat-container { height: calc(100vh - var(--nav-height) - 3rem); }

  .profile-header { flex-direction: column; text-align: center; }

  .admin-grid { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: 1fr 1fr; }

  .container { padding: 1rem; }

  .auth-card { padding: 1.5rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.75rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: 1fr; }
}
