@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Inter:wght@400;600&display=swap');

:root {
  /* High-Tech Terminal Color Palette */
  --bg-color: #03060a;
  --deep-layer: #09101a;
  --grid-surface: rgba(0, 245, 212, 0.04);
  --grid-line: rgba(0, 245, 212, 0.1);
  --safe-accent: #00f5d4;
  --risk-accent: #f15bb5;
  --text-main: #e2fdff;
  --text-muted: #7b8c9e;
  
  /* Layout constraints */
  --container-width: 1400px;
  --section-spacing: 100px;
  
  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Share Tech Mono', 'Courier New', monospace;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  /* Visual Rule 1: Grid System Background */
  background-image: 
    linear-gradient(var(--grid-surface) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-surface) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center top;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

/* Vignette for deep underground depth progression */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, transparent 0%, rgba(3, 6, 10, 0.8) 100%);
  pointer-events: none;
  z-index: -1;
}

/* Control system scanlines */
body::after {
  content: " ";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%);
  z-index: 9999;
  background-size: 100% 4px;
  pointer-events: none;
  opacity: 0.3;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

ul {
  list-style: none;
}

/* Typography elements */
h1, h2, h3, h4 {
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  text-shadow: 0 0 15px rgba(0, 245, 212, 0.3);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Header / Control Layer */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(3, 6, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--grid-line);
  padding: 20px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-main);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
  text-shadow: 0 0 10px rgba(0, 245, 212, 0.5);
}

.brand::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background-color: var(--safe-accent);
  box-shadow: 0 0 10px var(--safe-accent);
}

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

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 0;
  position: relative;
}

.nav-links a:hover {
  color: var(--safe-accent);
  text-shadow: 0 0 8px rgba(0, 245, 212, 0.5);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0%;
  height: 1px;
  background-color: var(--safe-accent);
  transition: width 0.3s ease;
  box-shadow: 0 0 5px var(--safe-accent);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Buttons (Terminal Interaction) */
.btn-tile {
  display: inline-block;
  padding: 15px 40px;
  background: rgba(0, 245, 212, 0.05);
  color: var(--safe-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
  font-size: 1rem;
  border: 1px solid var(--safe-accent);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 15px rgba(0, 245, 212, 0.1);
}

.btn-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(0, 245, 212, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-tile:hover {
  background: var(--safe-accent);
  color: var(--bg-color);
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.4);
}

.btn-tile:hover::before {
  transform: translateX(100%);
}

.btn-tile:active {
  transform: scale(0.96);
}

.btn-tile.risk-btn {
  background: rgba(241, 91, 181, 0.05);
  border-color: var(--risk-accent);
  color: var(--risk-accent);
  box-shadow: inset 0 0 15px rgba(241, 91, 181, 0.1);
}

.btn-tile.risk-btn::before {
  background: linear-gradient(45deg, transparent, rgba(241, 91, 181, 0.2), transparent);
}

.btn-tile.risk-btn:hover {
  background: var(--risk-accent);
  color: var(--bg-color);
  box-shadow: 0 0 20px rgba(241, 91, 181, 0.4);
}

/* Hero Section */
.hero {
  padding-top: calc(var(--section-spacing) + 80px);
  padding-bottom: var(--section-spacing);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 80vh;
  position: relative;
}

.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 40px auto;
}

/* Game Section (Grid Core Experience) */
.game-section {
  padding: var(--section-spacing) 0;
  background: linear-gradient(180deg, transparent, rgba(9, 16, 26, 0.6), transparent);
}

.game-header {
  text-align: center;
  margin-bottom: 50px;
}

.game-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  background: #000;
  border: 1px solid var(--grid-line);
  padding: 15px;
  border-radius: 2px;
  position: relative;
  /* Inner grid appearance */
  box-shadow: 0 10px 40px rgba(0,0,0,0.8), inset 0 0 30px rgba(0, 245, 212, 0.05);
}

/* Frame wrapper to enforce square geometry feel */
.iframe-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-color);
  border: 1px solid var(--grid-line);
  display: block;
}

.iframe-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Targeting Brackets */
.game-container::before, .game-container::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 25px;
  border: 2px solid var(--safe-accent);
  pointer-events: none;
}

.game-container::before {
  top: -2px;
  left: -2px;
  border-right: none;
  border-bottom: none;
}

.game-container::after {
  bottom: -2px;
  right: -2px;
  border-left: none;
  border-top: none;
}

/* Trust / Feature Section */
.trust-section {
  padding: var(--section-spacing) 0;
}

.grid-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.matrix-tile {
  background: rgba(9, 16, 26, 0.8);
  backdrop-filter: blur(5px);
  border: 1px solid var(--grid-line);
  padding: 40px 30px;
  border-radius: 2px;
  transition: all 0.3s ease;
  position: relative;
}

.matrix-tile:hover {
  background: rgba(9, 16, 26, 0.95);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.matrix-tile.safe-node {
  border-top: 2px solid var(--safe-accent);
}

.matrix-tile.safe-node:hover {
  border-color: var(--safe-accent);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6), 0 0 20px rgba(0, 245, 212, 0.15);
}

.matrix-tile.risk-node {
  border-top: 2px solid var(--risk-accent);
}

.matrix-tile.risk-node:hover {
  border-color: var(--risk-accent);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6), 0 0 20px rgba(241, 91, 181, 0.15);
}

.matrix-tile h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.safe-node h3::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  background: var(--safe-accent);
  box-shadow: 0 0 8px var(--safe-accent);
}

.risk-node h3::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  background: var(--risk-accent);
  box-shadow: 0 0 8px var(--risk-accent);
}

/* Form Styles (Contact) */
.form-grid {
  max-width: 600px;
  margin: 0 auto;
  background: rgba(9, 16, 26, 0.8);
  backdrop-filter: blur(5px);
  padding: 40px;
  border: 1px solid var(--grid-line);
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border-top: 2px solid var(--safe-accent);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.input-tile {
  width: 100%;
  background: rgba(3, 6, 10, 0.8);
  border: 1px solid var(--grid-line);
  padding: 15px;
  color: var(--safe-accent);
  font-family: var(--font-mono);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  border-radius: 2px;
}

.input-tile:focus {
  outline: none;
  border-color: var(--safe-accent);
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.2);
}

textarea.input-tile {
  min-height: 150px;
  resize: vertical;
}

/* Inner Page Content Structure */
.page-header {
  padding-top: calc(var(--section-spacing) + 80px);
  padding-bottom: 40px;
  text-align: center;
}

.content-layer {
  padding-bottom: var(--section-spacing);
}

.content-tile {
  background: rgba(9, 16, 26, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--grid-line);
  padding: 50px;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 2px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.content-tile h2 {
  font-size: 1.5rem;
  margin-top: 30px;
  border-bottom: 1px solid var(--grid-line);
  padding-bottom: 10px;
}

.content-tile p {
  margin-bottom: 15px;
}

.content-tile ul {
  margin-bottom: 20px;
  padding-left: 20px;
}

.content-tile li {
  color: var(--text-muted);
  margin-bottom: 10px;
  position: relative;
}

.content-tile li::before {
  content: '■';
  color: var(--safe-accent);
  position: absolute;
  left: -20px;
  font-size: 0.8rem;
  top: 4px;
  text-shadow: 0 0 5px var(--safe-accent);
}

/* Footer System */
.footer {
  margin-top: auto;
  background: var(--deep-layer);
  border-top: 1px solid var(--grid-line);
  padding: 60px 0 30px 0;
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-column h4 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 20px;
}

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

.footer-column a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-column a:hover {
  color: var(--safe-accent);
  text-shadow: 0 0 8px rgba(0, 245, 212, 0.3);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--grid-line);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  :root {
    --section-spacing: 60px;
  }
  
  .header .container {
    flex-direction: column;
    gap: 15px;
  }
  
  .nav-links {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .hero {
    min-height: 60vh;
  }
  
  .game-container {
    width: 100%;
    padding: 10px;
  }
  
  .content-tile {
    padding: 30px 20px;
  }
}