@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Orbitron', sans-serif;
  background: #000;
  color: #fff;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(188, 0, 255, 0.1) 0%, transparent 50%);
}

/* Screens */
.screen {
  display: none;
  min-height: 100vh;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.screen.active {
  display: flex;
}

/* System Windows - Manhwa Style */
.system-window {
  background: rgba(10, 10, 30, 0.95);
  border: 2px solid #00d4ff;
  border-radius: 0;
  box-shadow: 
    0 0 20px rgba(0, 212, 255, 0.5),
    inset 0 0 20px rgba(0, 212, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.system-window::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #00d4ff, #bc00ff, #00d4ff);
  z-index: -1;
  filter: blur(10px);
  opacity: 0.3;
}

.window-header {
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.2), rgba(188, 0, 255, 0.2));
  padding: 15px 20px;
  border-bottom: 2px solid #00d4ff;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
}

.window-header h1, .window-header h2 {
  font-size: 2em;
  text-shadow: 0 0 10px #00d4ff;
}

.subtitle {
  font-size: 0.8em;
  color: #bc00ff;
  margin-top: 5px;
}

.window-content {
  padding: 30px;
}

/* Auth Screen */
#auth-screen .system-window {
  width: 100%;
  max-width: 500px;
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid #00d4ff;
  color: #00d4ff;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Orbitron', sans-serif;
}

.tab-btn.active {
  background: rgba(0, 212, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Neon Inputs */
.neon-input {
  padding: 15px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid #00d4ff;
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-size: 1em;
  transition: all 0.3s;
}

.neon-input:focus {
  outline: none;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.8);
  border-color: #bc00ff;
}

/* Neon Buttons */
.neon-btn {
  padding: 15px 30px;
  background: linear-gradient(90deg, #00d4ff, #bc00ff);
  border: none;
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-size: 1em;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

.neon-btn:hover {
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
  transform: translateY(-2px);
}

.neon-btn.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.5); }
  50% { box-shadow: 0 0 40px rgba(188, 0, 255, 0.8); }
}

/* Awakening Screen */
.awakening-window {
  width: 100%;
  max-width: 600px;
  text-align: center;
}

.awakening-animation {
  margin: 40px 0;
  position: relative;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.magic-circle {
  width: 200px;
  height: 200px;
  border: 3px solid #00d4ff;
  border-radius: 50%;
  position: relative;
  animation: rotate 4s linear infinite;
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.8);
}

.magic-circle::before,
.magic-circle::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid #bc00ff;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.magic-circle::before {
  width: 150px;
  height: 150px;
  animation: rotate 3s linear infinite reverse;
}

.magic-circle::after {
  width: 100px;
  height: 100px;
  animation: rotate 2s linear infinite;
}

@keyframes rotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.awakening-text {
  position: absolute;
  font-size: 1.2em;
  color: #00d4ff;
  text-shadow: 0 0 10px #00d4ff;
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Game Layout */
.game-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  width: 100%;
  max-width: 1400px;
  padding: 20px;
}

.stats-panel {
  height: fit-content;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.stat-label {
  color: #00d4ff;
}

.stat-value {
  color: #fff;
  font-weight: 700;
}

.stat-value.rank {
  font-size: 1.5em;
  text-shadow: 0 0 10px #bc00ff;
}

.stat-item.gold {
  border-bottom: none;
  margin-top: 10px;
  padding-top: 15px;
  border-top: 2px solid #00d4ff;
}

/* Stat Bars */
.stat-bar {
  margin: 15px 0;
}

.bar-label {
  color: #00d4ff;
  margin-bottom: 5px;
  font-size: 0.9em;
}

.bar {
  height: 25px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #00d4ff;
  position: relative;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  transition: width 0.3s;
}

.hp-bar .bar-fill {
  background: linear-gradient(90deg, #ff0000, #ff6b6b);
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.mana-bar .bar-fill {
  background: linear-gradient(90deg, #0066ff, #00d4ff);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.bar-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.8em;
  font-weight: 700;
  text-shadow: 0 0 5px #000;
}

/* Main Content */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Menu Grid */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.menu-btn {
  padding: 30px;
  background: rgba(0, 212, 255, 0.1);
  border: 2px solid #00d4ff;
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.menu-btn:hover {
  background: rgba(0, 212, 255, 0.2);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
  transform: translateY(-5px);
}

.menu-icon {
  font-size: 3em;
}

/* Battle Area */
.battle-window {
  width: 100%;
}

.battle-info {
  margin-bottom: 20px;
}

.enemy-info {
  text-align: center;
}

.enemy-info h3 {
  color: #ff0000;
  text-shadow: 0 0 10px #ff0000;
  margin-bottom: 10px;
}

.battle-log {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #00d4ff;
  padding: 15px;
  height: 200px;
  overflow-y: auto;
  margin-bottom: 20px;
  font-size: 0.9em;
}

.battle-log p {
  margin: 5px 0;
  padding: 5px;
  border-left: 3px solid #00d4ff;
  padding-left: 10px;
}

.battle-log .critical {
  color: #ff0000;
  font-weight: 700;
  text-shadow: 0 0 5px #ff0000;
}

.battle-log .miss {
  color: #666;
}

.battle-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#skill-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}

.toast {
  background: rgba(0, 212, 255, 0.95);
  border: 2px solid #00d4ff;
  padding: 15px 20px;
  margin-bottom: 10px;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
  animation: slideIn 0.3s ease-out;
  min-width: 250px;
}

.toast.error {
  background: rgba(255, 0, 0, 0.95);
  border-color: #ff0000;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
}

.toast.success {
  background: rgba(0, 255, 0, 0.95);
  border-color: #00ff00;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .game-layout {
    grid-template-columns: 1fr;
  }
  
  .menu-grid {
    grid-template-columns: 1fr;
  }
}
