/* ═══════════════════════════════════════════════════════════════
   DEEP NUDE FREE — Cyberpunk Neon Matrix Theme
   Totally unique design — electric blues, neon glow, cyber grid
   ═══════════════════════════════════════════════════════════════ */

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

/* ── CSS Variables ────────────────────────────────────────────── */
:root {
  --bg-void:         #050a04;
  --bg-panel:        rgba(10, 15, 8, 0.88);
  --bg-glass:        rgba(0, 200, 255, 0.03);
  --border-neon:     rgba(0, 200, 255, 0.12);
  --neon-cyan:       #39ff14;
  --neon-cyan-dim:   #1a932b;
  --neon-purple:     #ff4500;
  --neon-purple-dim: #cc3700;
  --neon-pink:       #ec4899;
  --neon-green:      #22d3ee;
  --glow-cyan:       rgba(57, 255, 20, 0.3);
  --glow-purple:     rgba(255, 69, 0, 0.3);
  --text-primary:    #e0f2fe;
  --text-secondary:  #7dd3fc;
  --text-muted:      #475569;
  --main-radius:     8px;
  --main-padding:    12px;
  --card-shadow:     0 0 20px rgba(57, 255, 20,0.06), 0 8px 32px rgba(0,0,0,0.5);
  --transition:      all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Global ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 16px 10px;
  background-color: var(--bg-void);
  background-image:
    radial-gradient(ellipse at 15% 10%, rgba(57, 255, 20,0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 90%, rgba(255, 69, 0,0.06) 0%, transparent 50%),
    url(../img/bg.jpg);
  background-size: cover;
  background-attachment: fixed;
  background-blend-mode: overlay;
  color: var(--text-primary);
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Scanline overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* Dark overlay on background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(4,6,15,0.93) 0%,
    rgba(4,6,15,0.82) 50%,
    rgba(4,6,15,0.95) 100%
  );
  z-index: -1;
  pointer-events: none;
}

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb { background: var(--neon-cyan-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-cyan); }

::selection {
  background: var(--neon-purple);
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════
   MAIN GRID
   ═══════════════════════════════════════════════════════════════ */
.container {
  display: grid;
  max-width: 1240px;
  margin: 0 auto;
  height: auto;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: auto auto auto auto auto;
  grid-template-areas:
    "nav nav nav nav"
    "sidebar main main main"
    "content1 content2 content2 forads"
    "content3 content3 content3 content3"
    "footer footer footer footer";
  grid-gap: 10px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  animation: gridFadeIn 0.7s ease-out;
}

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

/* ── Shared panel styles ─────────────────────────────────────── */
nav, main, #sidebar, #content1, #content2, #content3, #forads, footer {
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-neon);
  border-radius: var(--main-radius);
  padding: var(--main-padding);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

nav:hover, main:hover, #sidebar:hover, #content1:hover,
#content2:hover, #content3:hover, #forads:hover {
  border-color: rgba(57, 255, 20, 0.25);
  box-shadow: 0 0 30px rgba(57, 255, 20,0.1), 0 12px 40px rgba(0,0,0,0.6);
}

/* ═══════════════════════════════════════════════════════════════
   NAV — Title Bar
   ═══════════════════════════════════════════════════════════════ */
nav {
  grid-area: nav;
  font-family: 'Orbitron', monospace;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: 6px;
  text-transform: uppercase;
  padding: 24px 20px;
  text-align: left;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(10, 15, 8,0.95) 0%, rgba(20,10,40,0.90) 100%);
  color: var(--neon-cyan);
  text-shadow: 0 0 20px var(--glow-cyan), 0 0 60px rgba(57, 255, 20,0.2);
}

nav::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-purple), var(--neon-cyan), transparent);
  animation: neonSweep 3s linear infinite;
}

@keyframes neonSweep {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

nav::after {
  content: '// SYSTEM ONLINE';
  position: absolute;
  top: 12px;
  right: 16px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--neon-green);
  opacity: 0.5;
  animation: blink 2s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   MAIN — Image Gallery (.ver)
   ═══════════════════════════════════════════════════════════════ */
main, .ver {
  grid-area: main;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  height: auto !important;
  float: none !important;
}

.box {
  flex: 1 1 140px;
  height: 150px;
  background: linear-gradient(135deg, rgba(57, 255, 20,0.08) 0%, rgba(255, 69, 0,0.05) 100%);
  border: 1px solid var(--border-neon);
  border-radius: 10px;
  text-align: center;
  line-height: 150px;
  margin: 0;
  overflow: hidden;
  position: relative;
  transition: var(--transition);
}

.box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--glow-cyan) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.box:hover {
  border-color: var(--neon-cyan);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 20px var(--glow-cyan), 0 8px 24px rgba(0,0,0,0.4);
}

.box:hover::before {
  opacity: 0.3;
}

.box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 8px;
  filter: grayscale(20%) brightness(0.9);
  transition: var(--transition);
}

.box:hover img {
  filter: grayscale(0%) brightness(1.1);
}

.box a {
  display: block;
  width: 100%;
  height: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════ */
#sidebar {
  grid-area: sidebar;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#sidebar img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border-neon);
  box-shadow: 0 0 16px rgba(57, 255, 20,0.1);
}

/* ═══════════════════════════════════════════════════════════════
   CONTENT1 — Link List
   ═══════════════════════════════════════════════════════════════ */
#content1 {
  grid-area: content1;
  height: auto !important;
  padding: 14px;
  counter-reset: link-counter;
}

.box1 {
  counter-increment: link-counter;
  position: relative;
  height: auto;
  background: linear-gradient(135deg, rgba(57, 255, 20,0.04) 0%, rgba(255, 69, 0,0.03) 100%);
  border: 1px solid rgba(57, 255, 20,0.06);
  border-left: 3px solid var(--neon-cyan);
  text-align: left;
  line-height: 1.5;
  border-radius: 0 6px 6px 0;
  margin: 5px 0;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 12px 10px 38px;
  transition: var(--transition);
}

.box1::before {
  content: counter(link-counter);
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--neon-cyan-dim), var(--neon-purple-dim));
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Orbitron', monospace;
  border-radius: 4px;
  line-height: 1;
}

.box1:hover {
  background: linear-gradient(135deg, rgba(57, 255, 20,0.10) 0%, rgba(255, 69, 0,0.08) 100%);
  border-left-color: var(--neon-purple);
  transform: translateX(4px);
  box-shadow: 0 0 12px rgba(57, 255, 20,0.1);
}

.box1:nth-child(even) {
  border-left-color: var(--neon-purple);
}

.box1:nth-child(even)::before {
  background: linear-gradient(135deg, var(--neon-purple-dim), var(--neon-pink));
}

/* ═══════════════════════════════════════════════════════════════
   CONTENT2 — Description Cards
   ═══════════════════════════════════════════════════════════════ */
#content2 {
  grid-area: content2;
  padding: 14px;
}

.box2, .box3 {
  height: auto;
  text-align: left;
  line-height: 1.5;
  border-radius: 8px;
  margin: 6px 0;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.box2 {
  background: linear-gradient(135deg, rgba(57, 255, 20,0.06) 0%, rgba(10, 15, 8,0.9) 100%);
  border: 1px solid rgba(57, 255, 20,0.1);
}

.box3 {
  background: linear-gradient(135deg, rgba(255, 69, 0,0.06) 0%, rgba(10, 15, 8,0.9) 100%);
  border: 1px solid rgba(255, 69, 0,0.1);
}

.box2::before, .box3::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
}

.box2::before { background: var(--neon-cyan); }
.box3::before { background: var(--neon-purple); }

.box2:hover {
  border-color: rgba(57, 255, 20,0.3);
  box-shadow: 0 0 20px rgba(57, 255, 20,0.08);
  transform: translateX(3px);
}

.box3:hover {
  border-color: rgba(255, 69, 0,0.3);
  box-shadow: 0 0 20px rgba(255, 69, 0,0.08);
  transform: translateX(3px);
}

.fortext {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: 4px;
  opacity: 0.8;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   CONTENT3 — Table
   ═══════════════════════════════════════════════════════════════ */
#content3 {
  grid-area: content3;
  font-size: 14px;
  text-align: left;
  padding: 16px 20px;
}

#content3 table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
}

#content3 tr {
  transition: var(--transition);
}

#content3 tr:hover {
  transform: translateX(3px);
}

#content3 td {
  padding: 10px 14px;
  background: var(--bg-glass);
  border-top: 1px solid var(--border-neon);
  border-bottom: 1px solid var(--border-neon);
}

#content3 td:first-child {
  border-left: 3px solid var(--neon-cyan);
  border-radius: 6px 0 0 6px;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}

#content3 td:last-child {
  border-right: 1px solid var(--border-neon);
  border-radius: 0 6px 6px 0;
}

#content3 tr:nth-child(even) td:first-child {
  border-left-color: var(--neon-purple);
}

#content3 td.fortext {
  font-size: 12px;
  color: var(--text-secondary);
}

#content3 a:hover {
  color: var(--neon-purple) !important;
  text-shadow: 0 0 8px var(--glow-purple);
}

/* ═══════════════════════════════════════════════════════════════
   FORADS — Image Ad Grid
   ═══════════════════════════════════════════════════════════════ */
#forads {
  grid-area: forads;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  height: auto !important;
  padding: 14px;
  background: var(--bg-panel) !important;
  max-width: 100%;
  overflow: hidden;
}

.img1 {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.img1 a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 130px; /* Fixed optimal width */
  flex: 0 0 auto;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-neon);
  transition: var(--transition);
  text-align: center;
  background: rgba(0,0,0,0.2);
}

.img1 a:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 16px var(--glow-cyan);
  transform: translateY(-4px) scale(1.02);
}

.img1 img {
  width: 90px;
  height: 90px;
  margin: 12px 0;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  filter: brightness(0.85) contrast(1.1);
  transition: var(--transition);
}

.img1 a:hover img {
  filter: brightness(1.05) contrast(1.15);
  box-shadow: 0 0 15px var(--glow-cyan);
}

.img1 p {
  width: 100%;
  min-height: 46px; /* Balance heights across differing text lengths */
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 6px 4px;
  font-size: 11px; /* Decreased size to prevent crazy wrapping */
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.3;
  text-transform: uppercase;
  color: #ff4500; /* Matching toxic orange */
  background: rgba(10, 5, 2, 0.85);
  border-top: 1px solid #ff4500; /* Toxic neon Orange */
  text-shadow: 0 0 5px rgba(255, 69, 0, 0.5);
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
footer {
  grid-area: footer;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   GLOBAL LINK STYLES
   ═══════════════════════════════════════════════════════════════ */
a:link {
  color: var(--neon-cyan);
  text-decoration: none;
  transition: var(--transition);
}

a:visited {
  color: var(--neon-purple);
}

a:hover {
  color: #fff;
  text-shadow: 0 0 10px var(--glow-cyan);
}

a:active {
  color: var(--neon-pink);
}

p {
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   KEYWORD SECTION (from PHP block)
   ═══════════════════════════════════════════════════════════════ */
.keyword-section {
  background: var(--bg-panel) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid var(--border-neon) !important;
  padding: 24px 20px !important;
  border-radius: var(--main-radius) !important;
  box-shadow: var(--card-shadow) !important;
  margin-top: 12px;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}

.keyword-section h2 {
  font-family: 'Orbitron', monospace !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--neon-cyan) !important;
  text-align: center !important;
  margin-bottom: 16px !important;
  letter-spacing: 3px !important;
  text-transform: uppercase !important;
  text-shadow: 0 0 12px var(--glow-cyan);
}

.keyword-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  justify-content: center !important;
}

.keyword-item {
  background: rgba(57, 255, 20,0.04) !important;
  border: 1px solid rgba(57, 255, 20,0.08) !important;
  padding: 5px 14px !important;
  border-radius: 4px !important;
  transition: var(--transition) !important;
}

.keyword-item a {
  text-decoration: none !important;
  color: var(--text-secondary) !important;
  font-weight: 500 !important;
  font-size: 12px !important;
  font-family: 'Rajdhani', sans-serif !important;
  letter-spacing: 0.5px !important;
  transition: var(--transition) !important;
}

.keyword-item:hover {
  background: rgba(57, 255, 20,0.12) !important;
  border-color: var(--neon-cyan) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 0 12px rgba(57, 255, 20,0.15) !important;
}

.keyword-item:hover a {
  color: #fff !important;
}

.keyword-item:nth-child(even) {
  border-color: rgba(255, 69, 0,0.08) !important;
}

.keyword-item:nth-child(even):hover {
  border-color: var(--neon-purple) !important;
  background: rgba(255, 69, 0,0.12) !important;
  box-shadow: 0 0 12px rgba(255, 69, 0,0.15) !important;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet & Mobile
   ═══════════════════════════════════════════════════════════════ */
@media only screen and (max-width: 960px) {
  body { padding: 10px 6px; }

  .container {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "nav"
      "sidebar"
      "main"
      "content1"
      "forads"
      "content2"
      "content3"
      "footer";
    grid-gap: 8px;
  }

  nav {
    font-size: 1.8rem;
    text-align: center;
    letter-spacing: 3px;
  }

  nav::after {
    position: static;
    display: block;
    font-size: 10px;
    margin-top: 4px;
  }

  #forads {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .img1 {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .img1 a {
    width: calc(33% - 8px);
  }
}

@media (max-width: 768px) {
  .box {
    flex: 1 1 100%;
    height: 120px;
    line-height: 120px;
  }

  .box1 {
    font-size: 13px;
    padding: 8px 10px 8px 34px;
  }

  .box2, .box3 {
    font-size: 13px;
    padding: 10px 12px;
  }

  nav {
    font-size: 1.4rem;
    letter-spacing: 2px;
  }

  .img1 a {
    width: calc(50% - 6px);
  }
}

@media (max-width: 480px) {
  .img1 a {
    width: 100%;
  }

  nav {
    font-size: 1.1rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS — Staggered card entrance
   ═══════════════════════════════════════════════════════════════ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

nav        { animation: fadeSlideUp 0.4s ease-out 0.1s both; }
#sidebar   { animation: fadeSlideUp 0.4s ease-out 0.15s both; }
main       { animation: fadeSlideUp 0.4s ease-out 0.2s both; }
#content1  { animation: fadeSlideUp 0.4s ease-out 0.25s both; }
#content2  { animation: fadeSlideUp 0.4s ease-out 0.3s both; }
#forads    { animation: fadeSlideUp 0.4s ease-out 0.35s both; }
#content3  { animation: fadeSlideUp 0.4s ease-out 0.4s both; }