:root {
  --bg: #0b0b0f;
  --bg2: #12121a;
  --card: #191925;
  --text: #e8e4dc;
  --dim: #6868a0;
  --pink: #ff2d78;
  --cyan: #00ffc8;
  --yellow: #ffd000;
  --purple: #a855f7;
  --border: #2a2a3e;
  --font: 'Press Start 2P', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.9;
  overflow-x: hidden;
  font-size: 10px;
  image-rendering: pixelated;
}

::selection { background: var(--pink); color: #000; }

.crt {
  position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.07) 2px, rgba(0,0,0,0.07) 4px);
}

.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

.section { padding: 80px 0; }

.sec-title {
  font-size: 14px;
  color: var(--pink);
  margin-bottom: 40px;
  letter-spacing: 1px;
}

.sec-footer { text-align: center; margin-top: 40px; }

.btn-pixel {
  display: inline-block;
  font-family: var(--font);
  font-size: 9px;
  color: var(--cyan);
  border: 2px solid var(--cyan);
  padding: 10px 20px;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-pixel:hover {
  background: var(--cyan);
  color: #000;
}

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 14px 0;
  transition: background 0.25s;
}

.nav.scrolled {
  background: rgba(11,11,15,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--border);
}

.nav-inner {
  max-width: 1000px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  font-family: var(--font);
  font-size: 10px;
  color: var(--pink);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  transition: color 0.15s;
}
.nav-logo:hover {
  color: var(--cyan);
}
.nav-logo-arrow {
  font-size: 8px;
  color: var(--dim);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
  display: inline-block;
}
.nav-logo.open .nav-logo-arrow {
  transform: rotate(180deg);
}

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

.nav-links a {
  font-family: var(--font);
  font-size: 8px;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--cyan); }

.nav-toggle { display: none; font-family: var(--font); font-size: 10px; background: none; border: none; color: var(--dim); cursor: pointer; }

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

/* ── Nav Dropdown ── */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 15px);
  left: 0;
  min-width: 280px;
  background: #0d0d14;
  border: 1.5px solid var(--border);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 60px rgba(0,255,200,0.02);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transform-origin: top center;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), opacity 0.25s, visibility 0.25s;
  z-index: 100;
  overflow: hidden;
}
.nav-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -5px; left: 20px;
  width: 8px; height: 8px;
  background: #0d0d14;
  border-left: 1.5px solid var(--border);
  border-top: 1.5px solid var(--border);
  transform: rotate(45deg);
}

.nd-section {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.15s;
  opacity: 0;
  transform: translateX(-6px);
  transition: background 0.15s, opacity 0.3s ease-out, transform 0.3s ease-out;
}
.nav-dropdown.open .nd-section {
  opacity: 1;
  transform: translateX(0);
}
.nav-dropdown.open .nd-section:nth-child(1) { transition-delay: 0.05s; }
.nav-dropdown.open .nd-section:nth-child(3) { transition-delay: 0.1s; }
.nav-dropdown.open .nd-section:nth-child(5) { transition-delay: 0.15s; }
.nav-dropdown.open .nd-section:nth-child(7) { transition-delay: 0.2s; }

.nd-section:hover {
  background: rgba(168,85,247,0.06);
}

.nd-icon {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  color: var(--dim);
  transition: border-color 0.15s;
}
.nd-section:hover .nd-icon {
  border-color: var(--purple);
}
.nd-icon .cd-icon {
  width: 14px;
  height: 14px;
}
.nd-icon .cd-icon::before {
  top: 1.5px; left: 1.5px;
  width: 11px;
  height: 11px;
}
.nd-icon .cd-icon::after {
  top: 5px; left: 5px;
  width: 4px;
  height: 4px;
}

.nd-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.nd-title {
  font-family: var(--font);
  font-size: 8px;
  color: var(--text);
  transition: color 0.15s;
}
.nd-section:hover .nd-title {
  color: var(--cyan);
}
.nd-sub {
  font-family: var(--font);
  font-size: 6px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nd-divider {
  height: 1px;
  background: var(--border);
  margin: 0 14px;
  opacity: 0.5;
}

/* ── Sub-overlay (Settings / Achievements / Rankings) ── */
.sub-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  backdrop-filter: blur(8px);
  transition: opacity 0.3s, visibility 0.3s;
  overflow-y: auto;
}
.sub-overlay.open {
  opacity: 1; visibility: visible;
}

.sub-panel {
  width: 100%;
  max-width: 480px;
  background: #0d0d14;
  border: 2px solid var(--pink);
  box-shadow: 0 0 40px rgba(255,45,120,0.1), 0 0 80px rgba(0,255,200,0.03);
  transform: translateY(-20px) scale(0.95);
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), opacity 0.35s;
  opacity: 0;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.sub-overlay.open .sub-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.sub-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 2px solid var(--border);
  flex-shrink: 0;
}
.sub-title {
  font-family: var(--font);
  font-size: 10px;
  color: var(--pink);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sub-close {
  font-family: var(--font);
  font-size: 11px;
  color: var(--dim);
  background: none;
  border: 1.5px solid var(--border);
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.sub-close:hover {
  color: #000;
  background: var(--cyan);
  border-color: var(--cyan);
}

.sub-body {
  padding: 18px 16px 20px;
  overflow-y: auto;
  flex: 1;
}
.sub-body::-webkit-scrollbar { width: 4px; }
.sub-body::-webkit-scrollbar-track { background: transparent; }
.sub-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Settings */
.sub-settings {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sub-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--border);
}
.sub-setting-label {
  font-family: var(--font);
  font-size: 7px;
  color: var(--dim);
  letter-spacing: 1px;
}
.sub-setting-toggle {
  display: flex;
  gap: 2px;
}
.sub-toggle-opt {
  font-family: var(--font);
  font-size: 7px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  color: var(--dim);
  cursor: pointer;
  transition: all 0.12s;
}
.sub-toggle-opt:hover {
  border-color: var(--purple);
  color: var(--purple);
}
.sub-toggle-opt.active {
  border-color: var(--cyan);
  color: #000;
  background: var(--cyan);
}

.sub-setting-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}
.sub-setting-btn {
  font-family: var(--font);
  font-size: 7px;
  padding: 6px 12px;
  border: 1px solid var(--purple);
  color: var(--purple);
  background: none;
  cursor: pointer;
  transition: all 0.15s;
}
.sub-setting-btn:hover {
  background: var(--purple);
  color: #000;
}
.sub-setting-link {
  font-family: var(--font);
  font-size: 7px;
  padding: 6px 12px;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  text-decoration: none;
  transition: all 0.15s;
  display: inline-block;
}
.sub-setting-link:hover {
  background: var(--cyan);
  color: #000;
}

/* Achievements */
.sub-achieve-header {
  font-family: var(--font);
  font-size: 8px;
  color: var(--cyan);
  text-align: center;
  margin-bottom: 16px;
  padding: 10px;
  border: 1px solid var(--border);
  animation: achieveHeaderPulse 2s ease-in-out infinite;
}
@keyframes achieveHeaderPulse {
  0%, 100% { border-color: var(--border); }
  50% { border-color: var(--cyan); }
}
.sub-achieve-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sub-achieve-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  position: relative;
  overflow: hidden;
}
.sub-achieve-item::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
}
.sub-achieve-item.done {
  border-color: rgba(255,45,120,0.4);
  background: rgba(255,45,120,0.04);
}
.sub-achieve-item.done::before {
  opacity: 1;
  background: linear-gradient(90deg, transparent, rgba(255,45,120,0.06), transparent);
}
.sub-achieve-item.locked {
  opacity: 0.45;
  filter: grayscale(0.3);
}
.sub-achieve-item.locked:hover {
  opacity: 0.6;
  border-color: var(--purple);
}
.sub-achieve-icon-wrap {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  transition: all 0.3s;
  position: relative;
}
.sub-achieve-item.done .sub-achieve-icon-wrap {
  border-color: var(--pink);
  box-shadow: 0 0 12px rgba(255,45,120,0.15), inset 0 0 12px rgba(255,45,120,0.05);
  animation: achieveIconGlow 2s ease-in-out infinite;
}
@keyframes achieveIconGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(255,45,120,0.15), inset 0 0 12px rgba(255,45,120,0.05); }
  50% { box-shadow: 0 0 20px rgba(255,45,120,0.3), inset 0 0 16px rgba(255,45,120,0.08); }
}
.sub-achieve-icon {
  font-size: 16px;
  line-height: 1;
}
.sub-achieve-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.sub-achieve-name {
  font-family: var(--font);
  font-size: 7px;
  color: var(--text);
  letter-spacing: 0.5px;
}
.sub-achieve-item.done .sub-achieve-name {
  color: var(--pink);
  text-shadow: 0 0 8px rgba(255,45,120,0.3);
}
.sub-achieve-desc {
  font-family: var(--font);
  font-size: 6px;
  color: var(--dim);
  line-height: 1.4;
}
.sub-achieve-item.done .sub-achieve-desc {
  color: rgba(200,180,200,0.8);
}
.sub-achieve-item.locked .sub-achieve-desc {
  font-style: italic;
  color: rgba(120,110,120,0.7);
}

/* Unlock Toast Notification */
.unlock-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  opacity: 0;
  transform: translateX(60px) scale(0.9);
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
  max-width: 320px;
}
.unlock-toast.show {
  opacity: 1;
  transform: translateX(0) scale(1);
}
.unlock-toast-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #0d0d14;
  border: 1.5px solid var(--pink);
  box-shadow: 0 0 30px rgba(255,45,120,0.15), 0 4px 20px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}
.unlock-toast-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,45,120,0.06), transparent);
  animation: toastGlide 2.5s ease-in-out infinite;
}
@keyframes toastGlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.unlock-toast-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
  animation: toastIconBounce 2s ease-in-out infinite;
}
@keyframes toastIconBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.unlock-toast-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: relative;
  z-index: 1;
}
.unlock-toast-label {
  font-family: var(--font);
  font-size: 6px;
  color: var(--cyan);
  letter-spacing: 1px;
}
.unlock-toast-name {
  font-family: var(--font);
  font-size: 8px;
  color: var(--pink);
  text-shadow: 0 0 8px rgba(255,45,120,0.3);
}

/* ── Rankings Overlay ── */
.rk-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,0.88);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  backdrop-filter: blur(8px);
  transition: opacity 0.35s, visibility 0.35s;
  overflow-y: auto;
}
.rk-overlay.open { opacity: 1; visibility: visible; }

.rk-panel {
  width: 100%; max-width: 800px;
  background: #0d0d14;
  border: 2px solid var(--pink);
  box-shadow: 0 0 50px rgba(255,45,120,0.08), 0 0 80px rgba(0,255,200,0.02);
  transform: translateY(-24px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), opacity 0.4s;
  opacity: 0;
  max-height: 85vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.rk-overlay.open .rk-panel { transform: translateY(0) scale(1); opacity: 1; }

.rk-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 2px solid var(--border);
  flex-shrink: 0;
}
.rk-title {
  font-family: var(--font); font-size: 14px;
  color: var(--pink); letter-spacing: 1px;
}
.rk-close {
  font-family: var(--font); font-size: 14px;
  color: var(--dim); background: none; border: none;
  cursor: pointer; transition: color 0.15s;
}
.rk-close:hover { color: var(--pink); }

/* ── Tabs ── */
.rk-tabs {
  display: flex; border-bottom: 1px solid var(--border);
  overflow-x: auto; flex-shrink: 0;
  scrollbar-width: none;
}
.rk-tabs::-webkit-scrollbar { display: none; }
.rk-tab {
  flex: 1 1 0; min-width: 0;
  padding: 14px 12px;
  font-family: var(--font); font-size: 11px; font-weight: 600;
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--dim); cursor: pointer;
  letter-spacing: 1px;
  transition: color 0.2s, border-color 0.2s, background 0.15s;
  white-space: nowrap; text-transform: uppercase;
}
.rk-tab:hover { color: var(--text); background: rgba(168,85,247,0.04); }
.rk-tab.active { color: var(--pink); border-bottom-color: var(--pink); }

/* ── Body ── */
.rk-body {
  padding: 20px; overflow-y: auto; flex: 1;
  min-height: 0;
}

.rk-loading {
  text-align: center; padding: 40px 0;
  font-family: var(--font); font-size: 11px;
  color: var(--dim); letter-spacing: 1px;
}

/* ── Score header ── */
.rk-score-header {
  text-align: center; padding: 20px 0 24px;
  font-family: var(--font); font-size: 10px;
  color: var(--dim); letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.rk-score-header strong { color: var(--cyan); font-weight: 700; }

/* ── Item ── */
.rk-item {
  display: flex; align-items: stretch; gap: 0;
  margin-bottom: 6px;
  border: 1px solid rgba(42,42,62,0.5);
  border-radius: 2px;
  background: rgba(255,255,255,0.01);
  opacity: 0; transform: translateX(-10px);
  transition: opacity 0.35s ease-out, transform 0.35s ease-out,
              border-color 0.15s, background 0.15s, box-shadow 0.15s;
  overflow: hidden;
  cursor: pointer;
}
.rk-overlay.open .rk-item { opacity: 1; transform: translateX(0); }
.rk-item:hover {
  border-color: rgba(168,85,247,0.3);
  background: rgba(168,85,247,0.04);
  box-shadow: 0 0 20px rgba(168,85,247,0.04);
}

/* Position badge */
.rk-pos {
  display: flex; align-items: center; justify-content: center;
  width: 42px; flex-shrink: 0;
  font-family: var(--font); font-size: 14px; font-weight: 700;
  color: var(--dim);
  border-right: 1px solid rgba(42,42,62,0.4);
  transition: color 0.2s, background 0.2s;
}
.rk-item:nth-child(2) .rk-pos { color: #ffd700; }
.rk-item:nth-child(3) .rk-pos { color: #c0c0c0; }
.rk-item:nth-child(4) .rk-pos { color: #cd7f32; }

/* Body */
.rk-item-body {
  flex: 1; padding: 12px 16px;
  min-width: 0;
}
.rk-item-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 8px;
}
.rk-item-name {
  font-family: var(--font); font-size: 12px; font-weight: 600;
  color: var(--text); letter-spacing: 0.3px;
  transition: color 0.15s;
}
.rk-item:hover .rk-item-name { color: var(--cyan); }

.rk-item-meta {
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px; flex-wrap: wrap;
}
.rk-item-type {
  display: inline-block;
  font-family: var(--font); font-size: 9px;
  color: var(--dim);
  border: 1px solid rgba(42,42,62,0.6);
  padding: 2px 8px; letter-spacing: 0.3px;
  border-radius: 1px;
}
.rk-item-detail {
  font-family: var(--font); font-size: 9px;
  color: var(--dim); letter-spacing: 0.3px;
}

/* ── Stars ── */
.rk-stars-wrap {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.rk-stars {
  display: flex; gap: 1px;
}
.rk-rating-text {
  font-family: var(--font); font-size: 11px;
  color: var(--pink); letter-spacing: 0.3px;
  font-weight: 500;
  margin-top: 2px;
}
.rk-star {
  font-size: 22px; line-height: 1;
  transition: transform 0.2s, color 0.2s;
}
.rk-star.filled { color: #ffd700; text-shadow: 0 0 6px rgba(255,215,0,0.3); }
.rk-star.empty { color: rgba(42,42,62,0.8); }
.rk-item:hover .rk-star.filled {
  animation: starPulse 0.4s ease-out;
}
@keyframes starPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ── Expandable detail ── */
.rk-detail {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16,1,0.3,1), opacity 0.3s, margin 0.3s;
  opacity: 0;
}
.rk-item.open .rk-detail {
  max-height: 400px; opacity: 1;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid rgba(42,42,62,0.3);
}
.rk-detail-label {
  font-family: var(--font); font-size: 9px;
  font-weight: 700; color: var(--purple);
  letter-spacing: 0.5px; margin-bottom: 3px;
}
.rk-detail-text {
  font-family: var(--font); font-size: 10px;
  color: var(--dim); line-height: 1.7;
  margin-bottom: 6px;
}

/* ── Tetris score format ── */
.rk-score-val {
  font-family: var(--font); font-size: 14px; font-weight: 700;
  color: var(--cyan); letter-spacing: 0.5px;
  flex-shrink: 0;
}
.rk-item:nth-child(2) .rk-score-val { color: #ffd700; }

/* ── Tetris extra stats ── */
.rk-tetris-stats {
  display: flex; gap: 12px; margin-top: 4px;
}
.rk-tetris-stat {
  font-family: var(--font); font-size: 9px;
  color: var(--dim); letter-spacing: 0.3px;
}
.rk-tetris-stat strong { color: var(--text); font-weight: 600; }

/* ── Spotify link ── */
.rk-spotify-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font); font-size: 9px;
  color: #1db954; text-decoration: none;
  border: 1px solid rgba(29,185,84,0.3);
  padding: 4px 10px; letter-spacing: 0.3px;
  transition: all 0.15s; margin-top: 4px;
}
.rk-spotify-link:hover {
  background: rgba(29,185,84,0.1);
  border-color: #1db954;
}

/* ── Favorite episode ── */
.rk-fav-ep {
  font-family: var(--font); font-size: 9px;
  color: var(--pink); letter-spacing: 0.3px;
  margin-top: 2px;
}
.rk-fav-ep strong { font-weight: 700; }

/* ── Expand hint ── */
.rk-expand-hint {
  font-family: var(--font); font-size: 9px;
  color: rgba(42,42,62,0.8);
  flex-shrink: 0; align-self: center;
  padding-right: 10px;
  transition: color 0.15s;
}
.rk-item:hover .rk-expand-hint { color: var(--dim); }

/* ── Empty state ── */
.rk-empty {
  text-align: center; padding: 40px 20px;
  font-family: var(--font); font-size: 11px;
  color: var(--dim); letter-spacing: 0.5px;
}

/* ── Transition delays for staggered entry ── */
/* ── Staggered entry handled by JS ── */

/* ── Responsive ── */
@media (max-width: 480px) {
  .rk-panel { max-width: 100%; border-width: 1.5px; border-radius: 0; }
  .rk-tab { font-size: 9px; padding: 12px 8px; }
  .rk-pos { width: 32px; font-size: 12px; }
  .rk-item-body { padding: 10px 12px; }
  .rk-stars { font-size: 18px; }
  .rk-star { font-size: 18px; }
  .rk-score-val { font-size: 12px; }
}

.cd-icon {
  width: 16px;
  height: 16px;
  background: var(--purple);
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  transition: box-shadow 0.3s;
}
.cd-icon::before {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 12px;
  height: 12px;
  background: var(--card);
}
.cd-icon::after {
  content: '';
  position: absolute;
  top: 6px; left: 6px;
  width: 4px;
  height: 4px;
  background: var(--pink);
}
.cd-icon.cd-spin {
  animation: cdSpin 2s linear infinite;
  box-shadow: 0 0 8px rgba(168,85,247,0.3);
}
.cd-icon.cd-paused {
  animation-play-state: paused;
}

.cd-now-playing {
  color: var(--dim);
  transition: color 0.25s;
}
.cd-now-playing.playing {
  color: var(--cyan);
}

@keyframes cdSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  padding: 100px 20px 60px;
}

.hero-bg { position: absolute; inset: 0; }

.hero-bg video { width: 100%; height: 100%; object-fit: cover; }

.hero-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,11,15,0.6) 0%, rgba(11,11,15,0.85) 50%, rgba(11,11,15,0.95) 100%);
}

.hero-inner { text-align: center; position: relative; z-index: 2; max-width: 600px; }

.hero-foto-wrapper {
  position: relative; width: 140px; height: 140px; margin: 0 auto 24px;
}

.hero-foto-border {
  position: absolute; inset: -6px;
  background: linear-gradient(135deg, var(--pink), var(--purple), var(--cyan));
  clip-path: polygon(0% 15%, 15% 0%, 85% 0%, 100% 15%, 100% 85%, 85% 100%, 15% 100%, 0% 85%);
}

.hero-foto {
  width: 100%; height: 100%; object-fit: cover; position: relative;
  clip-path: polygon(0% 15%, 15% 0%, 85% 0%, 100% 15%, 100% 85%, 85% 100%, 15% 100%, 0% 85%);
  border: 2px solid rgba(255,255,255,0.1);
}

.hero-nome {
  font-family: var(--font);
  font-size: 28px;
  color: var(--pink);
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.hero-sub {
  font-family: var(--font);
  font-size: 8px;
  color: var(--dim);
  margin-bottom: 14px;
  line-height: 2;
}

.hero-frase {
  font-family: var(--font);
  font-size: 7px;
  color: var(--yellow);
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

.hero-idade {
  font-family: var(--font);
  font-size: 8px;
  color: var(--dim);
  margin-bottom: 28px;
}

.hero-redes { display: flex; gap: 18px; justify-content: center; }

.hero-redes a { color: var(--dim); font-size: 18px; transition: all 0.15s; }

.hero-redes a:hover { color: var(--cyan); transform: translateY(-2px); }

/* SOBRE */
.sobre { padding: 80px 0; }

.sobre-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }

.sobre-texto p {
  font-family: var(--font);
  font-size: 8px;
  color: var(--dim);
  margin-bottom: 18px;
  line-height: 2.2;
}

.sobre-texto strong { color: var(--cyan); }

.sobre-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }

.tag {
  font-family: var(--font);
  font-size: 7px;
  color: var(--pink);
  border: 1.5px solid var(--pink);
  padding: 5px 10px;
  background: rgba(255,45,120,0.06);
}

.shiva-card {
  border: 2px solid var(--border);
  overflow: hidden;
}

.shiva-card video { width: 100%; display: block; }

.shiva-legenda { padding: 14px 16px; text-align: center; }

.shiva-legenda h3 {
  font-family: var(--font);
  font-size: 9px;
  color: var(--yellow);
  margin-bottom: 6px;
}

.shiva-legenda p {
  font-family: var(--font);
  font-size: 6px;
  color: var(--dim);
  line-height: 1.8;
}

.shiva-chat {
  margin-top: 16px;
  border: 2px solid var(--border);
  padding: 10px;
  background: rgba(255,255,255,0.02);
}
.shiva-chat-box {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
  padding-right: 4px;
}
.shiva-chat-box::-webkit-scrollbar { width: 4px; }
.shiva-chat-box::-webkit-scrollbar-track { background: transparent; }
.shiva-chat-box::-webkit-scrollbar-thumb { background: var(--border); }
.shiva-msg {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  animation: shivaFadeIn 0.3s ease-out;
}
@keyframes shivaFadeIn {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}
.shiva-msg.user {
  flex-direction: row-reverse;
}
.shiva-paw {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
  margin-top: 4px;
}
.shiva-bubble {
  font-family: var(--font);
  font-size: 7px;
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 8px 10px;
  max-width: 85%;
  word-wrap: break-word;
  line-height: 1.7;
}
.shiva-msg.user .shiva-bubble {
  color: var(--dim);
  border-color: var(--border);
  background: rgba(255,255,255,0.03);
}
.shiva-msg.shiva-welcome .shiva-bubble {
  color: var(--pink);
  border-color: var(--pink);
}
.shiva-input-row {
  display: flex;
  gap: 6px;
}
.shiva-input {
  flex: 1;
  font-family: var(--font);
  font-size: 7px;
  color: var(--text);
  background: rgba(255,255,255,0.03);
  border: 1.5px solid var(--border);
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.15s;
}
.shiva-input:focus {
  border-color: var(--cyan);
}
.shiva-input::placeholder {
  color: var(--dim);
  opacity: 0.5;
}
.shiva-send {
  font-family: var(--font);
  font-size: 7px;
  color: #000;
  background: var(--cyan);
  border: none;
  padding: 0 12px;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.shiva-send:hover {
  opacity: 0.8;
}
.shiva-typing {
  display: none;
  align-items: flex-start;
  gap: 6px;
  animation: shivaFadeIn 0.2s ease-out;
}
.shiva-typing-bubble {
  color: var(--dim);
  border-color: var(--border);
  background: rgba(255,255,255,0.02);
  animation: shivaTypingPulse 1s ease-in-out infinite;
}
@keyframes shivaTypingPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
.shiva-clear {
  font-family: var(--font);
  font-size: 10px;
  color: var(--dim);
  background: none;
  border: 1.5px solid var(--border);
  padding: 0 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.shiva-clear:hover {
  border-color: var(--pink);
  color: var(--pink);
}

/* SKILLS */
.skills { background: var(--bg2); padding: 80px 0; }

.skills-wrapper {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.skills-lista { flex: 1; display: flex; flex-direction: column; gap: 28px; max-width: 600px; }

/* NES Controller */
.skills-controller {
  flex-shrink: 0;
  width: 300px;
}
.sobre-texto .skills-controller {
  margin-top: 64px;
}

.ctrl-label {
  font-family: var(--font);
  font-size: 9px;
  color: var(--pink);
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.ctrl-body {
  background: var(--card);
  border: 2px solid var(--purple);
  padding: 16px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* D-pad */
.ctrl-dpad {
  display: grid;
  grid-template-columns: 38px 38px 38px;
  grid-template-rows: 38px 38px 38px;
  gap: 3px;
  flex-shrink: 0;
}

.ctrl-up    { grid-column: 2; grid-row: 1; }
.ctrl-left  { grid-column: 1; grid-row: 2; }
.ctrl-right { grid-column: 3; grid-row: 2; }
.ctrl-down  { grid-column: 2; grid-row: 3; }

.ctrl-btn {
  font-family: var(--font);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.08s;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
}

.ctrl-dpad .ctrl-btn {
  width: 38px;
  height: 38px;
  background: #1a1a2e;
  border: 2px solid #3a3a5e;
  font-size: 16px;
  color: var(--purple);
}

.ctrl-dpad .ctrl-btn:hover {
  background: #22223a;
  border-color: var(--purple);
}

.ctrl-dpad .ctrl-btn.pressed,
.ctrl-dpad .ctrl-btn:active {
  background: var(--pink);
  border-color: var(--pink);
  color: #000;
  transform: translateY(2px);
}

/* Mid section (Select/Start) */
.ctrl-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ctrl-select,
.ctrl-start {
  font-size: 6px;
  padding: 7px 10px;
  letter-spacing: 1px;
  min-width: 44px;
}

.ctrl-select {
  background: var(--pink);
  border: 2px solid #cc0055;
  color: #fff;
}

.ctrl-start {
  background: var(--cyan);
  border: 2px solid #009977;
  color: #000;
}

.ctrl-select.pressed,
.ctrl-select:active {
  background: #cc0055;
  transform: translateY(2px);
}

.ctrl-start.pressed,
.ctrl-start:active {
  background: #009977;
  transform: translateY(2px);
}

/* A/B buttons */
.ctrl-ab {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.ctrl-a,
.ctrl-b {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 17px;
  font-weight: bold;
}

.ctrl-b {
  background: var(--yellow);
  border: 2px solid #b89600;
  color: #000;
}

.ctrl-b.pressed,
.ctrl-b:active {
  background: #b89600;
  transform: translateY(2px);
}

.ctrl-a {
  background: var(--yellow);
  border: 2px solid #b89600;
  color: #000;
}

.ctrl-a.pressed,
.ctrl-a:active {
  background: #b89600;
  transform: translateY(2px);
}

/* ── Skill Overlay ── */
.skill-overlay {
  position: fixed; inset: 0; z-index: 9997;
  background: rgba(0,0,0,0.88);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  backdrop-filter: blur(8px);
  transition: opacity 0.35s, visibility 0.35s;
  overflow-y: auto;
}
.skill-overlay.open {
  opacity: 1; visibility: visible;
}

.skill-overlay::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(255,45,120,0.015) 40px, rgba(255,45,120,0.015) 41px),
    repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(0,255,200,0.012) 40px, rgba(0,255,200,0.012) 41px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease-out;
}
.skill-overlay.open::before { opacity: 1; }

.skill-panel {
  width: 100%;
  max-width: 520px;
  background: #0d0d14;
  border: 2px solid var(--pink);
  box-shadow: 0 0 50px rgba(255,45,120,0.12), 0 0 100px rgba(0,255,200,0.03), inset 0 0 80px rgba(0,0,0,0.3);
  transform: translateY(-30px) scale(0.92);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), opacity 0.4s;
  opacity: 0;
  position: relative;
  overflow: hidden;
}
.skill-overlay.open .skill-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.skill-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 2px solid var(--border);
  background: rgba(255,255,255,0.015);
}
.skill-title {
  font-family: var(--font);
  font-size: 10px;
  color: var(--pink);
  letter-spacing: 1px;
}
.skill-close {
  font-family: var(--font);
  font-size: 11px;
  color: var(--dim);
  background: none;
  border: 1.5px solid var(--border);
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
}
.skill-close::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--cyan);
  transform: translateY(100%);
  transition: transform 0.2s;
  z-index: 0;
}
.skill-close:hover { border-color: var(--cyan); color: #000; }
.skill-close:hover::before { transform: translateY(0); }
.skill-close span { position: relative; z-index: 1; }

.skill-body {
  padding: 28px 24px 32px;
}

.skill-top {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.skill-icon-wrap {
  width: 60px;
  height: 60px;
  border: 2px solid var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  background: rgba(168,85,247,0.06);
}
.skill-icon {
  font-family: var(--font);
  font-size: 22px;
  color: var(--purple);
}

.skill-heading { flex: 1; }

.skill-category {
  font-family: var(--font);
  font-size: 7px;
  color: var(--dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}

.skill-name {
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.skill-desc {
  font-family: var(--font);
  font-size: 8px;
  color: var(--dim);
  line-height: 1.9;
  margin-bottom: 28px;
  padding: 14px 16px;
  border-left: 2px solid var(--purple);
  background: rgba(168,85,247,0.04);
}

.skill-level-wrap {
  padding: 16px 0 0;
  border-top: 1px solid var(--border);
}

.skill-level-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.skill-level-title {
  font-family: var(--font);
  font-size: 7px;
  color: var(--dim);
  letter-spacing: 2px;
}

.skill-level-pct {
  font-family: var(--font);
  font-size: 14px;
  color: var(--cyan);
}

.skill-bar-track {
  position: relative;
  height: 14px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid var(--border);
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  transition: width 1s cubic-bezier(0.16,1,0.3,1);
  position: relative;
}

.skill-bar-glow {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: translateX(-100%);
  pointer-events: none;
}
.skill-overlay.open .skill-bar-glow {
  animation: skillGlow 1.8s ease-in-out 0.8s infinite;
}

@keyframes skillGlow {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

.skill-bar-segments {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  padding: 0 2px;
}

.skill-bar-segments span {
  font-family: var(--font);
  font-size: 6px;
  color: rgba(104,104,160,0.4);
  letter-spacing: 0.5px;
}
.skill-bar-segments span.filled {
  color: var(--dim);
}

.skill-items span {
  cursor: pointer;
}

.skill-body > div {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.skill-overlay.open .skill-body > div:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.skill-overlay.open .skill-body > div:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.skill-overlay.open .skill-body > div:nth-child(3) { transition-delay: 0.35s; opacity: 1; transform: translateY(0); }

@media (max-width: 768px) {
  .skills-wrapper {
    flex-direction: column;
    align-items: center;
  }
  .skills-lista { max-width: 100%; }
  .skills-controller { width: 100%; max-width: 280px; }
}

.skill-bloco h3 {
  font-family: var(--font);
  font-size: 9px;
  color: var(--purple);
  margin-bottom: 12px;
}

.skill-items { display: flex; flex-wrap: wrap; gap: 6px; }

.skill-items span {
  font-family: var(--font);
  font-size: 7px;
  color: var(--dim);
  border: 1.5px solid var(--border);
  padding: 6px 12px;
  transition: all 0.15s;
}

.skill-items span:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* PROJETOS */
.projetos { padding: 80px 0; }

.projetos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

.projeto-card {
  border: 2px solid var(--border);
  padding: 24px;
  transition: all 0.2s;
}

.projeto-card:hover {
  border-color: var(--pink);
  transform: translateY(-3px);
}

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

.projeto-header i { font-size: 20px; color: var(--pink); }

.projeto-lang {
  font-family: var(--font);
  font-size: 6px;
  color: var(--dim);
  border: 1px solid var(--border);
  padding: 3px 8px;
}

.projeto-card h3 {
  font-family: var(--font);
  font-size: 10px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.projeto-tag {
  font-family: var(--font);
  font-size: 5px;
  padding: 2px 6px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 1px;
}

.tag-beta {
  color: #f0c040;
  border: 1px solid #f0c040;
}

.tag-alpha {
  color: #ff6b6b;
  border: 1px solid #ff6b6b;
}

.projeto-card p {
  font-family: var(--font);
  font-size: 7px;
  color: var(--dim);
  margin-bottom: 16px;
  line-height: 1.9;
}

.projeto-card a {
  font-family: var(--font);
  font-size: 7px;
  color: var(--cyan);
  text-decoration: none;
  transition: opacity 0.15s;
}

.projeto-card a:hover { opacity: 0.6; }

/* JOGOS */
.jogos { background: var(--bg2); padding: 80px 0; }

.jogos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

.jogo-card {
  text-decoration: none; color: inherit;
  border: 2px solid var(--border);
  overflow: hidden;
  transition: all 0.2s;
}

.jogo-card:hover {
  border-color: var(--yellow);
  transform: translateY(-3px);
}

.jogo-img {
  aspect-ratio: 16/9; overflow: hidden;
}

.jogo-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }

.jogo-card:hover .jogo-img img { transform: scale(1.06); }

.jogo-info { padding: 14px 16px; }

.jogo-info h3 {
  font-family: var(--font);
  font-size: 9px;
  margin-bottom: 4px;
}

.jogo-info span {
  font-family: var(--font);
  font-size: 6px;
  color: var(--dim);
}

/* GALERIA */
.galeria { padding: 80px 0; }

.galeria-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.galeria-item {
  border: 2px solid var(--border);
  overflow: hidden;
}

.galeria-item video { width: 100%; display: block; }

.galeria-item span {
  display: block;
  font-family: var(--font);
  font-size: 7px;
  color: var(--dim);
  text-align: center;
  padding: 10px;
  border-top: 2px solid var(--border);
}

/* BLOG */
.blog { background: var(--bg2); padding: 80px 0; }

.blog-vazio { text-align: center; padding: 60px 20px; border: 2px dashed var(--border); }

.blog-vazio i { font-size: 28px; color: var(--dim); margin-bottom: 16px; opacity: 0.3; }

.blog-vazio p {
  font-family: var(--font);
  font-size: 7px;
  color: var(--dim);
  line-height: 2.2;
}

/* CONTATO */
.contato { padding: 80px 0; }

.contato-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

.contato-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 20px 12px;
  border: 2px solid var(--border);
  text-decoration: none; color: inherit;
  text-align: center;
  transition: all 0.2s;
}

.contato-card:hover {
  border-color: var(--purple);
  transform: translateY(-3px);
}

.contato-card i { font-size: 20px; color: var(--purple); }

.contato-card span {
  font-family: var(--font);
  font-size: 8px;
}

.contato-card small {
  font-family: var(--font);
  font-size: 6px;
  color: var(--dim);
}

/* FOOTER */
.footer {
  position: relative; overflow: hidden;
  padding: 60px 20px; text-align: center;
}

.footer-bg { position: absolute; inset: 0; }

.footer-bg video { width: 100%; height: 100%; object-fit: cover; }

.footer-overlay { position: absolute; inset: 0; background: rgba(11,11,15,0.75); }

.footer-inner { position: relative; z-index: 2; }

.footer-inner p:first-child {
  font-family: var(--font);
  font-size: 8px;
  color: var(--dim);
  margin-bottom: 20px;
}

.footer-copy {
  font-family: var(--font);
  font-size: 7px;
  color: var(--dim);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(11,11,15,0.95); backdrop-filter: blur(6px);
    flex-direction: column; padding: 16px 20px; gap: 14px;
    border-bottom: 2px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-dropdown { left: -60px; min-width: 240px; }
  .nav-dropdown::before { left: 76px; }

  .hero-nome { font-size: 22px; }
  .sobre-grid { grid-template-columns: 1fr; }
  .contato-grid { grid-template-columns: 1fr 1fr; }

  .projetos-grid { grid-template-columns: 1fr; }
  .jogos-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .hero-nome { font-size: 18px; }
  .jogos-grid { grid-template-columns: 1fr; }
  .contato-grid { grid-template-columns: 1fr; }
  .galeria-grid { grid-template-columns: 1fr; }
}

/* TETRIS */
.tetris-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,0.88);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  backdrop-filter: blur(6px);
  transition: opacity 0.15s, visibility 0.15s;
  overflow-y: auto;
  padding: 10px;
}
.tetris-overlay::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(255,255,255,0.012) 40px, rgba(255,255,255,0.012) 41px),
    repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(255,255,255,0.012) 40px, rgba(255,255,255,0.012) 41px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease-out;
}
.tetris-overlay.tetris-open {
  opacity: 1; visibility: visible;
}
.tetris-overlay.tetris-open::before {
  opacity: 1;
}

.tetris-overlay::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,255,200,0.015) 3px, rgba(0,255,200,0.015) 4px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease-out 0.3s;
}
.tetris-overlay.tetris-open::after {
  opacity: 1;
}

.tetris-frame {
  border: 3px solid var(--pink);
  background: #0a0a0a;
  box-shadow: 0 0 40px rgba(255,45,120,0.15), 0 0 80px rgba(0,255,200,0.05), inset 0 0 60px rgba(0,0,0,0.5);
  transform: scale(0.7) translateY(30px);
  opacity: 0;
  transition: none;
  position: relative;
}
.tetris-frame::before {
  content: '';
  position: absolute; inset: -6px;
  border: 1px solid transparent;
  pointer-events: none;
  z-index: -1;
}
.tetris-open .tetris-frame {
  animation: tetrisBoot 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes tetrisBoot {
  0% {
    transform: scale(0.7) translateY(30px);
    opacity: 0;
    border-color: #00ff41;
    box-shadow: 0 0 60px rgba(0,255,65,0.3), 0 0 120px rgba(0,255,65,0.1), inset 0 0 60px rgba(0,0,0,0.5);
  }
  15% {
    transform: scale(1.04) translateY(0);
    opacity: 1;
    border-color: #00ff41;
    box-shadow: 0 0 80px rgba(0,255,65,0.4), 0 0 160px rgba(0,255,65,0.15), inset 0 0 60px rgba(0,0,0,0.5);
  }
  30% {
    transform: scale(0.97);
    border-color: #a855f7;
    box-shadow: 0 0 60px rgba(168,85,247,0.3), 0 0 120px rgba(168,85,247,0.1), inset 0 0 60px rgba(0,0,0,0.5);
  }
  50% {
    transform: scale(1.02);
    border-color: #00ffc8;
    box-shadow: 0 0 70px rgba(0,255,200,0.3), 0 0 140px rgba(0,255,200,0.1), inset 0 0 60px rgba(0,0,0,0.5);
  }
  70% {
    transform: scale(0.99);
    border-color: #ff2d78;
    box-shadow: 0 0 50px rgba(255,45,120,0.2), 0 0 100px rgba(255,45,120,0.08), inset 0 0 60px rgba(0,0,0,0.5);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    border-color: #ff2d78;
    box-shadow: 0 0 40px rgba(255,45,120,0.15), 0 0 80px rgba(0,255,200,0.05), inset 0 0 60px rgba(0,0,0,0.5);
  }
}

.tetris-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
  background: #0d0d14;
  opacity: 0;
  animation: tetrisFadeIn 0.4s ease-out 0.65s forwards;
}

.tetris-title {
  font-family: var(--font); font-size: 12px; color: var(--pink);
  letter-spacing: 2px;
  position: relative;
}
.tetris-title::before {
  content: '// ';
  color: var(--dim);
}

.tetris-close {
  font-family: var(--font); font-size: 9px;
  background: none; border: 1.5px solid var(--border);
  color: var(--dim); padding: 5px 10px; cursor: pointer;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
}
.tetris-close::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--cyan);
  transform: translateY(100%);
  transition: transform 0.2s;
  z-index: 0;
}
.tetris-close:hover {
  border-color: var(--cyan); color: #000;
}
.tetris-close:hover::before {
  transform: translateY(0);
}
.tetris-close span {
  position: relative; z-index: 1;
}

.tetris-body {
  display: flex; gap: 16px; padding: 16px;
  align-items: flex-start;
  opacity: 0;
  animation: tetrisFadeIn 0.4s ease-out 0.75s forwards;
}

#tBoard {
  border: 2px solid var(--border);
  image-rendering: pixelated;
  display: block;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

.tpanel {
  display: flex; flex-direction: column; gap: 12px;
  min-width: 140px;
}

.tstat {
  border: 2px solid var(--border);
  padding: 10px 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
}
.tstat:hover {
  border-color: var(--cyan);
}
.tstat::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transition: transform 0.3s;
}
.tstat:hover::after {
  transform: scaleX(1);
}

.tlabel {
  display: block;
  font-family: var(--font); font-size: 7px; color: var(--dim);
  margin-bottom: 6px; letter-spacing: 1px;
}

.tval {
  display: block;
  font-family: var(--font); font-size: 14px; color: var(--cyan);
  transition: color 0.3s;
}

.tnext {
  border: 2px solid var(--border);
  padding: 10px;
  text-align: center;
  transition: border-color 0.3s;
}
.tnext:hover {
  border-color: var(--purple);
}

#tNext {
  display: block; margin: 8px auto 0;
  image-rendering: pixelated;
}

.tcontrols {
  display: flex; justify-content: center; gap: 14px;
  padding: 10px 16px;
  border-top: 2px solid var(--border);
  background: #0d0d14;
  flex-wrap: wrap;
  opacity: 0;
  animation: tetrisFadeIn 0.4s ease-out 0.85s forwards;
}

.tcontrols span {
  font-family: var(--font); font-size: 6px; color: var(--dim);
  letter-spacing: 0.5px;
  position: relative;
  padding-left: 10px;
}
.tcontrols span::before {
  content: '>';
  position: absolute; left: 0;
  color: var(--purple);
}

.tetris-controller {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 16px 20px;
  border-top: 2px solid var(--border);
  background: #0d0d14;
  opacity: 0;
  animation: tetrisFadeIn 0.4s ease-out 0.9s forwards;
  width: auto;
  min-width: 0;
}
.tetris-controller .ctrl-body {
  justify-content: center;
}

@keyframes tetrisFadeIn {
  0%   { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

.konami-flash {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  background: #000;
  font-family: var(--font); font-size: 24px;
  letter-spacing: 4px;
  pointer-events: none;
  animation: konamiFlash 0.8s forwards;
}
.konami-flash span {
  display: inline-block;
  color: var(--pink);
  text-shadow: 0 0 20px var(--pink), 0 0 60px rgba(255,45,120,0.3);
  animation: konamiGlitch 0.8s steps(1);
}
@keyframes konamiFlash {
  0%   { opacity: 0; }
  15%  { opacity: 1; background: #0a0a0f; }
  35%  { opacity: 1; background: #000; }
  50%  { opacity: 1; background: #0a0a0f; }
  65%  { opacity: 0.9; background: #000; }
  100% { opacity: 0; }
}
@keyframes konamiGlitch {
  0%   { transform: translate(0); }
  10%  { transform: translate(-3px, 1px); color: #00ffc8; text-shadow: 0 0 20px #00ffc8; }
  20%  { transform: translate(3px, -1px); color: #ff2d78; text-shadow: 0 0 20px #ff2d78; }
  30%  { transform: translate(-2px, 2px); color: #a855f7; text-shadow: 0 0 20px #a855f7; }
  40%  { transform: translate(2px, -2px); color: #00ff41; text-shadow: 0 0 20px #00ff41; }
  50%  { transform: translate(-1px, 0); color: #ffd000; text-shadow: 0 0 20px #ffd000; }
  60%  { transform: translate(0); }
  100% { transform: translate(0); }
}

@media (max-width: 768px) {
  .tetris-body { flex-direction: column; align-items: center; }
  .tpanel { flex-direction: row; flex-wrap: wrap; justify-content: center; min-width: auto; }
  .tstat { flex: 1; min-width: 80px; }
  .tnext { flex: 1; min-width: 120px; }
  #tBoard { width: 280px; height: 560px; }
  .konami-flash { font-size: 16px; }
  .tetris-title { font-size: 10px; }
}

@media (max-width: 480px) {
  #tBoard { width: 240px; height: 480px; }
  .tetris-head { padding: 8px 12px; }
  .tetris-body { padding: 10px; gap: 10px; }
  .tpanel { gap: 8px; }
  .tstat { padding: 8px 10px; }
  .tcontrols span { font-size: 5px; }
  .konami-flash { font-size: 12px; letter-spacing: 2px; }
}

/* Music Library Overlay */
.music-overlay {
  position: fixed; inset: 0; z-index: 9997;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 80px 16px 100px;
  opacity: 0; visibility: hidden;
  backdrop-filter: blur(6px);
  transition: opacity 0.3s, visibility 0.3s;
  overflow-y: auto;
}
.music-overlay.open {
  opacity: 1; visibility: visible;
}

.music-panel {
  width: 100%;
  max-width: 680px;
  border: 2px solid var(--pink);
  background: #0d0d14;
  box-shadow: 0 0 40px rgba(255,45,120,0.1), 0 0 80px rgba(0,255,200,0.03);
  transform: translateY(-20px) scale(0.95);
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), opacity 0.35s;
  opacity: 0;
}
.music-overlay.open .music-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.music-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 2px solid var(--border);
}

.music-title {
  font-family: var(--font);
  font-size: 12px;
  color: var(--pink);
  letter-spacing: 1px;
}

.music-close {
  font-family: var(--font);
  font-size: 12px;
  color: var(--dim);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}
.music-close:hover {
  color: var(--pink);
}

.music-list {
  padding: 8px 0;
  max-height: 65vh;
  overflow-y: auto;
}

.music-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(42,42,62,0.4);
}
.music-item:hover {
  background: rgba(168,85,247,0.08);
}
.music-item:last-child {
  border-bottom: none;
}
.music-item.active {
  background: rgba(255,45,120,0.1);
  border-left: 3px solid var(--pink);
}

.music-item-num {
  font-family: var(--font);
  font-size: 9px;
  color: var(--dim);
  min-width: 28px;
  text-align: right;
}

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

.music-item-title {
  font-family: var(--font);
  font-size: 9px;
  color: var(--text);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-item.active .music-item-title {
  color: var(--pink);
}

.music-item-artist {
  font-family: var(--font);
  font-size: 7px;
  color: var(--dim);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.music-item-duration {
  font-family: var(--font);
  font-size: 8px;
  color: var(--dim);
}

.music-item-play {
  font-size: 12px;
  color: var(--cyan);
  opacity: 0;
  transition: opacity 0.15s;
}
.music-item:hover .music-item-play,
.music-item.active .music-item-play {
  opacity: 1;
}
.music-item.active .music-item-play {
  color: var(--pink);
}

.music-list::-webkit-scrollbar {
  width: 4px;
}
.music-list::-webkit-scrollbar-track {
  background: transparent;
}
.music-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* Player Bar */
.player-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9996;
  background: rgba(11,11,15,0.95);
  border-top: 2px solid var(--border);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  padding: 8px 16px;
  gap: 12px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
}
.player-bar.open {
  transform: translateY(0);
}

.player-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.player-cd-mini {
  width: 20px;
  height: 20px;
  background: var(--purple);
  position: relative;
  flex-shrink: 0;
}
.player-cd-mini::before {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 14px;
  height: 14px;
  background: var(--card);
}
.player-cd-mini::after {
  content: '';
  position: absolute;
  top: 8px; left: 8px;
  width: 4px;
  height: 4px;
  background: var(--pink);
}
.player-cd-mini.spin {
  animation: cdSpin 2s linear infinite;
  box-shadow: 0 0 6px rgba(168,85,247,0.25);
}
.player-cd-mini.paused {
  animation-play-state: paused;
}

.player-info {
  min-width: 0;
}

.player-song-name {
  font-family: var(--font);
  font-size: 7px;
  color: var(--cyan);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist-name {
  font-family: var(--font);
  font-size: 6px;
  color: var(--dim);
  display: block;
  margin-top: 2px;
}

.player-center {
  flex: 2;
  min-width: 120px;
  display: flex;
  align-items: center;
}

.player-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.player-progress {
  flex: 1;
  height: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  border-radius: 0;
  overflow: hidden;
}
.player-progress:hover {
  border-color: var(--purple);
}

.player-progress-fill {
  height: 100%;
  background: var(--pink);
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 0;
}

.player-time {
  font-family: var(--font);
  font-size: 6px;
  color: var(--dim);
  white-space: nowrap;
  min-width: 28px;
}

.player-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.player-btn {
  font-family: var(--font);
  font-size: 12px;
  color: var(--dim);
  background: none;
  border: 1px solid var(--border);
  padding: 6px 8px;
  cursor: pointer;
  transition: all 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.player-btn:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.player-play-btn {
  font-size: 12px;
  padding: 6px 10px;
}
.player-play-btn:hover {
  color: var(--pink);
  border-color: var(--pink);
}

.player-speed-btn {
  font-size: 7px;
  padding: 6px 6px;
  min-width: 30px;
}
.player-speed-btn:hover {
  color: var(--yellow);
  border-color: var(--yellow);
}

.player-volume-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.player-vol-btn {
  font-size: 10px;
  padding: 6px 8px;
}
.player-vol-btn:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.player-volume-slider {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  border: 2px solid var(--purple);
  padding: 10px 14px;
  display: none;
  z-index: 100;
  min-width: 120px;
}
.player-volume-slider.open {
  display: block;
}

.vol-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.vol-label {
  font-family: var(--font);
  font-size: 6px;
  color: var(--purple);
  letter-spacing: 2px;
}
.vol-pct {
  font-family: var(--font);
  font-size: 7px;
  color: var(--cyan);
}

.vol-slider-track {
  padding: 4px 0;
}

#playerVolume {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--dim);
  outline: none;
  cursor: pointer;
  border: 1px solid var(--border);
}
#playerVolume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--purple);
  border: 2px solid var(--cyan);
  cursor: pointer;
  image-rendering: pixelated;
}
#playerVolume::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--purple);
  border: 2px solid var(--cyan);
  cursor: pointer;
}
#playerVolume:focus {
  border-color: var(--cyan);
}

.vol-slider-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}
.vol-icon {
  font-family: var(--font);
  font-size: 8px;
  color: var(--dim);
}

@media (max-width: 600px) {
  .player-bar {
    flex-direction: column;
    padding: 8px 12px;
    gap: 6px;
  }
  .player-left { width: 100%; }
  .player-center { width: 100%; }
  .player-right { width: 100%; justify-content: center; }
  .music-panel { max-width: 100%; }
  .music-title { font-size: 10px; }
  .music-item-title { font-size: 8px; }
  .music-item-artist { font-size: 6px; }
  .music-item-num { font-size: 8px; }
  .music-item-duration { font-size: 7px; }
  .music-item { padding: 12px 16px; gap: 10px; }
  .cd-now-playing { max-width: 80px; font-size: 6px; }
  .skill-panel { max-width: 100%; }
  .skill-body { padding: 20px 16px 24px; }
  .skill-name { font-size: 13px; }
  .skill-desc { font-size: 7px; padding: 12px 14px; }
  .skill-icon-wrap { width: 48px; height: 48px; }
  .skill-icon { font-size: 18px; }
  .skill-top { gap: 14px; }
}

@media (min-width: 1200px) {
  .container { max-width: 1200px; }
  .nav-inner { max-width: 1200px; }

  .nav-links a { font-size: 10px; }
  .nav-logo { font-size: 13px; }
  .nav { padding: 16px 0; }

  .music-panel { max-width: 760px; }
  .music-list { max-height: 70vh; }

  .hero-nome { font-size: 38px; }
  .hero-sub { font-size: 11px; }
  .hero-frase { font-size: 9px; }
  .hero-idade { font-size: 10px; }
  .hero-foto-wrapper { width: 170px; height: 170px; }
  .hero-redes a { font-size: 24px; }
  .hero-redes { gap: 22px; }

  .sec-title { font-size: 18px; margin-bottom: 50px; }
  .section { padding: 100px 0; }

  .sobre-grid { gap: 50px; }
  .sobre-texto p { font-size: 10px; }
  .tag { font-size: 8px; padding: 6px 12px; }

  .shiva-card { max-width: 400px; }
  .shiva-legenda h3 { font-size: 11px; }
  .shiva-legenda p { font-size: 8px; }
  .shiva-bubble { font-size: 8px; }
  .shiva-input { font-size: 8px; }
  .shiva-send { font-size: 8px; padding: 0 16px; }

  .skill-bloco h3 { font-size: 11px; }
  .skill-items span { font-size: 8px; }
  .skills-controller { width: 300px; }
  .ctrl-label { font-size: 9px; }
  .ctrl-dpad { grid-template-columns: 38px 38px 38px; grid-template-rows: 38px 38px 38px; }
  .ctrl-dpad .ctrl-btn { width: 38px; height: 38px; font-size: 16px; }
  .ctrl-a, .ctrl-b { width: 44px; height: 44px; font-size: 18px; }
  .ctrl-select, .ctrl-start { font-size: 6px; padding: 7px 10px; min-width: 44px; }

  .projeto-card h3 { font-size: 12px; }
  .projeto-tag { font-size: 6px; padding: 1px 5px; }
  .projeto-card p { font-size: 8px; }
  .projeto-card { padding: 28px; }
  .projeto-header i { font-size: 24px; }

  .jogo-info h3 { font-size: 11px; }
  .jogo-info span { font-size: 7px; }
  .jogo-info { padding: 16px 20px; }

  .galeria-item span { font-size: 9px; }

  .contato-card i { font-size: 26px; }
  .contato-card span { font-size: 10px; }
  .contato-card small { font-size: 8px; }
  .contato-card { padding: 24px 16px; }
  .contato-grid { gap: 14px; }

  .btn-pixel { font-size: 11px; padding: 12px 24px; }

  .blog-vazio i { font-size: 36px; }
  .blog-vazio p { font-size: 9px; padding: 0 40px; }

  .footer-inner p:first-child { font-size: 10px; }
  .footer-copy { font-size: 9px; }
}

@media (min-width: 1600px) {
  .container { max-width: 1400px; }
  .nav-inner { max-width: 1400px; }

  .nav-links { gap: 28px; }
  .nav-links a { font-size: 11px; }
  .nav-logo { font-size: 15px; }

  .music-panel { max-width: 860px; }
  .music-list { max-height: 72vh; }

  .hero-nome { font-size: 48px; letter-spacing: 4px; }
  .hero-sub { font-size: 12px; }
  .hero-frase { font-size: 10px; }
  .hero-idade { font-size: 11px; }
  .hero-foto-wrapper { width: 200px; height: 200px; }
  .hero-inner { max-width: 700px; }
  .hero-redes a { font-size: 28px; }
  .hero-redes { gap: 26px; }

  .sec-title { font-size: 22px; margin-bottom: 60px; }
  .section { padding: 130px 0; }

  .sobre-texto p { font-size: 11px; }
  .tag { font-size: 9px; padding: 7px 14px; }
  .sobre-grid { gap: 60px; }

  .shiva-card { max-width: 450px; }
  .shiva-legenda h3 { font-size: 13px; }
  .shiva-legenda p { font-size: 9px; }
  .shiva-bubble { font-size: 9px; }
  .shiva-input { font-size: 9px; }
  .shiva-send { font-size: 9px; }
  .shiva-chat-box { max-height: 300px; }

  .skill-bloco h3 { font-size: 13px; }
  .skill-items span { font-size: 9px; padding: 8px 14px; }
  .skills-controller { width: 320px; }
  .ctrl-label { font-size: 9px; }
  .ctrl-dpad { grid-template-columns: 38px 38px 38px; grid-template-rows: 38px 38px 38px; }
  .ctrl-dpad .ctrl-btn { width: 38px; height: 38px; font-size: 16px; }
  .ctrl-a, .ctrl-b { width: 44px; height: 44px; font-size: 18px; }
  .ctrl-select, .ctrl-start { font-size: 7px; padding: 8px 12px; min-width: 46px; }

  .projeto-card h3 { font-size: 14px; }
  .projeto-tag { font-size: 7px; padding: 2px 7px; }
  .projeto-card p { font-size: 9px; }
  .projeto-card { padding: 32px; }
  .projeto-header i { font-size: 28px; }
  .projetos-grid { gap: 24px; }

  .jogo-info h3 { font-size: 12px; }
  .jogo-info span { font-size: 8px; }
  .jogos-grid { gap: 24px; }

  .galeria-item span { font-size: 10px; }
  .galeria-grid { gap: 24px; }

  .contato-card i { font-size: 32px; }
  .contato-card span { font-size: 11px; }
  .contato-card small { font-size: 9px; }
  .contato-card { padding: 30px 20px; }
  .contato-grid { gap: 18px; }

  .btn-pixel { font-size: 13px; padding: 14px 28px; }

  .blog-vazio i { font-size: 40px; }
  .blog-vazio p { font-size: 10px; }
}
