:root {
  color-scheme: dark;
  --panel-bg: #0b213c;
  --panel-border: #123961;
  --accent: #35d0ff;
  --text-muted: #94a6bd;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #061224, #03080f 60%);
  color: #f8fbff;
}

.app-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3ch;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.subtitle {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0.75rem auto 0;
}

.topology-panel,
.link-deck {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 1.25rem;
  padding: 1.75rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
  margin-bottom: 2rem;
}

.panel-head h2 {
  margin: 0;
}

.panel-head p {
  margin: 0.35rem 0 1.5rem;
  color: var(--text-muted);
}

.topology-board {
  position: relative;
  width: min(1100px, 95vw);
  aspect-ratio: 2666 / 1524;
  margin: 0 auto;
  background: url('topology.png') center/contain no-repeat;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.node {
  position: absolute;
  width: 9%;
  height: 13%;
  transform: translate(-50%, -50%);
  border-radius: 0.85rem;
  border: 2px solid rgba(53, 208, 255, 0.7);
  background: rgba(6, 72, 116, 0.55);
  backdrop-filter: blur(4px);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(0.55rem, 1vw, 0.85rem);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.25rem;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.node:hover,
.node:focus-visible {
  transform: translate(-50%, -50%) scale(1.08);
  border-color: #fff;
  box-shadow: 0 0 20px rgba(53, 208, 255, 0.7);
}

.card-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
}

.card-row .card {
  flex: 1 1 240px;
}

.card-row.linux-row {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.card-row.linux-row .card {
  min-width: 220px;
}

.card {
  background: rgba(8, 30, 52, 0.9);
  border: 1px solid var(--panel-border);
  border-radius: 0.9rem;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 150ms ease, border-color 150ms ease;
}

.card-body {
  flex: 1 1 auto;
}

.card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card-windows {
  background: linear-gradient(135deg, rgba(7, 32, 82, 0.95), rgba(19, 82, 170, 0.92));
  border-color: rgba(75, 150, 255, 0.7);
}

.card-windows.card-windows-test {
  background: linear-gradient(135deg, #0a0a0a, #1b1b1b);
  border-color: #3d3d3d;
}

.card-linux {
  background: linear-gradient(135deg, rgba(6, 50, 18, 0.95), rgba(14, 110, 52, 0.9));
  border-color: rgba(79, 218, 139, 0.65);
}

.card-firewall {
  background: linear-gradient(135deg, rgba(78, 6, 6, 0.95), rgba(165, 37, 26, 0.9));
  border-color: rgba(255, 87, 78, 0.7);
}

.card-switch {
  background: linear-gradient(135deg, rgba(8, 8, 8, 0.95), rgba(35, 35, 35, 0.9));
  border-color: rgba(160, 160, 160, 0.5);
}

.card-resource {
  background: linear-gradient(135deg, rgba(28, 8, 52, 0.96), rgba(70, 26, 122, 0.88));
  border-color: rgba(186, 140, 255, 0.65);
}

.resource-link {
  margin: 0.6rem 0 0;
}

.resource-link a {
  color: #f4fbff;
  text-decoration: none;
  word-break: break-all;
}

.resource-link a:hover,
.resource-link a:focus-visible {
  text-decoration: underline;
}

.card .ip-list {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
  color: #dcefff;
}

.card .ip-list li + li {
  margin-top: 0.25rem;
}

.card .ip-list strong {
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  margin-right: 0.3rem;
}

.cred-block {
  margin-top: 0.7rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cred-label {
  margin: 0;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.card-actions {
  margin-top: auto;
  padding-top: 0.8rem;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.access-button {
  background: var(--accent);
  color: #00192c;
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.45rem 1rem;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.access-button:hover,
.access-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(53, 208, 255, 0.35);
}

.access-button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(53, 208, 255, 0.5);
  box-shadow: none;
}

.access-button.secondary:hover,
.access-button.secondary:focus-visible {
  box-shadow: 0 8px 14px rgba(53, 208, 255, 0.25);
}

.access-button.console {
  background: #ffd54f;
  color: #2a1c00;
  box-shadow: 0 10px 18px rgba(255, 213, 79, 0.35);
}

.access-button.console:hover,
.access-button.console:focus-visible {
  box-shadow: 0 12px 20px rgba(255, 213, 79, 0.4);
}

.cred-list {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: #f4fbff;
}

.cred-list li + li {
  margin-top: 0.2rem;
}

.cred-list strong {
  color: var(--accent);
  font-weight: 700;
  margin-right: 0.3rem;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(53, 208, 255, 0.9);
}

@media (max-width: 640px) {
  .node {
    width: 16%;
    height: 15%;
  }

  .topology-board {
    width: 100%;
  }
}
