/*
Theme Name: Script No Key
Theme URI: https://scriptnokey.com
Author: Team Shadowrise Devs
Author URI: https://scriptnokey.com
Description: A dark, modern theme for Roblox script sharing communities. Fully reusable across multiple sites.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sailor-piece-theme
Tags: dark, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ── CSS Variables — Dark Mode (default) ───────────────── */
:root {
  --bg-primary: #0a0f0f;
  --bg-secondary: #0f1a1a;
  --bg-card: #132020;
  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(0, 212, 212, 0.4);
  --accent: #00d4d4;
  --accent-glow: rgba(0, 212, 212, 0.15);
  --accent-hover: #00f0f0;
  --text-primary: #e8f8f8;
  --text-secondary: #94b8b8;
  --text-muted: #4a6868;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --navbar-bg: rgba(10, 15, 15, 0.92);
  --navbar-mobile-bg: rgba(10, 15, 15, 0.98);
  --copy-box-bg: #0a1515;
}

/* ── CSS Variables — Light Mode ─────────────────────────── */
/* Anti-flash: applied to <html> before body renders */
html.light-mode-preload,
html.light-mode-preload body,
body.light-mode {
  --bg-primary: #f0fafa;
  --bg-secondary: #e0f2f2;
  --bg-card: #ffffff;
  --border: rgba(0, 0, 0, 0.09);
  --border-accent: rgba(0, 150, 150, 0.35);
  --accent: #009999;
  --accent-glow: rgba(0, 153, 153, 0.12);
  --accent-hover: #007a7a;
  --text-primary: #0a1a1a;
  --text-secondary: #1a3a3a;
  --text-muted: #5a8888;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
  --navbar-bg: rgba(255, 255, 255, 0.92);
  --navbar-mobile-bg: rgba(255, 255, 255, 0.98);
  --copy-box-bg: #e8f5f5;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: 'Exo 2', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

.nav-logo {
  font-family: 'Rajdhani', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 8px;
  transition: all .2s;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(0, 212, 212, 0.08);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}

.online-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.online-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .4;
  }
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Exo 2', sans-serif;
  cursor: pointer;
  transition: all .2s;
  border: none;
  text-decoration: none;
}

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

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

.btn-ghost {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--border);
  color: var(--text-primary);
}

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Exo 2', sans-serif;
  cursor: pointer;
  border: none;
  transition: all .2s;
}

.btn-full:hover {
  background: var(--accent-hover);
}

.btn-upload {
  background: var(--accent);
  color: #fff;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

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

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
  position: relative;
  overflow: hidden;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 212, 212, 0.1);
  border: 1px solid rgba(0, 212, 212, 0.3);
  color: var(--accent-hover);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(32px, 6vw, 58px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
}

.highlight {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.stats-bar {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 40px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: 'Rajdhani', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-hover);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Search ───────────────────────────────────────────────── */
.search-wrap {
  position: relative;
  max-width: 540px;
  margin: 0 auto;
}

.search-wrap svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: 12px;
  padding: 14px 16px 14px 44px;
  font-size: 14px;
  font-family: 'Exo 2', sans-serif;
  color: var(--text-primary);
  outline: none;
  transition: all .2s;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-input::placeholder {
  color: var(--text-muted);
}

/* ── Features ─────────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .2s;
}

.feature-card:hover {
  border-color: var(--border-accent);
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.feature-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

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

/* ── Scripts Section ─────────────────────────────────────── */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-right: 10px;
}

.script-count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 20px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-btn {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.sort-select {
  margin-left: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Exo 2', sans-serif;
  cursor: pointer;
  outline: none;
}

/* ── Script Cards ─────────────────────────────────────────── */
.scripts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.script-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: all .2s;
  display: block;
}

.script-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.script-thumb {
  position: relative;
  height: 160px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  overflow: hidden;
}

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

.tag-free,
.tag-key {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.tag-free {
  background: rgba(16, 185, 129, 0.9);
  color: #fff;
}

.tag-key {
  background: rgba(245, 158, 11, 0.9);
  color: #000;
}

.script-body {
  padding: 14px;
}

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

.game-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-hover);
  background: var(--accent-glow);
  padding: 2px 8px;
  border-radius: 4px;
}

.script-stats {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.script-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.script-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}

.page-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all .2s;
}

.page-btn:hover,
.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── FAQ ──────────────────────────────────────────────────── */
.faq-section {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.faq-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 20px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  transition: background .2s;
}

.faq-q:hover {
  background: rgba(255, 255, 255, 0.03);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding: 0 20px;
}

.faq-item.open .faq-a {
  max-height: 300px;
  padding: 0 20px 16px;
}

.chevron {
  width: 18px;
  height: 18px;
  transition: transform .3s;
  flex-shrink: 0;
}

.faq-item.open .chevron {
  transform: rotate(180deg);
}

/* ── Content Section ─────────────────────────────────────── */
.content-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 60px;
  position: relative;
  z-index: 1;
}

.content-section h2 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.content-section h3 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--accent);
}

.content-section p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 14px;
}

.content-section strong {
  color: var(--text-primary);
}

.content-section ol,
.content-section ul {
  padding-left: 20px;
  margin-bottom: 14px;
}

.content-section ol li,
.content-section ul li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 8px;
}

.content-section a {
  color: var(--accent);
  text-decoration: none;
}

.content-section a:hover {
  text-decoration: underline;
}

.conclusion-box {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: 12px;
  padding: 24px;
  margin-top: 16px;
}

.conclusion-box p {
  margin-bottom: 0;
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 24px 24px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand .nav-logo {
  margin-bottom: 12px;
  display: inline-flex;
}

.footer-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.footer-stat {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.footer-stat strong {
  color: var(--text-primary);
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-decoration: none;
  transition: color .2s;
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Auth Pages ───────────────────────────────────────────── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  width: 100%;
  max-width: 420px;
}

.auth-logo {
  font-family: 'Rajdhani', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  text-decoration: none;
}

.auth-box h2 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 24px;
}

.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 20px;
}

.auth-switch a {
  color: var(--accent);
}

/* ── Forms ────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: 'Exo 2', sans-serif;
  color: var(--text-primary);
  outline: none;
  transition: all .2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

/* ── Static Pages ─────────────────────────────────────────── */
.static-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 50px 24px 80px;
  position: relative;
  z-index: 1;
}

.static-page h1 {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  margin-bottom: 8px;
}

.static-page .page-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.static-page h2 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin: 36px 0 12px;
}

.static-page h3 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 24px 0 10px;
}

.static-page p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 14px;
}

.static-page ul,
.static-page ol {
  padding-left: 22px;
  margin-bottom: 14px;
}

.static-page ul li,
.static-page ol li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 6px;
}

.static-page strong {
  color: var(--text-primary);
}

.static-page a {
  color: var(--accent);
}

/* ── Script Detail Page ───────────────────────────────────── */
.script-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.script-header-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
}

.script-header-thumb {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
}

.script-header-body {
  padding: 20px 24px;
}

.script-header-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
}

.script-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.copy-box {
  background: var(--copy-box-bg, var(--bg-secondary));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.copy-box pre {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 180px;
}

.copy-box-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
}

.copy-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: opacity .2s;
}

.copy-btn:hover {
  opacity: 0.85;
}

.download-btn {
  background: var(--bg-secondary);
  color: var(--accent);
  border: 1px solid var(--border-accent);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: opacity .2s;
}

.download-btn:hover {
  opacity: 0.85;
}

/* ── Upload Page ──────────────────────────────────────────── */
.upload-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.upload-page h1 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 28px;
}

.upload-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
}

/* ── Responsive ───────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background .2s;
}

.nav-hamburger:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Global overflow fix for mobile */
.script-layout * {
  box-sizing: border-box;
}

* {
  box-sizing: border-box;
}

.similar-scripts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* ── AdSense / Auto Ads – full responsive fix ─────────────── */

/* Every <ins> ad tag: never exceed viewport */
ins.adsbygoogle {
  display: block !important;
  max-width: 100% !important;
  width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Any wrapper div Google injects around ads */
.adsbygoogle-noablate,
[id^="aswift_"],
[id^="google_ads_iframe"],
iframe[id^="aswift"] {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Containers that hold ads – homepage section + single page */
.section,
.script-main,
.script-layout,
#ad-header,
.ad-wrap {
  overflow: hidden !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Auto Ads that Google places directly inside body */
body > ins.adsbygoogle,
body > .adsbygoogle-noablate {
  max-width: 100vw !important;
  overflow: hidden !important;
}

/* Mobile: make sure no ad iframe pokes out */
@media (max-width: 768px) {
  ins.adsbygoogle {
    width: 100% !important;
    max-width: 100vw !important;
  }

  /* Responsive display ads – let them auto-size */
  ins.adsbygoogle[data-ad-format="auto"],
  ins.adsbygoogle[data-full-width-responsive="true"] {
    width: 100% !important;
  }

  /* Fixed-size ad units (e.g. 320×50 banner) – center + clip */
  ins.adsbygoogle:not([data-ad-format="auto"]) {
    margin-left: auto !important;
    margin-right: auto !important;
    overflow: hidden !important;
  }
}

/* Discover more / any Google-injected div with inline style */
.script-layout > div[style],
.script-main > div[style],
.section > div[style] {
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .script-layout {
    grid-template-columns: 1fr;
    padding: 16px 12px 40px;
    gap: 16px;
  }

  .stats-bar {
    gap: 24px;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--navbar-mobile-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 16px 16px;
    gap: 4px;
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 14px;
    font-size: 15px;
    border-radius: 10px;
  }

  .nav-auth .online-pill {
    display: none;
  }

  .nav-auth .btn {
    font-size: 12px;
    padding: 6px 10px;
  }

  /* Script page responsive */
  .script-header-body {
    padding: 14px 16px;
    overflow: hidden;
  }

  .script-header-box {
    overflow: hidden;
    max-width: 100%;
  }

  .script-main {
    overflow: hidden;
    max-width: 100%;
  }

  .script-header-title {
    font-size: 20px;
  }

  .script-header-meta {
    font-size: 12px;
    gap: 8px;
  }

  .copy-box pre {
    font-size: 12px;
    padding-right: 0;
    max-height: 160px;
    overflow-x: hidden;
    word-break: break-all;
    white-space: pre-wrap;
  }

  .copy-box-actions {
    position: static;
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
  }

  /* Script Info sidebar values fix */
  .script-sidebar > div > div > div {
    flex-wrap: wrap;
    gap: 4px;
  }

  .script-sidebar > div > div > div strong,
  .script-sidebar > div > div > div a {
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
  }

  .copy-btn,
  .download-btn {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
    font-size: 12px;
  }

  .similar-scripts-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 480px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .navbar {
    padding: 0 16px;
  }

  /* Script page mobile */
  .script-layout {
    padding: 12px 10px 32px;
  }

  .script-header-thumb {
    height: 160px;
  }

  .script-header-title {
    font-size: 18px;
  }

  .script-header-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 11px;
  }

  .copy-box {
    padding: 12px;
  }

  .copy-box pre {
    font-size: 11px;
    max-height: 140px;
  }

  .copy-btn,
  .download-btn {
    font-size: 12px;
    padding: 8px 12px;
  }

  .similar-scripts-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
  .similar-scripts-grid a div[style*="aspect-ratio"] {
    aspect-ratio: unset !important;
    height: 140px !important;
  }
}

/* ══════════════════════════════════════════════════════════
   MOBILE CONTENT OVERFLOW FIX – single-script.php
   Har wo cheez jo right side cut ho rahi thi
   ══════════════════════════════════════════════════════════ */

/* Page-level containment */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* Script layout aur uske andar sab kuch */
.script-layout,
.script-main,
.script-sidebar {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

/* Script title – wrap karne do, cut nahi hona chahiye */
.script-header-title {
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
}

/* Meta row (views, likes, date) – wrap on small screens */
.script-header-meta {
  flex-wrap: wrap !important;
  overflow: hidden !important;
  max-width: 100% !important;
}

/* Feature tags – flex-wrap already set, add overflow safety */
.script-header-body > div[style*="flex-wrap"] {
  max-width: 100% !important;
  overflow: hidden !important;
}

/* Feature badge text – prevent overflow */
.script-header-body span[style*="border-radius:20px"] {
  max-width: 100% !important;
  word-break: break-word;
}

/* Script Info sidebar rows */
.script-sidebar > div > div > div {
  flex-wrap: wrap !important;
  gap: 4px;
  overflow: hidden !important;
  max-width: 100% !important;
}

/* Sidebar values (strong / a tags) */
.script-sidebar > div > div > div strong,
.script-sidebar > div > div > div a {
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  display: inline-block;
}

/* Copy/pre box */
.copy-box {
  max-width: 100%;
  overflow: hidden;
}
.copy-box pre {
  overflow-x: auto;
  word-break: break-all;
  white-space: pre-wrap;
  max-width: 100%;
}

/* Recent scripts sidebar item titles */
.script-sidebar a div[style*="white-space:nowrap"],
.script-sidebar a div[style*="text-overflow"] {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Inline-style div wrappers inside script-main – e.g. youtube, comments */
.script-main > div[style] {
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

@media (max-width: 600px) {
  /* Script title smaller screens */
  .script-header-title {
    font-size: 17px !important;
    line-height: 1.4;
  }

  /* Sidebar info: allow label+value to stack if needed */
  .script-sidebar > div > div > div {
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
  }

  /* Game tag in header – cut nahi ho */
  .game-tag {
    max-width: 55vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
  }

  /* Play on Roblox button */
  .script-sidebar > a[href] {
    font-size: 13px !important;
    padding: 10px 8px !important;
  }

  /* Comments section */
  .script-main > div[style*="padding:24px"] {
    padding: 14px 12px !important;
  }

  /* Comment textarea */
  #commentText {
    font-size: 13px;
  }
}