:root {
  --pcblue: #012456;
  --pcblue-light: #0c3a7a;
  --accent: #4fc3f7;
  --text: #e8ecf1;
  --text-dim: #9fb3c8;
  --panel: #071c3c;
  --border: #1c4a8a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(160deg, var(--pcblue) 0%, #001233 100%);
  color: var(--text);
  font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace;
  padding: 24px 16px 80px;
}

/* Konsolen-Banner */
.console-banner {
  max-width: 720px;
  margin: 0 auto 28px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-dim);
}
.console-line { line-height: 1.5; }
.prompt-line { color: var(--accent); margin-top: 4px; }
.cursor { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Karte */
.card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  overflow: hidden;
}
.card-inner { padding: 32px 28px; }

.profile-section {
  text-align: center;
  margin-bottom: 28px;
}
.avatar-wrap { display: flex; justify-content: center; margin-bottom: 16px; }
.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 20px rgba(79,195,247,0.35);
}
.profile-section h1 {
  margin: 0 0 4px;
  font-size: 24px;
  letter-spacing: 0.5px;
}
.taetigkeit {
  margin: 0;
  color: var(--accent);
  font-size: 14px;
}

.block { margin-bottom: 22px; }
.block-header {
  font-size: 12px;
  color: var(--text-dim);
  border-bottom: 1px dashed var(--border);
  padding-bottom: 6px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
.block p { margin: 0; line-height: 1.6; font-size: 14.5px; }

.tag-list, .social-list, .kontakt-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-list li {
  background: var(--pcblue-light);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 13px;
}
.social-list, .kontakt-list { flex-direction: column; gap: 6px; }
.social-list a, .kontakt-list li {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
}
.social-list a:hover { text-decoration: underline; }
.kontakt-list li { color: var(--text); }

/* Projekt-Karten */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.project-card {
  display: block;
  width: 100%;
  background: var(--pcblue-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.project-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.project-card img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  display: block;
  background: #001233;
}
.project-card .project-name {
  display: block;
  padding: 8px 10px;
  font-size: 13px;
}
.project-empty {
  color: var(--text-dim);
  font-size: 13px;
}

/* Projekte im Edit-Panel */
.projekte-edit { margin-bottom: 16px; }
.projekte-edit-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.projekt-edit-row {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 10px;
}
.projekt-edit-row input[type="text"],
.projekt-edit-row input[type="file"],
.projekt-edit-row textarea {
  width: 100%;
  margin-top: 4px;
  margin-bottom: 8px;
  padding: 6px 8px;
  background: #001233;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
}
.projekt-edit-row .projekt-thumb {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 6px;
  display: block;
}
.projekt-edit-row .remove-projekt {
  background: transparent;
  color: #ff6b6b;
  border: 1px solid #ff6b6b55;
  font-size: 11px;
  padding: 4px 8px;
}
#addProjektBtn { width: 100%; }

/* Discord-Block: Einleitung + nummerierte Optionen */
.discord-intro {
  margin: 0 0 14px;
  line-height: 1.6;
  font-size: 14.5px;
}
.discord-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.discord-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13.5px;
  line-height: 1.5;
}
.step-badge {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: var(--accent);
  color: #001233;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-dim);
}

/* Edit-Button: standardmäßig unsichtbar, nur bei Hover/Fokus sichtbar */
.edit-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: transparent;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
  z-index: 50;
}
.edit-toggle:hover, .edit-toggle:focus {
  color: var(--accent);
  border-color: var(--border);
  background: rgba(0,0,0,0.35);
}

/* Verstecktes Hover-Feld links am Rand */
.hidden-note-zone {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 36px;
  z-index: 45;
  display: flex;
  align-items: center;
}
.hidden-note {
  opacity: 0;
  pointer-events: none;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: 0 8px 8px 0;
  padding: 12px 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--accent);
  max-width: 200px;
  white-space: pre-line;
  transition: opacity 0.25s ease;
}
.hidden-note-zone:hover .hidden-note {
  opacity: 1;
}

/* Auf Mobilgeräten komplett ausgeblendet */
@media (max-width: 768px), (pointer: coarse) {
  .hidden-note-zone { display: none; }
}

/* Auf Mobilgeräten komplett ausgeblendet */
@media (max-width: 768px), (pointer: coarse) {
  .edit-toggle { display: none; }
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal.hidden { display: none; }
.modal-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  width: 320px;
}
.modal-title { color: var(--accent); margin-bottom: 12px; font-size: 14px; }
.modal-box input {
  width: 100%;
  padding: 8px 10px;
  background: #001233;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  font-family: inherit;
  margin-bottom: 12px;
}
.modal-projekt-bild {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 12px;
}
#projektModalBeschreibung {
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0 0 16px;
  white-space: pre-line;
}
.modal-actions { display: flex; gap: 8px; }
.error { color: #ff6b6b; font-size: 12px; margin-top: 8px; }
.error.hidden { display: none; }

button {
  font-family: inherit;
  background: var(--accent);
  color: #001233;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
button.secondary {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}
button:hover { opacity: 0.9; }

/* Edit-Panel */
.edit-panel {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 90;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 16px;
}
.edit-panel.hidden { display: none; }
.edit-panel-inner {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  width: 100%;
  max-width: 480px;
}
.edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--accent);
  margin-bottom: 18px;
  font-size: 14px;
}
.edit-panel-inner label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.edit-panel-inner input[type="text"],
.edit-panel-inner input[type="file"],
.edit-panel-inner textarea {
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  background: #001233;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
}
.edit-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
#saveStatus { font-size: 12px; color: var(--accent); }

.favicon-preview-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}
.favicon-preview-row img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  background: #001233;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.favicon-preview-row span {
  font-size: 11px;
  color: var(--text-dim);
}