/* Chat Tower Companion — Neon-Outline Style passend zum Game.
 * Palette identisch mit index.html / game.js:
 *   BG       #06080f
 *   Cyan     #38e1ff
 *   Magenta  #ff45b5
 *   Yellow   #ffd84a
 *   Green    #5eff8a
 *   Red      #ff4d6e
 *   Text     #cbd5e1
 *   Muted    #5c6479
 */

:root {
  --bg:      #06080f;
  --bg-2:    #0c1020;
  --panel:   #11162a;
  --line:    #1f2740;
  --line-2:  #2a334e;
  --text:    #cbd5e1;
  --muted:   #5c6479;
  --cyan:    #38e1ff;
  --magenta: #ff45b5;
  --yellow:  #ffd84a;
  --green:   #5eff8a;
  --red:     #ff4d6e;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(ellipse at top, #0a0f24 0%, #06080f 60%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  min-height: 100vh;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: ui-monospace, "Courier New", monospace;
  background: rgba(56, 225, 255, 0.08);
  color: var(--cyan);
  padding: 0.05em 0.4em;
  border-radius: 3px;
  font-size: 0.92em;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-2);
  padding: 0.5em 1em;
  border-radius: 4px;
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
button:hover:not(:disabled) {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 12px rgba(56, 225, 255, 0.3);
}
button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== Layout ===== */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8em 1.5em;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 8, 15, 0.7);
  backdrop-filter: blur(4px);
}
.site-title {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(56, 225, 255, 0.5);
}
.site-nav { display: flex; align-items: center; gap: 1em; }
.nav-link { color: var(--text); }
.nav-user { color: var(--muted); font-size: 0.9em; }
.logout-form { margin: 0; }
.nav-logout {
  padding: 0.3em 0.7em; font-size: 0.85em;
  border: 1px solid var(--line);
  color: var(--muted);
}
.nav-logout:hover { color: var(--magenta); border-color: var(--magenta); }

.site-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.5em;
}

.site-footer {
  margin-top: 3em;
  padding: 1em;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85em;
  text-align: center;
}

/* ===== Landing ===== */

.landing { text-align: center; padding: 3em 1em; }
.hero-title {
  font-size: 3em;
  margin: 0 0 0.3em;
  letter-spacing: -0.02em;
  color: var(--text);
  text-shadow: 0 0 20px rgba(56, 225, 255, 0.3);
}
.hero-accent {
  color: var(--magenta);
  text-shadow: 0 0 20px rgba(255, 69, 181, 0.6);
}
.hero-tagline {
  font-size: 1.1em;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 2em;
  line-height: 1.5;
}
.hero-cta {
  display: inline-block;
  background: var(--cyan);
  color: var(--bg);
  padding: 0.8em 2em;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 0 24px rgba(56, 225, 255, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.hero-cta:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 0 32px rgba(56, 225, 255, 0.6);
}
.hero-info {
  max-width: 600px;
  margin: 3em auto 0;
  text-align: left;
  padding: 1.5em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}
.hero-info h2 { color: var(--cyan); margin-top: 0; }
.hero-info ul { margin: 0; padding-left: 1.3em; line-height: 1.7; }
.hero-info li { color: var(--text); }

/* ===== Dashboard ===== */

.dashboard { padding: 0.5em 0; }
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1em;
  padding-bottom: 1em;
  border-bottom: 1px solid var(--line);
}
.dash-id { display: flex; flex-direction: column; }
.dash-name { font-size: 1.4em; font-weight: 600; color: var(--text); }
.dash-handle { color: var(--muted); font-size: 0.9em; }

.dash-stats { display: flex; gap: 0.8em; flex-wrap: wrap; }
.stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5em 1em;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  min-width: 5em;
}
.stat-num { font-size: 1.4em; font-weight: 600; color: var(--cyan); }
.stat-num.weapon-glyph { color: var(--yellow); text-shadow: 0 0 8px rgba(255, 216, 74, 0.4); }
.stat-label { font-size: 0.75em; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.dash-tabs {
  display: flex;
  gap: 0;
  margin: 1.5em 0 1em;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.dash-tab {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.7em 1.3em;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.dash-tab:hover { color: var(--text); text-decoration: none; }
.dash-tab.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
  text-shadow: 0 0 8px rgba(56, 225, 255, 0.3);
}
.tab-icon { font-size: 1.1em; }
.tab-label { font-weight: 500; }

/* ===== Panels ===== */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.2em 1.4em;
  margin-bottom: 1em;
}
.panel-title {
  margin: 0 0 0.4em;
  color: var(--cyan);
  font-size: 1.1em;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.panel-hint {
  margin: 0 0 1em;
  color: var(--muted);
  font-size: 0.9em;
  line-height: 1.5;
}
.panel-empty {
  color: var(--muted);
  font-style: italic;
  padding: 1em 0;
}

/* ===== Cards / Pills ===== */

.card-groups { display: flex; flex-direction: column; gap: 0.8em; }
.card-group {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.6em 0.8em;
}
.card-group-head {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.5em;
}
.card-group-symbol {
  color: var(--yellow);
  font-size: 1.1em;
  min-width: 1.4em;
  text-align: center;
}
.card-group-label { color: var(--text); font-weight: 500; flex: 1; }
.card-group-count {
  color: var(--muted);
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.1em 0.5em;
  border-radius: 3px;
}

.card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}

.card-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.3em 0.6em;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: rgba(56, 225, 255, 0.04);
  font-size: 0.9em;
  position: relative;
}
.card-pill.equipped {
  border-color: var(--green);
  background: rgba(94, 255, 138, 0.08);
  box-shadow: 0 0 8px rgba(94, 255, 138, 0.3);
}
.pill-symbol { color: var(--yellow); }
.pill-tier { color: var(--cyan); font-weight: 500; }
.pill-bonus { color: var(--muted); font-size: 0.85em; }
.pill-eq { color: var(--green); font-weight: 700; }

.card-pill.weapon-pill {
  background: rgba(255, 216, 74, 0.06);
  border-color: rgba(255, 216, 74, 0.3);
}
.card-pill.weapon-pill .pill-tier { color: var(--yellow); }

/* ===== Merge ===== */

.merge-hints { margin-top: 0.6em; display: flex; flex-wrap: wrap; gap: 0.4em; }
.merge-btn {
  background: rgba(255, 69, 181, 0.08);
  border-color: var(--magenta);
  color: var(--magenta);
  font-size: 0.85em;
  padding: 0.3em 0.7em;
}
.merge-btn:hover:not(:disabled) {
  color: #fff;
  background: rgba(255, 69, 181, 0.2);
  box-shadow: 0 0 12px rgba(255, 69, 181, 0.4);
  border-color: var(--magenta);
}

/* ===== Sockel ===== */

.socket-list { display: flex; flex-direction: column; gap: 0.5em; }
.socket-row {
  display: grid;
  grid-template-columns: 2em 3em 1fr auto;
  align-items: center;
  gap: 0.6em;
  padding: 0.6em 0.8em;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.socket-icon { color: var(--cyan); font-size: 1.2em; }
.socket-slot-index { color: var(--muted); font-family: ui-monospace, monospace; font-size: 0.9em; }
.socket-select {
  font-family: inherit;
  font-size: 0.9em;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  padding: 0.3em 0.5em;
  width: 100%;
}
.socket-select:focus { outline: none; border-color: var(--cyan); }
.socket-status {
  font-size: 0.85em;
  color: var(--green);
  min-width: 8em;
  text-align: right;
}
.socket-status.muted { color: var(--muted); font-style: italic; }
.socket-preview {
  margin-top: 1em;
  padding-top: 1em;
  border-top: 1px dashed var(--line);
}
.socket-preview h3 { color: var(--magenta); font-size: 0.95em; margin: 0 0 0.4em; }
.preview-list { margin: 0; padding-left: 1.3em; color: var(--text); }
.preview-list li { padding: 0.15em 0; }

/* ===== Waffenslot ===== */

.weapon-current {
  display: flex;
  align-items: center;
  gap: 1em;
  padding: 0.8em 1em;
  margin-bottom: 1em;
  background: var(--bg-2);
  border: 1px solid var(--yellow);
  border-radius: 5px;
  box-shadow: 0 0 16px rgba(255, 216, 74, 0.15);
}
.weapon-current-glyph {
  font-size: 2em;
  color: var(--yellow);
  text-shadow: 0 0 12px rgba(255, 216, 74, 0.6);
  min-width: 1.4em;
  text-align: center;
}
.weapon-current-text { display: flex; flex-direction: column; }
.weapon-current-label { font-size: 0.8em; color: var(--muted); text-transform: uppercase; }
.weapon-current-name { font-size: 1.2em; font-weight: 600; color: var(--text); }

.weapon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6em;
}
.weapon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3em;
  padding: 0.8em 0.6em;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 5px;
  text-align: center;
}
.weapon-card.equipped {
  border-color: var(--yellow);
  box-shadow: 0 0 12px rgba(255, 216, 74, 0.3);
}
.weapon-card.locked { opacity: 0.35; cursor: not-allowed; }
.weapon-card:hover:not(:disabled):not(.equipped) {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 12px rgba(56, 225, 255, 0.3);
}
.wc-glyph { font-size: 1.5em; color: var(--yellow); }
.wc-label { font-weight: 500; }
.wc-status { font-size: 0.75em; color: var(--muted); }
.weapon-card.equipped .wc-status { color: var(--yellow); }

/* ===== Draws ===== */

.draws-panel { text-align: center; padding: 2em 1em; }
.draw-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5em;
}
.draw-counter { display: flex; flex-direction: column; align-items: center; }
.draw-counter #draws-remaining-big,
.draw-counter span:first-child {
  font-size: 3em;
  font-weight: 700;
  color: var(--magenta);
  text-shadow: 0 0 20px rgba(255, 69, 181, 0.4);
  line-height: 1;
}
.draw-counter-label { color: var(--muted); text-transform: uppercase; font-size: 0.85em; letter-spacing: 0.05em; }

.draw-btn {
  font-size: 1.2em;
  padding: 0.7em 2em;
  background: var(--cyan);
  color: var(--bg);
  border: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 0 24px rgba(56, 225, 255, 0.4);
  transition: transform 0.1s, box-shadow 0.15s;
}
.draw-btn:hover:not(:disabled) {
  transform: scale(1.02);
  box-shadow: 0 0 32px rgba(56, 225, 255, 0.6);
  color: var(--bg);
}
.draw-btn:disabled { background: var(--line-2); color: var(--muted); box-shadow: none; }

.draw-result {
  min-height: 5em;
  padding: 1em;
  transition: opacity 0.3s;
}
.draw-result .reveal-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4em;
  padding: 1em 1.5em;
  background: var(--bg-2);
  border: 2px solid var(--magenta);
  border-radius: 8px;
  box-shadow: 0 0 24px rgba(255, 69, 181, 0.4);
  animation: reveal 0.3s ease-out;
}
.draw-result .reveal-card.weapon { border-color: var(--yellow); box-shadow: 0 0 24px rgba(255, 216, 74, 0.4); }
.draw-result .reveal-symbol { font-size: 2.5em; color: var(--yellow); }
.draw-result .reveal-label { font-size: 1.2em; font-weight: 600; color: var(--text); }
.draw-result .reveal-bonus { color: var(--cyan); font-size: 0.9em; }
.draw-result .reveal-type { font-size: 0.8em; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

@keyframes reveal {
  from { opacity: 0; transform: scale(0.7) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== Mobile ===== */
@media (max-width: 600px) {
  .site-main { padding: 1em; }
  .hero-title { font-size: 2em; }
  .dash-header { flex-direction: column; align-items: flex-start; }
  .socket-row {
    grid-template-columns: 2em 1fr;
    grid-template-rows: auto auto;
  }
  .socket-icon, .socket-slot-index { grid-row: 1; }
  .socket-select { grid-column: 1 / -1; grid-row: 2; }
  .socket-status { grid-column: 1 / -1; text-align: left; }
}
