/* MINIMALIST & NATURAL DARK DESIGN SYSTEM (ENGLISH - SCRIPTZONE AUTH & ADS) */

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

:root {
  --bg-main: #0b0f17;
  --bg-surface: #131a26;
  --bg-card: #182232;
  --bg-card-hover: #1e2b3e;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.4);

  --accent-primary: #3b82f6;      /* Royal Blue */
  --accent-emerald: #10b981;      /* Emerald Green for Play / Like / Developer */
  --accent-rose: #ef4444;         /* Rose Red for Dislike / Not Working / Logout */
  --accent-amber: #f59e0b;        /* Gold/Amber for Premium & Admin */
  --accent-purple: #8b5cf6;       /* Purple for New */
  --accent-discord: #5865f2;      /* Discord Purple */

  --text-main: #f8fafc;
  --text-sub: #94a3b8;
  --text-muted: #64748b;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.25);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 15, 23, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.9rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
}

.brand-logo {
  width: 34px;
  height: 34px;
  background: var(--accent-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
}

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

.nav-link {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: #fff;
}

/* MULTI-LANGUAGE SELECTOR DROPDOWN */
.lang-selector-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-select-btn {
  background: var(--bg-surface);
  color: #fff;
  border: 1px solid var(--border-color);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  outline: none;
  font-family: inherit;
}
.lang-select-btn:hover {
  border-color: var(--accent-primary);
  background: var(--bg-card-hover);
}

.lang-dropdown-menu {
  position: absolute;
  top: 110%;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-subtle);
  display: none;
  flex-direction: column;
  min-width: 140px;
  z-index: 2000;
  overflow: hidden;
}
.lang-dropdown-menu.show {
  display: flex;
}

.lang-opt {
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--text-sub);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.lang-opt:hover, .lang-opt.active {
  background: var(--bg-card-hover);
  color: #fff;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: inherit;
  text-decoration: none;
}

.btn-primary { background: var(--accent-primary); color: #fff; }
.btn-primary:hover { background: #2563eb; }

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }

.btn-admin {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid var(--accent-amber);
}
.btn-admin:hover {
  background: var(--accent-amber);
  color: #451a03;
}

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

/* RSCRIPTS LARGE COPY SCRIPT BUTTON (WHITE) */
.btn-copy-white {
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.btn-copy-white:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

/* PLAY BUTTON (DARK GREEN) */
.btn-play-green {
  background: #064e3b;
  color: #34d399;
  border: 1px solid #059669;
  font-weight: 700;
  padding: 0.8rem 1.5rem;
}
.btn-play-green:hover {
  background: #047857;
  color: #fff;
}

/* LIKE & DISLIKE BUTTONS */
.btn-like-green {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.btn-like-green:hover, .btn-like-green.voted {
  background: var(--accent-emerald);
  color: #042f2e;
}

.btn-dislike-red {
  background: rgba(239, 68, 68, 0.12);
  color: var(--accent-rose);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-dislike-red:hover, .btn-dislike-red.voted {
  background: var(--accent-rose);
  color: #450a0a;
}

.btn-discord { background: var(--accent-discord); color: #fff; }
.btn-discord:hover { background: #4752c4; }

.btn-google {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #e5e7eb;
}
.btn-google:hover { background: #f3f4f6; }

/* USER ROLES & BADGES */
.badge-admin { background: #7c2d12; color: #fdba74; border: 1px solid #f97316; }
.badge-premium { background: #451a03; color: #fde047; border: 1px solid #eab308; }
.badge-developer { background: #064e3b; color: #6ee7b7; border: 1px solid #10b981; }

/* FEEDBACK BUTTONS */
.btn-works-great {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid var(--accent-emerald);
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}
.btn-works-great:hover, .btn-works-great.selected {
  background: var(--accent-emerald);
  color: #042f2e;
}

.btn-not-working {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-rose);
  border: 1px solid var(--accent-rose);
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}
.btn-not-working:hover, .btn-not-working.selected {
  background: var(--accent-rose);
  color: #450a0a;
}

/* USER AVATAR & PROFILE MENU IN NAVBAR */
.user-profile-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 4px 12px 4px 4px;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
}
.user-profile-menu:hover {
  border-color: var(--accent-primary);
  background: var(--bg-card-hover);
}

.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  overflow: hidden;
}
.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* PROFILE PAGE STYLES */
.profile-page-header {
  padding: 2.5rem 0 1rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.profile-avatar-row {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.2rem;
}

.profile-large-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
  border: 3px solid var(--border-color);
  flex-shrink: 0;
}
.profile-large-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-header-info {
  flex-grow: 1;
}

.profile-display-name {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-handle-sub {
  font-size: 0.85rem;
  color: var(--text-sub);
  margin: 6px 0 14px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-stats-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-sub);
}
.profile-stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile-stat-item strong {
  color: #fff;
  font-size: 1rem;
}

.profile-nav-tabs {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.profile-tab-item {
  padding-bottom: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-sub);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.profile-tab-item:hover, .profile-tab-item.active {
  color: #fff;
  border-bottom-color: var(--accent-primary);
}

/* CARDS THUMB OVERLAY BADGES */
.thumb-views-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.thumb-time-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

/* CREATOR PROFILE CARD INSIDE COPY MODAL */
.creator-card-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.2rem;
}

.creator-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* LAYOUT */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* HERO SECTION */
.hero {
  text-align: center;
  padding: 2rem 1rem 1.5rem 1rem;
  max-width: 840px;
  margin: 0 auto;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
  margin-bottom: 0.75rem;
}

.hero-sub {
  color: var(--text-sub);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

/* SEARCH & FILTERS */
.search-box-wrap {
  position: relative;
  margin-bottom: 1.2rem;
}

.search-input {
  width: 100%;
  padding: 0.9rem 1.2rem 0.9rem 3rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.98rem;
  font-family: inherit;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
}

.chip {
  padding: 0.45rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-sub);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.chip:hover, .chip.active {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  color: #fff;
}

.chip.active-green {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
}

/* CONTENT GRID */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  margin-top: 1.5rem;
}

@media (max-width: 992px) {
  .main-grid { grid-template-columns: 1fr; }
}

.sort-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-color);
}

.sort-select {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

/* SCRIPT CARDS GRID */
.scripts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}

.script-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  cursor: pointer;
}

.script-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.card-thumb {
  width: 100%;
  height: 150px;
  position: relative;
  background: #111827;
  overflow: hidden;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: var(--transition);
}

.script-card:hover .card-thumb img {
  transform: scale(1.05);
}

.badge-row {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
}

.badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-emerald { background: var(--accent-emerald); color: #042f2e; }
.badge-amber { background: var(--accent-amber); color: #451a03; }
.badge-purple { background: var(--accent-purple); color: #fff; }
.badge-slate { background: var(--bg-surface); color: var(--text-sub); border: 1px solid var(--border-color); }

.card-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.card-game {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  font-size: 0.83rem;
  color: var(--text-sub);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.vote-chip-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* SIDEBAR WIDGET */
.widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.widget-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* RSCRIPTS FULL-PAGE VIEW & USER PROFILE FULL-PAGE VIEW */
.fullpage-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-main);
  z-index: 2000;
  overflow-y: auto;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.fullpage-overlay.active {
  display: block;
  opacity: 1;
}

.fullpage-header-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 23, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.9rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fullpage-content-wrapper {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.rscripts-page-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
}
@media (max-width: 900px) {
  .rscripts-page-grid { grid-template-columns: 1fr; }
}

/* MODAL STANDARD OVERLAYS */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  padding: 2rem;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.auth-tab-row {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.auth-tab {
  padding-bottom: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-sub);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.auth-tab.active {
  color: #fff;
  border-bottom-color: var(--accent-primary);
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-main);
}

.code-box {
  background: #090d14;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  color: var(--accent-emerald);
  overflow-x: auto;
  max-height: 220px;
  margin-top: 0.5rem;
  white-space: pre-wrap;
  word-break: break-all;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--accent-primary);
  color: #fff;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-subtle);
  z-index: 4000;
  transform: translateY(80px);
  opacity: 0;
  transition: var(--transition);
  font-size: 0.9rem;
}
.toast.show { transform: translateY(0); opacity: 1; }
