/* -------------------------------------------------------------
 * Indie Freaks - Style Sheet
 * ------------------------------------------------------------- */

/* Reset & Base Variables */
:root {
  --bg-color: #0b0a0a;
  --bg-card: #141313;
  --bg-card-hover: #1c1b1b;
  --text-main: #f5f5f7;
  --text-muted: #9e9ea7;
  --primary-blue: #28B9C4;
  --primary-blue-glow: rgba(40, 185, 196, 0.4);
  --accent-red: #E62220;
  --accent-red-glow: rgba(230, 34, 32, 0.4);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(40, 185, 196, 0.3);
  
  /* Platform Colors */
  --color-steam: #171a21;
  --color-playstation: #00439c;
  --color-xbox: #107c10;
  --color-switch: #e60012;
  
  --font-outfit: 'Outfit', sans-serif;
  --font-jp: 'Noto Sans JP', sans-serif;
  
  --header-height: 80px;
  --transition-speed: 0.3s;
  --border-radius: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-jp);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--transition-speed) ease;
}

ul {
  list-style: none;
}

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

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.uppercase {
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.highlight-blue {
  color: var(--primary-blue);
  text-shadow: 0 0 10px rgba(40, 185, 196, 0.2);
}

/* Buttons */
.btn-primary {
  display: inline-block;
  background-color: var(--primary-blue);
  color: #fff;
  padding: 12px 32px;
  border-radius: 30px;
  font-weight: 700;
  border: 1px solid var(--primary-blue);
  cursor: pointer;
  box-shadow: 0 4px 15px var(--primary-blue-glow);
  transition: all var(--transition-speed) ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  background-color: transparent;
  border-color: var(--accent-red);
  color: var(--accent-red);
  box-shadow: 0 6px 20px var(--accent-red-glow);
}

/* Header & Nav */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(11, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
}

.header-container {
  max-width: 1400px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-outfit);
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  color: #fff;
}

.accent-text {
  color: var(--primary-blue);
  text-shadow: 0 0 8px rgba(40, 185, 196, 0.3);
}

.logo-icon {
  display: flex;
  align-items: center;
  color: var(--accent-red);
  filter: drop-shadow(0 0 4px var(--accent-red-glow));
}

.desktop-nav ul {
  display: flex;
  gap: 28px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  padding: 8px 0;
}

.nav-link i {
  font-size: 0.85rem;
  opacity: 0.8;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-blue);
  box-shadow: 0 0 8px var(--primary-blue);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all var(--transition-speed) ease;
}

.action-btn:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.05);
}

/* Hamburger menu */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
}

.mobile-menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: #fff;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background-color: var(--bg-card);
  border-left: 1px solid var(--border-color);
  padding: 100px 24px 24px 24px;
  z-index: 999;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer.active {
  right: 0;
}

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-link {
  font-size: 1.1rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.mobile-link:hover, .mobile-link.active {
  color: #fff;
}

.mobile-link.active {
  color: var(--primary-blue);
  font-weight: 700;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  box-sizing: border-box;
  background-image: url('images/hero_bg_digital_wave.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(11, 10, 10, 0.4) 0%, rgba(11, 10, 10, 0.95) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 900px;
  padding: 0 24px;
  text-align: center;
  z-index: 2;
}

.hero-tagline {
  display: inline-block;
  font-family: var(--font-outfit);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--primary-blue);
  margin-bottom: 24px;
  letter-spacing: 0.2em;
  padding: 6px 16px;
  background: rgba(40, 185, 196, 0.15);
  border: 1px solid rgba(40, 185, 196, 0.3);
  border-radius: 20px;
  animation: pulse 2s infinite;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  color: #fff;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 40px auto;
  font-weight: 400;
}

.hero-scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  color: var(--text-muted);
  font-family: var(--font-outfit);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.hero-scroll-indicator i {
  font-size: 1rem;
  color: var(--accent-red);
  text-shadow: 0 0 8px var(--accent-red-glow);
}

/* bounce animation */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-8px);
  }
  60% {
    transform: translateY(-4px);
  }
}
.bounce {
  animation: bounce 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(40, 185, 196, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(40, 185, 196, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(40, 185, 196, 0);
  }
}

/* Sections Global */
section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  margin-bottom: 64px;
}

.section-tag {
  color: var(--primary-blue);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  display: block;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-outfit);
  font-size: 2.3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Mission Section */
.mission-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.mission-card {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.card-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(40, 185, 196, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.mission-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-hover);
  box-shadow: 0 10px 30px rgba(40, 185, 196, 0.08);
  background-color: var(--bg-card-hover);
}

.mission-card:hover .card-glow {
  opacity: 1;
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background-color: rgba(40, 185, 196, 0.1);
  border: 1px solid rgba(40, 185, 196, 0.2);
  color: var(--primary-blue);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: all 0.4s ease;
}

.mission-card:hover .card-icon {
  background-color: var(--primary-blue);
  color: #fff;
  box-shadow: 0 0 15px var(--primary-blue-glow);
  transform: scale(1.05);
}

.card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.card-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
  flex-grow: 1;
}

.card-bullets {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.card-bullets li {
  font-size: 0.9rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s ease;
}

.card-bullets li i {
  color: var(--primary-blue);
  font-size: 0.95rem;
}

.mission-card:hover .card-bullets li {
  transform: translateX(4px);
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 32px;
  transition: all 0.3s ease;
}

.service-box:hover {
  background-color: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: scale(1.02);
}

.service-icon {
  font-size: 1.8rem;
  color: var(--primary-blue);
  margin-bottom: 20px;
}

.service-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  position: relative;
  padding-left: 14px;
}

.service-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--primary-blue);
}

/* Works Section */
.works-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.work-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.work-banner {
  height: 150px;
  position: relative;
  overflow: hidden;
}

.work-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.work-card:hover .work-banner-img {
  transform: scale(1.08);
}

.work-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.4) 100%);
  z-index: 1;
  pointer-events: none;
}

.work-platforms {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  z-index: 3;
}

.platform {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #fff;
}

.platform.steam { background-color: #1b2838; }
.platform.playstation { background-color: #003087; }
.platform.xbox { background-color: #107c10; }
.platform.switch { background-color: #e60012; }

.work-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.work-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.4;
}

.work-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
  flex-grow: 1;
  align-items: flex-start;
  align-content: flex-start;
}

.tag-badge {
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 4px;
}

.store-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
}

.store-link i {
  font-size: 0.75rem;
}

.store-link:hover {
  color: #fff;
}

.view-all-container {
  margin-top: 24px;
}

/* Partners Section */
.partner-section {
  background-color: rgba(20, 19, 19, 0.5);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.partners-carousel {
  position: relative;
  width: 100%;
  display: flex;
  overflow: hidden;
}

.partner-track {
  display: flex;
  width: max-content;
  animation: scroll 25s linear infinite;
}

.partner-logo {
  flex-shrink: 0;
  width: 220px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.partner-logo img {
  max-height: 44px;
  max-width: 170px;
  object-fit: contain;
  filter: invert(0.85) grayscale(1) opacity(0.6);
  transition: all var(--transition-speed) ease;
}

.partner-logo:hover img {
  filter: none;
  transform: scale(1.05);
}

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

/* Contact Section */
.contact-section {
  position: relative;
  overflow: hidden;
}

.contact-bg-glow {
  position: absolute;
  bottom: -150px;
  right: -150px;
  width: 400px;
  height: 400px;
  background-color: var(--primary-blue);
  opacity: 0.08;
  filter: blur(100px);
  border-radius: 50%;
  pointer-events: none;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
}

.contact-info-cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-email-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px;
  display: flex;
  gap: 20px;
  transition: all 0.3s ease;
}

.contact-email-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background-color: var(--bg-card-hover);
}

.email-icon {
  font-size: 1.5rem;
  color: var(--primary-blue);
  background-color: rgba(40, 185, 196, 0.08);
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.email-details h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.email-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.email-address-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.email-address {
  font-family: var(--font-outfit);
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
}

.copy-email-btn {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-speed) ease;
}

.copy-email-btn:hover {
  background-color: var(--primary-blue);
  border-color: var(--primary-blue);
  color: #fff;
}

.contact-form {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 40px;
}

.contact-form h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group input, .form-group textarea {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 10px rgba(40, 185, 196, 0.1);
}

.btn-submit {
  width: 100%;
  background-color: var(--primary-blue);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px var(--primary-blue-glow);
  transition: all 0.3s ease;
}

.btn-submit:hover {
  box-shadow: 0 6px 20px rgba(40, 185, 196, 0.5);
  transform: translateY(-1px);
}

.form-status {
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
}

.form-status.success {
  color: #107c10;
}

.form-status.error {
  color: var(--accent-red);
}

/* Footer Section */
.main-footer {
  background-color: #050505;
  border-top: 1px solid var(--border-color);
  padding: 80px 0 30px 0;
}

.footer-container {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 64px;
  margin-bottom: 60px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-links a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
}

.social-links a:hover {
  background-color: var(--primary-blue);
  border-color: var(--primary-blue);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--primary-blue-glow);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.footer-nav-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.footer-nav-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav-col a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-nav-col a:hover {
  color: var(--primary-blue);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* -------------------------------------------------------------
 * Responsive Design (Media Queries)
 * ------------------------------------------------------------- */

@media (max-width: 1100px) {
  .works-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .hero-title {
    font-size: 2.3rem;
  }
  
  .mission-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .hero-desc {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-links {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 576px) {
  .works-grid {
    grid-template-columns: 1fr;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-form {
    padding: 24px;
  }
  
  .email-address-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .copy-email-btn {
    width: 100%;
    justify-content: center;
  }
}

/* -------------------------------------------------------------
 * Indie Freaks V2 - Retro Console & CRT Hardware Styles
 * ------------------------------------------------------------- */

/* Body styling as desk */
body.dark-theme.console-off {
  background-color: #040303;
}

body.dark-theme {
  background-color: #080707;
  background-image: radial-gradient(rgba(40, 185, 196, 0.1) 1.5px, transparent 1.5px),
                    radial-gradient(rgba(230, 34, 32, 0.05) 1.5px, transparent 1.5px);
  background-size: 30px 30px;
  background-position: 0 0, 15px 15px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 15px 16px;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Console outer shell */
.console-wrapper {
  width: 100%;
  max-width: 960px;
  height: calc(100vh - 40px);
  max-height: 800px;
  min-height: 520px;
  background: linear-gradient(145deg, #242222 0%, #121111 100%);
  border: 6px solid #000;
  border-radius: 36px;
  box-shadow: 
    0 30px 70px rgba(0, 0, 0, 0.85),
    inset 0 4px 0 rgba(255, 255, 255, 0.08),
    inset 0 -6px 0 rgba(0, 0, 0, 0.6);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  box-sizing: border-box;
}

/* Top bar: switch and volume */
.console-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid #0a0909;
  padding-bottom: 12px;
}

.console-logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.15em;
  color: #484848;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.03);
}

.controls-group {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hardware-toggle-btn {
  background: #1a1919;
  color: #666;
  border: 2px solid #000;
  border-radius: 6px;
  padding: 6px 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.hardware-toggle-btn.audio-on {
  color: var(--primary-blue);
  border-color: var(--primary-blue);
  background: rgba(40, 185, 196, 0.08);
  box-shadow: 0 0 10px rgba(40, 185, 196, 0.2);
}

.power-switch-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.power-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 900;
  color: #4a4a4a;
}

.power-switch-btn {
  width: 48px;
  height: 22px;
  background: #000;
  border: none;
  border-radius: 11px;
  position: relative;
  cursor: pointer;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8);
  padding: 0;
}

.power-switch-btn .switch-nob {
  width: 18px;
  height: 18px;
  background: radial-gradient(circle, #5a5a5a 0%, #333 100%);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left 0.15s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

body.console-on .power-switch-btn .switch-nob {
  left: 28px;
  background: radial-gradient(circle, #ff5b5b 0%, #a11b1b 100%);
  box-shadow: 0 0 4px rgba(255, 91, 91, 0.5);
}

/* Console Bezel and Display */
.console-screen-area {
  background: #121111;
  border-radius: 16px;
  padding: 8px; /* Single clean bevel */
  box-shadow: 
    inset 0 2px 4px rgba(255,255,255,0.05),
    inset 0 -2px 4px rgba(0,0,0,0.6),
    0 4px 10px rgba(0,0,0,0.5);
  border: 4px solid #000;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 240px;
  overflow: hidden;
}

.crt-bezel {
  position: relative;
  background: transparent;
  box-shadow: none;
  border: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* CRT Screen Glass */
.crt-screen {
  position: relative;
  width: 100%;
  flex: 1;
  background: #000;
  overflow: hidden;
  border-radius: 8px;
}

/* Power ON/OFF Animations */
body.console-off .crt-screen {
  animation: crt-off-anim 0.35s cubic-bezier(0.19, 1, 0.22, 1) forwards;
  pointer-events: none;
}

@keyframes crt-off-anim {
  0% {
    transform: scaleY(1) scaleX(1);
    filter: brightness(1) contrast(1);
    opacity: 1;
  }
  35% {
    transform: scaleY(0.01) scaleX(1);
    filter: brightness(6) contrast(2);
    opacity: 0.9;
  }
  100% {
    transform: scaleY(0.01) scaleX(0);
    filter: brightness(15) contrast(5);
    opacity: 0;
    background: #fff;
  }
}

body.console-on .crt-screen {
  animation: crt-on-anim 0.45s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes crt-on-anim {
  0% {
    transform: scaleY(0.01) scaleX(0);
    opacity: 0;
    filter: brightness(15);
  }
  50% {
    transform: scaleY(0.02) scaleX(1);
    opacity: 0.8;
    filter: brightness(4);
  }
  100% {
    transform: scaleY(1) scaleX(1);
    opacity: 1;
    filter: brightness(1);
  }
}

/* CRT Scanlines Filter */
.crt-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.35) 50%);
  background-size: 100% 4px;
  z-index: 10;
  pointer-events: none;
}

body.scanlines-off .crt-scanlines {
  display: none;
}

.crt-flicker {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 16, 16, 0.08);
  opacity: 0.1;
  z-index: 11;
  pointer-events: none;
  animation: crt-screen-flicker 0.15s infinite;
}

@keyframes crt-screen-flicker {
  0% { opacity: 0.1; }
  50% { opacity: 0.07; }
  100% { opacity: 0.12; }
}

/* Barrel bulge vignette */
.crt-screen::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.45) 100%);
  z-index: 12;
  pointer-events: none;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.9);
}

/* Glitch animation layer */
.crt-glitch {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 15;
  pointer-events: none;
  display: none;
}

.crt-glitch.active {
  display: block;
  animation: glitch-anim 0.2s steps(2) 2;
}

@keyframes glitch-anim {
  0% {
    background: rgba(40, 185, 196, 0.15);
    transform: skewX(-5deg) translateY(-2px);
  }
  50% {
    background: rgba(230, 34, 32, 0.15);
    transform: skewX(5deg) translateY(2px);
  }
  100% {
    background: transparent;
    transform: none;
  }
}

/* BIOS Booting Overlay styling */
.bios-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  color: #33ff33;
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  padding: 24px;
  box-sizing: border-box;
  z-index: 50;
  overflow: hidden;
  display: none;
}

body.console-booting .bios-screen {
  display: block;
}

.bios-console {
  height: 100%;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.35;
}

/* Retro Mini-Game Overlay */
.game-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #030803;
  color: #33ff33;
  font-family: 'VT323', monospace;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 40;
}

body.game-mode-active .game-screen {
  display: flex;
}

.game-screen canvas {
  border: 4px solid #33ff33;
  background: #000;
  box-shadow: 0 0 15px rgba(51, 255, 51, 0.2);
}

.game-hud {
  display: flex;
  justify-content: space-between;
  width: 480px;
  margin-top: 12px;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
}

.game-over-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 41;
}

.game-over-screen h3 {
  font-size: 3rem;
  color: var(--accent-red);
  margin-bottom: 10px;
  letter-spacing: 0.1em;
}

.game-over-screen p {
  font-size: 1.6rem;
  margin-bottom: 20px;
}

.retro-btn {
  background: #33ff33;
  color: #000;
  border: none;
  padding: 8px 24px;
  font-family: 'VT323', monospace;
  font-size: 1.4rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 0 #1b8a1b;
  transition: transform 0.1s ease;
}

.retro-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #1b8a1b;
}

/* Scrollable Screen Content Container */
.screen-scrollable-content {
  width: 100%;
  height: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  position: relative;
  scroll-behavior: smooth;
  box-sizing: border-box;
}

body.console-off .screen-scrollable-content,
body.console-booting .screen-scrollable-content {
  display: none;
}

/* Scrollbar styles for CRT screen */
.screen-scrollable-content::-webkit-scrollbar {
  width: 8px;
}

.screen-scrollable-content::-webkit-scrollbar-track {
  background: #070707;
}

.screen-scrollable-content::-webkit-scrollbar-thumb {
  background: #2a2828;
  border-radius: 4px;
}

.screen-scrollable-content::-webkit-scrollbar-thumb:hover {
  background: var(--primary-blue);
}



/* Hardware Controls Layout */
.console-controls-area {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  margin-top: 4px;
}

/* D-pad styling */
.dpad-container {
  width: 104px;
  height: 104px;
  position: relative;
}

.dpad-axis {
  background: #161515;
  border: 3px solid #000;
  border-radius: 6px;
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: absolute;
}

.dpad-axis.horizontal {
  width: 104px;
  height: 34px;
  top: 35px;
  left: 0;
}

.dpad-axis.vertical {
  width: 34px;
  height: 104px;
  top: 0;
  left: 35px;
}

.dpad-btn {
  position: absolute;
  background: transparent;
  border: none;
  color: #3f3e3e;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 2;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.1s ease;
}

.dpad-btn:hover {
  color: #666;
}

.dpad-btn:active, .dpad-btn.pressed {
  color: var(--primary-blue);
  text-shadow: 0 0 5px rgba(40, 185, 196, 0.6);
}

.dpad-btn.up { top: 0; left: 35px; width: 34px; height: 35px; }
.dpad-btn.right { top: 35px; right: 0; width: 35px; height: 34px; }
.dpad-btn.down { bottom: 0; left: 35px; width: 34px; height: 35px; }
.dpad-btn.left { top: 35px; left: 0; width: 35px; height: 34px; }

.dpad-center {
  width: 20px;
  height: 20px;
  background: #161515;
  border-radius: 50%;
  position: absolute;
  top: 42px;
  left: 42px;
  z-index: 3;
  pointer-events: none;
}

/* Select & Start buttons */
.system-buttons-container {
  display: flex;
  gap: 24px;
  /* Visuals made smart and flat (not tilted) */
}

.system-btn-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.sys-btn {
  width: 44px;
  height: 14px;
  background: linear-gradient(to bottom, #4a4a4a 0%, #2b2a2a 100%);
  border: 2px solid #000;
  border-radius: 7px;
  cursor: pointer;
  box-shadow: 
    0 3px 0 #050505,
    0 4px 6px rgba(0, 0, 0, 0.4);
  transition: all 0.1s ease;
  padding: 0;
}

.sys-btn:active {
  transform: translateY(2px);
  box-shadow: 
    0 1px 0 #050505,
    0 2px 4px rgba(0, 0, 0, 0.4);
}

.sys-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  color: #555;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* Action A/B Buttons */
.action-buttons-container {
  display: flex;
  gap: 16px;
}

.action-btn-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.action-btn-retro {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid #000;
  cursor: pointer;
  box-shadow: 
    0 4px 0 #070707,
    0 5px 8px rgba(0, 0, 0, 0.5);
  transition: all 0.1s ease;
  padding: 0;
}

.action-btn-retro.a-btn {
  background: radial-gradient(circle, #28B9C4 0%, #177077 100%);
}

.action-btn-retro.b-btn {
  background: radial-gradient(circle, #E62220 0%, #9e1412 100%);
}

.action-btn-retro:active, .action-btn-retro.pressed {
  transform: translateY(3px);
  box-shadow: 
    0 1px 0 #070707,
    0 2px 4px rgba(0, 0, 0, 0.5);
}

.action-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  color: #555;
}

/* Speaker Grill and generational tag */
.console-bottom-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 3px solid #0a0909;
  padding-top: 12px;
  margin-top: 4px;
}

.speaker-grill {
  display: flex;
  gap: 4px;
}

.speaker-grill span {
  width: 4px;
  height: 14px;
  background: #000;
  border-radius: 2px;
  opacity: 0.6;
}

.system-tag {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  color: #403f3f;
}

/* Desktop screen viewport helper */
.screen-viewport {
  width: 100%;
  height: 100%;
}

/* -------------------------------------------------------------
 * V2 Responsive Screen Adjustments
 * ------------------------------------------------------------- */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  .console-wrapper {
    padding: 12px 14px;
    border-radius: 24px;
    border-width: 4px;
    gap: 12px;
  }
  
  .crt-screen {
    height: 380px;
  }
  
  .game-hud {
    width: 100%;
    font-size: 1.1rem;
  }
  
  .game-screen canvas {
    width: 95%;
    height: auto;
  }
  
  .console-controls-area {
    padding: 4px 0;
    gap: 15px;
    justify-content: space-around;
  }
  
  .dpad-container {
    width: 80px;
    height: 80px;
  }
  
  .dpad-axis.horizontal { width: 80px; height: 26px; top: 27px; }
  .dpad-axis.vertical { width: 26px; height: 80px; left: 27px; }
  .dpad-btn.up { top: 0; left: 27px; width: 26px; height: 27px; }
  .dpad-btn.right { top: 27px; right: 0; width: 27px; height: 26px; }
  .dpad-btn.down { bottom: 0; left: 27px; width: 26px; height: 27px; }
  .dpad-btn.left { top: 27px; left: 0; width: 27px; height: 26px; }
  .dpad-center { width: 16px; height: 16px; top: 32px; left: 32px; }
  
  .system-buttons-container {
    gap: 12px;
  }
  
  .sys-btn {
    width: 36px;
    height: 11px;
  }
  
  .action-buttons-container {
    gap: 10px;
  }
  
  .action-btn-retro {
    width: 36px;
    height: 36px;
  }
}

/* --- V2 Collapsible Games Archive --- */
.collapsible-archive-container {
  margin-top: 30px;
  margin-bottom: 24px;
}

.archive-toggle-btn {
  width: 100%;
  padding: 14px 18px;
  background: linear-gradient(to bottom, #2b2a2a 0%, #151515 100%);
  border: 3px solid #000;
  border-radius: 10px;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  box-shadow: 
    0 4px 0 #050505,
    0 6px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.archive-toggle-btn:hover {
  border-color: var(--primary-blue);
  box-shadow: 
    0 4px 0 #050505,
    0 0 10px rgba(40, 185, 196, 0.2);
}

.archive-toggle-btn:active {
  transform: translateY(3px);
  box-shadow: 
    0 1px 0 #050505,
    0 3px 6px rgba(0, 0, 0, 0.4);
}

.archive-toggle-btn .icon {
  color: var(--primary-blue);
  margin-right: 10px;
  font-size: 1.1rem;
}

.archive-toggle-btn .text {
  flex-grow: 1;
  text-align: left;
}

.archive-toggle-btn .indicator {
  transition: transform 0.3s ease;
}

.archive-toggle-btn.active .indicator {
  transform: rotate(180deg);
}

.archive-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.archive-content.active {
  margin-top: 24px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: rgba(0, 0, 0, 0.2);
  padding: 24px 12px;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4);
}

.archive-filters {
  display: flex;
  gap: 10px;
}

.archive-search-input {
  flex: 1;
  background: #111;
  border: 2px solid #33ff33;
  color: #33ff33;
  font-family: 'VT323', monospace;
  font-size: 1.25rem;
  padding: 6px 12px;
  border-radius: 6px;
  outline: none;
  box-shadow: inset 0 0 5px rgba(51, 255, 51, 0.1);
}

.archive-search-input::placeholder {
  color: rgba(51, 255, 51, 0.4);
}

.archive-select-filter {
  background: #111;
  border: 2px solid #33ff33;
  color: #33ff33;
  font-family: 'VT323', monospace;
  font-size: 1.25rem;
  padding: 6px 10px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
}

.archive-select-filter option {
  background: #111;
  color: #33ff33;
}

.archive-table-wrapper {
  max-height: 340px;
  overflow-y: auto;
  border: 2px solid #1a1a1a;
  border-radius: 6px;
}

.archive-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  color: #bbb;
  text-align: left;
}

.archive-table th {
  background: #151515;
  color: var(--primary-blue);
  padding: 10px 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 2px solid #33ff33;
}

.archive-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #1a1a1a;
  vertical-align: middle;
}

.archive-table tr:hover td {
  color: #fff;
  background: #111;
}

.archive-table tr.hidden {
  display: none !important;
}

.table-badge {
  display: inline-block;
  font-size: 0.9rem;
  background: rgba(40, 185, 196, 0.1);
  color: var(--primary-blue);
  border: 1px solid rgba(40, 185, 196, 0.25);
  padding: 1px 5px;
  border-radius: 3px;
  margin-right: 4px;
  margin-bottom: 4px;
}

.steam-icon {
  color: #1b2838;
  background: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 0.85rem;
  margin-right: 6px;
}

.switch-icon {
  color: #e60012;
  margin-right: 6px;
}

.table-btn {
  background: #111;
  border: 1px solid var(--primary-blue);
  color: var(--primary-blue);
  width: 26px;
  height: 26px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.table-btn:hover {
  background: var(--primary-blue);
  color: #000;
  box-shadow: 0 0 8px rgba(40, 185, 196, 0.5);
}

.col-title { width: 42%; }
.col-year { width: 10%; }
.col-services { width: 43%; }
.col-link { width: 5%; text-align: center; }

/* Custom scrollbar for table wrapper */
.archive-table-wrapper::-webkit-scrollbar {
  width: 6px;
}
.archive-table-wrapper::-webkit-scrollbar-track {
  background: #090909;
}
.archive-table-wrapper::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}
.archive-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--primary-blue);
}

@media (max-width: 600px) {
  .archive-table {
    font-size: 1.1rem;
  }
  .archive-table th:nth-child(3),
  .archive-table td:nth-child(3) {
    display: none; /* Hide service column on small screens to fit title and link */
  }
  .archive-filters {
    flex-direction: column;
    gap: 8px;
  }
}

