/* styles.css */
/* Base Styles */
:root {
  --primary: #00f0ff;
  --primary-dark: #00a0b0;
  --secondary: #ff00aa;
  --secondary-dark: #b00070;
  --bg-dark: #0a0a12;
  --bg-darker: #050508;
  --bg-light: #1a1a2a;
  --bg-lighter: #2a2a3a;
  --text-primary: #e0e0ff;
  --text-secondary: #a0a0ff;
  --accent-red: #ff0044;
  --accent-green: #00ff88;
  --accent-blue: #0088ff;
  --accent-purple: #aa00ff;
  --glass: rgba(20, 20, 40, 0.85);
  --glass-border: rgba(100, 200, 255, 0.3);
  --glow: 0 0 10px rgba(0, 240, 255, 0.7);
}

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

body {
  font-family: 'JetBrains Mono', monospace;
  background-color: var(--bg-darker);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(0, 80, 120, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(150, 0, 100, 0.15) 0%, transparent 50%);
}

/* Cyber UI Elements */
.cyber-glass {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glow),
              inset 0 0 10px rgba(0, 240, 255, 0.1);
  border-radius: 8px;
}

.cyber-panel {
  background: var(--bg-light);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.panel-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  color: var(--primary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.3);
  padding-bottom: 6px;
}

/* Main Menu */
#main-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  background: radial-gradient(ellipse at center, var(--bg-dark) 0%, var(--bg-darker) 100%);
}

.main-menu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
}

.cyber-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logo-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 4rem;
  font-weight: bold;
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary),
               0 0 20px var(--primary),
               0 0 30px var(--primary);
  letter-spacing: 5px;
  line-height: 1;
}

.logo-subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: var(--text-secondary);
  letter-spacing: 3px;
  margin-top: 10px;
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}

.audio-controls {
  margin-top: 20px;
}

/* Cyber Buttons */
.cyber-button {
  position: relative;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(0, 100, 255, 0.2));
  border: 1px solid var(--primary);
  color: var(--text-primary);
  padding: 15px 30px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s;
  text-align: center;
  border-radius: 4px;
}

.cyber-button:hover {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.4), rgba(0, 100, 255, 0.4));
  box-shadow: 0 0 15px var(--primary),
              0 0 25px rgba(0, 240, 255, 0.4);
  transform: translateY(-2px);
}

.cyber-button::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 1px solid var(--primary);
  opacity: 0;
  transition: opacity 0.3s;
}

.cyber-button:hover::before {
  opacity: 0.3;
}

.cyber-button.small {
  padding: 10px 20px;
  font-size: 0.8rem;
}

.cyber-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cyber-button.disabled:hover {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(0, 100, 255, 0.2));
  box-shadow: none;
  transform: none;
}

.glow-text {
  text-shadow: 0 0 5px currentColor;
}

/* Game UI Layout */
#game-ui {
  width: 100%;
  height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Header */
.cyber-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--glass-border);
  z-index: 10;
}

.header-left, .header-right {
  flex: 1;
}

.header-center {
  flex: 2;
}

.cyber-logo-small {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
  text-shadow: 0 0 5px var(--primary);
  letter-spacing: 2px;
}

.cyber-stats {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  padding: 8px 12px;
  background: rgba(10, 20, 30, 0.5);
  border-radius: 4px;
  border: 1px solid rgba(0, 240, 255, 0.2);
}

.stat-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 2px;
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

/* Main Game Layout */
.game-layout {
  display: flex;
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* Desktop Sidebar */
.desktop-sidebar {
  width: 250px;
  display: none;
  flex-direction: column;
  gap: 15px;
  padding: 15px;
  background: var(--bg-dark);
  border-right: 1px solid var(--glass-border);
  overflow-y: auto;
}

/* Game Area Container */
.game-area-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 15px;
  overflow: auto;
}

/* Game Area */
.game-area {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
}

#map-container {
  display: grid;
  grid-gap: 2px;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
  border-radius: 6px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  touch-action: pan-y;
}

.tile {
  width: 100%;
  aspect-ratio: 1/1;
  background: rgba(30, 40, 60, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  position: relative;
  transition: all 0.2s;
  border: 1px solid rgba(100, 200, 255, 0.1);
  border-radius: 3px;
}

.tile:hover {
  background: rgba(50, 70, 100, 0.5);
  transform: scale(1.05);
}

/* Special Tile Styles */
.hider {
  background: radial-gradient(circle, var(--accent-blue), rgba(0, 100, 200, 0.8)) !important;
  box-shadow: 0 0 15px var(--accent-blue);
  z-index: 10;
  animation: pulse 1.5s infinite;
}

.seeker {
  background: radial-gradient(circle, var(--accent-red), rgba(200, 0, 50, 0.8)) !important;
  box-shadow: 0 0 15px var(--accent-red);
  z-index: 5;
  animation: shake 0.5s infinite;
}

.goal {
  background: radial-gradient(circle, var(--accent-green), rgba(0, 200, 100, 0.8)) !important;
  box-shadow: 0 0 15px var(--accent-green);
  z-index: 5;
  animation: glow 2s infinite;
}

.firewall {
  background: rgba(50, 50, 50, 0.8) !important;
  border: 1px solid var(--accent-red) !important;
  cursor: not-allowed;
}

.data-node {
  background: radial-gradient(circle, var(--accent-purple), rgba(100, 0, 200, 0.8)) !important;
  box-shadow: 0 0 15px var(--accent-purple);
  animation: pulse 2s infinite;
}

.teleport {
  background: radial-gradient(circle, var(--secondary), rgba(150, 0, 100, 0.8)) !important;
  box-shadow: 0 0 15px var(--secondary);
  animation: pulse 1s infinite;
}

.portal {
  background: radial-gradient(circle, var(--accent-blue), rgba(0, 100, 200, 0.6)) !important;
  box-shadow: 0 0 15px var(--accent-blue);
  animation: pulse 0.8s infinite;
}

/* Desktop Inventory */
.desktop-inventory {
  width: 250px;
  display: none;
  padding: 15px;
  background: var(--bg-dark);
  border-left: 1px solid var(--glass-border);
  overflow-y: auto;
}

/* Mobile Inventory */
.mobile-inventory {
  width: 100%;
  margin-top: 15px;
  display: block;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 8px;
}

.inventory-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  background: rgba(20, 30, 50, 0.5);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.inventory-item:hover {
  background: rgba(0, 240, 255, 0.1);
  box-shadow: 0 0 8px var(--primary);
}

.inventory-icon {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

/* Tool Buttons */
.cyber-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cyber-tool {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  background: rgba(20, 30, 50, 0.5);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-primary);
}

.cyber-tool:hover {
  background: rgba(0, 240, 255, 0.1);
  box-shadow: 0 0 8px var(--primary);
}

.tool-icon {
  font-size: 1.2rem;
}

.tool-name {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Log Panel */
.cyber-log {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 240, 255, 0.1);
  border-radius: 4px;
  padding: 10px;
  height: 150px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.4;
}

/* Mobile Navigation */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  background: var(--bg-dark);
  border-top: 1px solid var(--glass-border);
  z-index: 100;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
}

.nav-btn:active {
  transform: scale(0.95);
}

.nav-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.nav-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Detection Meter */
.detection-meter {
  position: fixed;
  bottom: 70px;
  left: 15px;
  right: 15px;
  height: 8px;
  background: rgba(255, 0, 68, 0.2);
  border-radius: 4px;
  overflow: hidden;
  z-index: 50;
}

.detection-level {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-red), var(--secondary));
  transition: width 0.3s ease;
}

.detection-label {
  position: absolute;
  top: -20px;
  left: 0;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* Modals */
.cyber-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 1001;
  justify-content: center;
  align-items: center;
}

.modal-content {
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: relative;
}

.modal-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.8rem;
  color: var(--primary);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.modal-message {
  font-size: 1.2rem;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.modal-detail {
  font-size: 1rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 10px;
}

.modal-technical {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  margin: 15px 0;
  line-height: 1.4;
}

.modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.red-glow {
  color: var(--accent-red);
  text-shadow: 0 0 5px var(--accent-red);
}

/* Privacy Tools Market Grid */
#privacy-tools-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  width: 100%;
  margin-bottom: 20px;
}

.upgrade-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
  background: rgba(10, 20, 40, 0.5);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 6px;
}

.upgrade-item strong {
  font-family: 'Orbitron', sans-serif;
  color: var(--primary);
  font-size: 1rem;
}

.upgrade-item span {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 10px;
}

/* Animations */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
  100% { transform: translateX(0); }
}

@keyframes glow {
  0% { box-shadow: 0 0 10px var(--accent-green); }
  50% { box-shadow: 0 0 25px var(--accent-green); }
  100% { box-shadow: 0 0 10px var(--accent-green); }
}

/* Particle Effects */
.particle-effect {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.7;
}

/* Animation for cloaking */
@keyframes cloakPulse {
  0% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(1.1); }
  100% { opacity: 0.7; transform: scale(1); }
}

.cloaking-active {
  animation: cloakPulse 1.5s infinite;
}

/* State classes */
.high-alert {
  box-shadow: 0 0 20px var(--accent-red) !important;
}

.low-profile {
  box-shadow: 0 0 15px var(--accent-green) !important;
}

/* Tooltip enhancements */
.tooltip-inv {
  visibility: hidden;
  width: 150px;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  border: 1px solid var(--glass-border);
  font-size: 0.8rem;
}

.inventory-item:hover .tooltip-inv {
  visibility: visible;
  opacity: 1;
}

/* Settings Modal Styles */
.settings-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 15px 0;
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}

.settings-label {
  font-size: 1rem;
  color: var(--text-primary);
  flex: 1;
}

.settings-status {
  width: 40px;
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  color: var(--primary);
}

/* Switch styles */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  margin: 0 15px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-light);
  transition: .4s;
  border: 1px solid var(--glass-border);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 3px;
  background-color: var(--text-primary);
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 24px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Responsive Design */
@media (min-width: 769px) {
  /* Show desktop sidebar and inventory */
  .desktop-sidebar, .desktop-inventory {
    display: flex;
  }
  
  /* Hide mobile inventory and nav */
  .mobile-inventory, .mobile-nav, .detection-meter {
    display: none;
  }
  
  /* Adjust game area */
  .game-area-container {
    padding: 20px;
  }
  
  #map-container {
    max-width: 500px;
  }
  
  .tile {
    font-size: 24px;
  }
  
  /* Larger inventory items on desktop */
  .inventory-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }
  
  .inventory-icon {
    font-size: 1.8rem;
  }
}

/* Small Mobile Screens */
@media (max-width: 480px) {
  .cyber-logo .logo-text {
    font-size: 2.8rem;
  }
  
  .logo-subtitle {
    font-size: 0.8rem;
  }
  
  .menu-buttons {
    width: 100%;
  }
  
  .stat-value {
    font-size: 1rem;
  }

  .stat-label {
    font-size: 0.6rem;
  }
  
  .tile {
    font-size: 18px;
  }
  
  .inventory-grid {
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  }
  
  .inventory-icon {
    font-size: 1.2rem;
  }
  
  .nav-icon {
    font-size: 1.3rem;
  }
  
  .nav-label {
    font-size: 0.6rem;
  }
}