/* --- Variables & Reset --- */
:root {
  --bg: #050a14;
  --card-bg: #0d1626;
  --accent: #4fd1ed;
  --border: rgba(79, 209, 237, 0.2);
  --error: #ef4444;
  --text: #e2e8f0;
  --sub-text: #566a8a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 20px;
  line-height: 1.5;
}

header {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.sub-text { font-size: 0.8rem; color: var(--sub-text); margin-left: 10px; }

/* --- Dashboard Layout --- */
.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-header {
  background: rgba(79, 209, 237, 0.05);
  padding: 10px 15px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  color: var(--accent);
}

.card-content { padding: 15px; flex: 1; }

/* --- Status & HP Bar --- */
#status-dot { transition: color 0.3s; }
.hp-val { font-size: 2rem; font-weight: bold; margin-bottom: 5px; }
.hp-unit { font-size: 0.9rem; color: var(--sub-text); }
.hp-bar { background: #1a273b; height: 8px; border-radius: 4px; overflow: hidden; }
.hp-fill {
  background: linear-gradient(90deg, #4fd1ed, #2dd4bf);
  height: 100%;
  width: 0%;
  transition: width 0.5s ease-out;
}
.error-text { color: var(--error); font-size: 0.8rem; margin-top: 10px; }

/* --- Forms & Inputs --- */
.card-content form { display: flex; gap: 0; margin-bottom: 10px; }

input[type="text"], select {
  flex: 1;
  background: #0a111f;
  border: 1px solid var(--border);
  color: #fff;
  padding: 10px 15px;
  outline: none;
  transition: border-color 0.3s;
}

input[type="text"] { border-radius: 4px 0 0 4px; border-right: none; }
select { border-radius: 4px; margin-bottom: 10px; appearance: none; cursor: pointer; }

input[type="text"]:focus, select:focus { border-color: var(--accent); }

/* --- Buttons --- */
button {
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s;
  letter-spacing: 1px;
}

button[type="submit"] {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 0 20px;
  border-radius: 0 4px 4px 0;
}

button[type="submit"]:hover { background: rgba(79, 209, 237, 0.1); border-color: var(--accent); }

.btn-group { display: flex; gap: 10px; margin-bottom: 10px; }
.btn-idle, .btn-action {
  flex: 1;
  background: rgba(79, 209, 237, 0.05);
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: 4px;
  font-size: 0.75rem;
}

.btn-attack {
  width: 100%;
  background: rgba(239, 68, 68, 0.05);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 10px;
  border-radius: 4px;
}
.btn-attack:hover { background: rgba(239, 68, 68, 0.15); border-color: var(--error); }

.btn-restart {
  width: 100%;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: var(--error);
  background: transparent;
  padding: 10px;
  margin-top: 10px;
  border-radius: 4px;
  font-size: 0.75rem;
}
.btn-restart:hover { background: rgba(239, 68, 68, 0.1); }

/* --- Logs --- */
.log-list {
  height: 200px;
  overflow-y: auto;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px;
  border-radius: 4px;
}

.console-theme {
  font-family: 'Consolas', monospace;
  color: #a0aec0;
  background: #050a14;
}

.log-list::-webkit-scrollbar { width: 4px; }
.log-list::-webkit-scrollbar-thumb { background: var(--border); }

hr { border: 0; border-top: 1px solid var(--border); margin: 15px 0; opacity: 0.3; }
