/* 黑客操作系统样式 - HackOS v3.0 */

/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --terminal-bg: #000500;
  --terminal-green: #00FF00;
  --terminal-dim: #003300;
  --terminal-bright: #00FF41;
  --terminal-amber: #FFB000;
  --terminal-red: #FF0000;
  --terminal-cyan: #00FFFF;
  --terminal-purple: #FF00FF;
}

body {
  background: #000;
  overflow: hidden;
  font-family: 'Courier New', 'Consolas', monospace;
}

/* 游戏容器 */
#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #000;
}

/* Canvas样式 */
#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* 启动画面 */
#boot-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--terminal-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#boot-screen.hidden {
  display: none !important;
}

.boot-text {
  color: var(--terminal-green);
  font-size: 14px;
  font-family: 'Courier New', monospace;
  text-align: center;
  line-height: 1.6;
  max-width: 800px;
  padding: 20px;
}

.boot-line {
  margin: 2px 0;
  opacity: 0;
  animation: fadeIn 0.1s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* 主菜单 - 终端风格 */
#main-menu {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--terminal-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

#main-menu.hidden {
  display: none !important;
}

.hackos-title {
  color: var(--terminal-green);
  font-family: 'Courier New', monospace;
  font-size: 48px;
  font-weight: bold;
  letter-spacing: 10px;
  text-shadow: 
    0 0 10px var(--terminal-green),
    0 0 20px var(--terminal-green),
    0 0 40px var(--terminal-green);
  margin-bottom: 10px;
  animation: glitch 2s infinite;
}

@keyframes glitch {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
}

.hackos-subtitle {
  color: var(--terminal-dim);
  font-family: 'Courier New', monospace;
  font-size: 14px;
  letter-spacing: 5px;
  margin-bottom: 50px;
}

.hackos-subtitle::before {
  content: '[ ';
  color: var(--terminal-green);
}

.hackos-subtitle::after {
  content: ' ]';
  color: var(--terminal-green);
}

/* 终端风格菜单 */
.terminal-menu {
  border: 2px solid var(--terminal-green);
  background: rgba(0, 20, 0, 0.9);
  padding: 30px 50px;
  min-width: 400px;
}

.terminal-header {
  color: var(--terminal-green);
  font-size: 12px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--terminal-dim);
}

.menu-option {
  color: var(--terminal-green);
  font-family: 'Courier New', monospace;
  font-size: 16px;
  padding: 10px 0;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  padding-left: 30px;
}

.menu-option::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--terminal-dim);
}

.menu-option:hover {
  color: var(--terminal-bright);
  text-shadow: 0 0 10px var(--terminal-green);
  padding-left: 40px;
}

.menu-option:hover::before {
  color: var(--terminal-green);
  content: '>>';
}

/* 终端输入 */
.terminal-input {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--terminal-dim);
}

.input-line {
  color: var(--terminal-green);
  font-family: 'Courier New', monospace;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.prompt {
  color: var(--terminal-amber);
  margin-right: 10px;
}

.cursor {
  display: inline-block;
  width: 10px;
  height: 18px;
  background: var(--terminal-green);
  animation: blink 1s infinite;
}

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

/* 系统信息 */
.sys-info {
  position: absolute;
  bottom: 20px;
  left: 20px;
  color: var(--terminal-dim);
  font-size: 11px;
  font-family: 'Courier New', monospace;
}

.sys-info span {
  color: var(--terminal-green);
}

/* 扫描线效果 */
#game-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 50;
}

/* CRT屏幕效果 */
#game-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse at center,
    transparent 50%,
    rgba(0, 10, 0, 0.4) 100%
  );
  pointer-events: none;
  z-index: 49;
}

/* 闪烁效果 */
.flicker {
  animation: flicker 0.15s infinite;
}

@keyframes flicker {
  0% { opacity: 0.9; }
  50% { opacity: 1; }
  100% { opacity: 0.9; }
}

/* 加载画面 */
#loading-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--terminal-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 200;
}

#loading-screen.hidden {
  display: none !important;
}

.loading-text {
  color: var(--terminal-green);
  font-family: 'Courier New', monospace;
  font-size: 18px;
  letter-spacing: 5px;
  margin-bottom: 20px;
}

.loading-bar {
  width: 300px;
  height: 20px;
  border: 1px solid var(--terminal-green);
  padding: 2px;
}

.loading-progress {
  height: 100%;
  background: var(--terminal-green);
  width: 0%;
  transition: width 0.1s;
  box-shadow: 0 0 10px var(--terminal-green);
}

/* 暂停菜单 - 终端风格 */
#pause-menu {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 5, 0, 0.95);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 150;
}

#pause-menu.active {
  display: flex;
}

.pause-title {
  color: var(--terminal-red);
  font-family: 'Courier New', monospace;
  font-size: 36px;
  letter-spacing: 10px;
  margin-bottom: 30px;
  text-shadow: 0 0 20px var(--terminal-red);
}

/* 隐藏原游戏UI */
#explore-hud,
#combat-hud,
#dialogue-container,
#choiceContainer,
#chapter-title,
.cinematic-bars {
  display: none !important;
}

/* 按钮样式 */
button {
  background: transparent;
  border: 1px solid var(--terminal-green);
  color: var(--terminal-green);
  font-family: 'Courier New', monospace;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 2px;
}

button:hover {
  background: var(--terminal-green);
  color: #000;
  box-shadow: 0 0 20px var(--terminal-green);
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--terminal-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--terminal-dim);
  border: 1px solid var(--terminal-green);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--terminal-green);
}

/* 响应式 */
@media (max-width: 768px) {
  .hackos-title {
    font-size: 32px;
    letter-spacing: 5px;
  }
  
  .terminal-menu {
    min-width: 300px;
    padding: 20px 30px;
  }
}
