:root {
  --bg: #090d16;
  --bg-surface: #0e1422;
  --card-bg: rgba(17, 24, 39, 0.75);
  --card-border: rgba(56, 68, 97, 0.6);
  --card-hover: rgba(79, 96, 138, 0.8);
  
  --accent: #38bdf8;
  --accent-hover: #0284c7;
  --accent-subtle: rgba(56, 189, 248, 0.12);
  --accent-glow: rgba(56, 189, 248, 0.35);
  
  --purple: #a855f7;
  --purple-subtle: rgba(168, 85, 247, 0.12);
  
  --success: #10b981;
  --success-hover: #059669;
  --success-subtle: rgba(16, 185, 129, 0.15);
  
  --warning: #f59e0b;
  --warning-subtle: rgba(245, 158, 11, 0.15);
  
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.12);
  --error-border: rgba(239, 68, 68, 0.35);
  
  --text: #cbd5e1;
  --text-bright: #f8fafc;
  --text-muted: #94a3b8;
  
  --code-font: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.06) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(14, 20, 34, 0.9) 0px, transparent 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans-font);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.25rem 4rem;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1020px;
  width: 100%;
}

/* Header & Navigation */
.header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--card-border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-bright);
  font-weight: 700;
  font-size: 1.15rem;
  transition: transform 0.2s ease;
}

.nav-brand:hover {
  transform: translateY(-1px);
}

.nav-brand img {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.4));
}

.brand-text {
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
  color: var(--accent);
  background: var(--accent-subtle);
}

/* Hero Section */
.hero {
  margin-bottom: 2.5rem;
  text-align: left;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.035em;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-title-text {
  background: linear-gradient(135deg, #ffffff 20%, #38bdf8 70%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.35);
  letter-spacing: normal;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-tagline {
  font-size: 1.35rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.85rem;
  letter-spacing: -0.01em;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 860px;
  line-height: 1.65;
}

.hero-desc strong {
  color: var(--text-bright);
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.pill-feature {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(71, 85, 105, 0.4);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Cards */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  border-color: var(--card-hover);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: -0.01em;
}

/* Preset Tabs */
.preset-tabs {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 0.75rem;
  flex-wrap: wrap;
}

.preset-tab {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-tab:hover {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.04);
}

.preset-tab.active {
  background: var(--accent-subtle);
  color: var(--accent);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.12);
}

/* Visual Disk Map */
.disk-map-container {
  margin: 1.25rem 0;
  background: #080c14;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.disk-map-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.disk-map-bar {
  display: flex;
  height: 42px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #030712;
  gap: 2px;
  padding: 2px;
}

.disk-map-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  border-radius: 4px;
  position: relative;
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.disk-map-block:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.disk-block-gpt {
  background: #334155;
  color: #94a3b8;
  font-size: 0.7rem;
}

.disk-block-fat32 {
  background: linear-gradient(135deg, #0284c7, #0369a1);
}

.disk-block-ext4 {
  background: linear-gradient(135deg, #059669, #047857);
}

.disk-block-ntfs {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

.disk-block-exfat {
  background: linear-gradient(135deg, #d97706, #b45309);
}

.disk-block-tar {
  background: linear-gradient(135deg, #db2777, #be185d);
}

/* Tables */
.part-table, .matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1rem 0;
  font-size: 0.875rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.part-table th, .part-table td,
.matrix-table th, .matrix-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
}

.part-table th, .matrix-table th {
  background: #080c14;
  color: var(--text-bright);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.part-table tr:last-child td,
.matrix-table tr:last-child td {
  border-bottom: none;
}

.part-table tr:hover td,
.matrix-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

code {
  font-family: var(--code-font);
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #7dd3fc;
}

/* Action Buttons */
.action-row {
  display: flex;
  gap: 0.85rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #0284c7);
  color: #030712;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #7dd3fc, #38bdf8);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, #34d399, #10b981);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-outline {
  background: rgba(30, 41, 59, 0.5);
  color: var(--text-bright);
  border: 1px solid var(--card-border);
}

.btn-outline:hover:not(:disabled) {
  background: rgba(51, 65, 85, 0.8);
  border-color: var(--card-hover);
  transform: translateY(-1px);
}

/* Telemetry Grid */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.telemetry-box {
  background: #080c14;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.telemetry-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}

.telemetry-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.telemetry-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-bright);
  font-family: var(--code-font);
}

/* In-Browser VM Terminal Frame */
.terminal-window {
  background: #040711;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.terminal-header {
  background: #0d1322;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--card-border);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-title {
  font-size: 0.78rem;
  font-family: var(--code-font);
  color: var(--text-muted);
}

.terminal-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

#terminalContainer {
  padding: 0.75rem;
  min-height: 280px;
  background: #040711;
}

/* VM Stepper Timeline */
.vm-timeline {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.vm-timeline-item {
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.vm-timeline-item.status-done {
  background: var(--success-subtle);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.vm-timeline-item.status-active {
  background: var(--accent-subtle);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--accent);
  font-weight: 600;
}

/* VM Shortcuts Bar */
.vm-actions-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--card-border);
  flex-wrap: wrap;
}

.btn-vm-action {
  font-family: var(--code-font);
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
  background: rgba(30, 41, 59, 0.6);
  color: var(--text-bright);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-vm-action:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

/* Log Stream */
.log-stream {
  background: #040711;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  color: #34d399;
  font-family: var(--code-font);
  font-size: 0.84rem;
  height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

.error-alert {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: #fca5a5;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  margin-top: 1rem;
  display: none;
  font-family: var(--code-font);
  font-size: 0.875rem;
}

/* Architecture Diagram */
.arch-diagram {
  background: #040711;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  font-family: var(--code-font);
  font-size: 0.82rem;
  color: #94a3b8;
  overflow-x: auto;
  line-height: 1.6;
  margin: 1rem 0;
}

.arch-highlight {
  color: var(--accent);
  font-weight: bold;
}

.arch-green {
  color: #34d399;
  font-weight: bold;
}

.badge-pass {
  background: var(--success-subtle);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

/* Page Footer */
.page-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--card-border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.page-footer a {
  color: var(--text-bright);
  text-decoration: none;
  transition: color 0.15s ease;
}

.page-footer a:hover {
  color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .card { padding: 1.25rem; }
  .part-table, .matrix-table { font-size: 0.8rem; }
  .part-table th, .part-table td,
  .matrix-table th, .matrix-table td { padding: 0.5rem; }
  .btn-row, .action-row { flex-direction: column; }
  .btn { width: 100%; }
}
