:root {
  --bg: #0a0a0a;
  --fg: #ededed;
  --brand: #1a8f3b;
  --muted: #a1a1a1;
  --card: #121212;
  --border: #262626;
}

* { box-sizing: border-box; }
html, body { 
  margin: 0; 
  padding: 0; 
  background: linear-gradient(180deg, #0a0a0a 0%, #0d1a0d 50%, #1a2d1a 100%);
  background-attachment: fixed;
  color: var(--fg); 
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; 
  min-height: 100vh;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

.site-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--border); position: sticky; top: 0; backdrop-filter: blur(6px); background: rgba(10,10,10,0.6); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 600; }
.brand img { display: block; border-radius: 999px; }
.nav a { margin-left: 16px; color: var(--fg); opacity: .85; }
.nav a:hover { opacity: 1; }

.hero { text-align: center; padding: 54px 0; }
.hero .hero-logo { width: 96px; height: 96px; border-radius: 999px; display: block; margin: 0 auto 16px; }
.hero h1 { font-size: 36px; line-height: 1.2; margin: 6px 0 6px; }
.hero p { color: var(--muted); margin: 0 0 16px; }
.cta-row { display: inline-flex; gap: 12px; }
.btn { display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border); color: var(--fg); background: transparent; cursor: pointer; transition: background-color .2s ease, border-color .2s ease, filter .2s ease, transform .05s ease; text-align: center; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn:hover { background: rgba(26, 143, 59, 0.12); border-color: var(--brand); }
.btn-primary:hover { filter: brightness(1.03); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Discord CTA */
.btn-discord { background: #5865F2; border-color: #5865F2; color: #fff; }
.btn-discord:hover { filter: brightness(1.03); }
.btn-lg { padding: 14px 20px; font-size: 18px; border-radius: 12px; }

.cards { padding: 28px 0; }
.cards h2 { margin: 0 0 8px; font-size: 22px; }
.muted { color: var(--muted); }
.list { margin: 0; padding-left: 20px; }

.site-footer { padding: 28px 0; border-top: 1px solid var(--border); color: var(--muted); margin-top: 30px; }

/* Overlay for games */
.hidden { display: none; }
.overlay { 
  position: fixed; 
  inset: 0; 
  z-index: 50; 
  opacity: 0;
  transition: opacity 0.3s ease;
}
.overlay.show {
  opacity: 1;
}
.overlay-backdrop { 
  position: absolute; 
  inset: 0; 
  background: rgba(0,0,0,.7); 
  backdrop-filter: blur(2px); 
}
.overlay-panel { 
  position: relative; 
  margin: 5vh auto; 
  max-width: 1100px; 
  height: 90vh; 
  background: var(--bg); 
  border: 1px solid var(--border); 
  border-radius: 14px; 
  display: flex; 
  flex-direction: column; 
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}
.overlay.show .overlay-panel {
  transform: scale(1) translateY(0);
}
.overlay-header { display:flex; align-items:center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.overlay-header h2 { margin: 0; font-size: 18px; }
.overlay-close { background: transparent; border: 1px solid var(--border); color: var(--fg); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; }
.overlay-content { padding: 16px; overflow: auto; gap: 16px; display: grid; grid-template-columns: 1fr; }

.game-card { display: grid; grid-template-columns: 320px 1fr; gap: 16px; padding: 14px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.game-media { border-radius: 10px; background-image: var(--img); background-size: cover; background-position: center; min-height: 200px; }
.game-body h3 { margin: 0 0 4px; font-size: 20px; }
.game-actions { display: flex; gap: 10px; margin-top: 10px; }
.steam-widget { margin: 12px 0; }
.steam-widget iframe { width: 100%; max-width: 646px; height: 190px; border: 0; border-radius: 8px; overflow: hidden; }

/* Features & gallery */
.features { margin: 12px 0; padding-left: 18px; }
.features li { margin: 4px 0; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.thumb { display:block; padding-top: 62%; border-radius: 8px; background-image: var(--img); background-size: cover; background-position: center; border:1px solid var(--border); cursor: zoom-in; background-color: #111; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 60; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.8); }
.lightbox-figure { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); margin:0; }
.lightbox-figure img { max-width: 92vw; max-height: 86vh; border-radius: 10px; border: 1px solid var(--border); box-shadow: 0 15px 60px rgba(0,0,0,.6); }
.lightbox-close { position: absolute; top: -42px; right: -2px; }

/* News feed */
.news-feed { margin-top: 16px; }
.loading { text-align: center; color: var(--muted); padding: 20px; }
.news-post { 
  background: var(--card); 
  border: 1px solid var(--border); 
  border-radius: 12px; 
  padding: 16px; 
  margin-bottom: 12px; 
  transition: border-color .2s ease;
}
.news-post:hover { border-color: var(--brand); }
.news-post-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 8px; 
  font-size: 14px; 
  color: var(--muted);
}
.news-post-text { 
  line-height: 1.5; 
  margin-bottom: 8px; 
  word-wrap: break-word;
}
.news-post-actions { 
  display: flex; 
  gap: 12px; 
  font-size: 13px; 
  color: var(--muted);
}
.news-post-actions span { display: flex; align-items: center; gap: 4px; }

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

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

.cards { animation: fadeInUp 0.6s ease-out; }
.btn { transition: all 0.2s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(26, 143, 59, 0.3); }

/* Loading states */
.gallery::before {
  content: "Loading screenshots...";
  display: block;
  text-align: center;
  color: var(--muted);
  padding: 20px;
  animation: pulse 1.5s ease-in-out infinite;
}

.gallery:not(:empty)::before {
  display: none;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(26, 143, 59, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(26, 143, 59, 0.4);
}

/* Mobile improvements */
@media (max-width: 800px) {
  .game-card { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 14px; }
  .cta-row { flex-direction: column; width: 100%; }
  .btn-lg { width: 100%; justify-content: center; }
  .newsletter-signup { flex-direction: column; width: 100%; }
  .newsletter-signup input { width: 100%; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .site-header { padding: 12px 0; }
  .cards { padding: 20px 0; }
  .overlay-panel { margin: 2vh auto; height: 96vh; }
  .game-actions { flex-direction: column; }
  .game-actions .btn { width: 100%; justify-content: center; }
}

/* Matrix Easter Egg Styles */
.matrix-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.matrix-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: #0f0;
  overflow: hidden;
}

.matrix-char {
  position: absolute;
  color: #0f0;
  text-shadow: 0 0 5px #0f0;
  animation: matrixFall 2s linear infinite;
}

@keyframes matrixFall {
  0% {
    transform: translateY(-100vh);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

.terminal {
  position: relative;
  width: 80%;
  max-width: 800px;
  height: 70%;
  background: #000;
  border: 2px solid #0f0;
  border-radius: 8px;
  z-index: 1001;
  font-family: 'Courier New', monospace;
  color: #0f0;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #0f0;
  color: #000;
  font-weight: bold;
  border-bottom: 2px solid #0f0;
}

.terminal-close {
  cursor: pointer;
  font-size: 18px;
  padding: 2px 6px;
  border-radius: 3px;
  transition: background 0.2s;
}

.terminal-close:hover {
  background: rgba(0, 0, 0, 0.2);
}

.terminal-content {
  padding: 12px;
  height: calc(100% - 40px);
  overflow-y: auto;
}

.terminal-line {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.prompt {
  color: #0f0;
  margin-right: 8px;
}

.command {
  color: #fff;
  margin-right: 4px;
}

.cursor {
  color: #0f0;
  animation: blink 1s infinite;
}

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

.terminal-output {
  margin-top: 8px;
  line-height: 1.4;
}

.terminal-output .line {
  margin-bottom: 4px;
  color: #0f0;
}

.terminal-output .error {
  color: #f00;
}

.terminal-output .success {
  color: #0f0;
}

.terminal-output .info {
  color: #00f;
}

/* Secret Gallery */
.secret-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
  padding: 16px;
  background: rgba(0, 255, 0, 0.05);
  border: 1px solid #0f0;
  border-radius: 8px;
}

.secret-gallery-item {
  background: #111;
  border: 1px solid #0f0;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  transition: all 0.3s ease;
}

.secret-gallery-item:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.secret-gallery-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 8px;
}

.secret-gallery-item h4 {
  color: #0f0;
  margin: 0 0 4px 0;
  font-size: 14px;
}

.secret-gallery-item p {
  color: #ccc;
  font-size: 12px;
  margin: 0;
}

