:root {
  --bg-color: #05070a;
  --panel-bg: rgba(15, 20, 30, 0.8);
  --accent-color: #00d2ff;
  --phi-gold: #ffcc33;
  --text-primary: #e0e6ed;
  --text-secondary: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.1);
  --success-green: #10b981;
  --sigma-blue: #3b82f6;
  --rdod-purple: #a855f7;
}

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

body {
  background: var(--bg-color);
  background-image: radial-gradient(circle at 50% 50%, #111827 0%, #05070a 100%);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

/* HEADER */
.header {
  background: rgba(10, 15, 25, 0.95);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.phi-symbol {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--phi-gold);
  text-shadow: 0 0 15px rgba(255, 204, 51, 0.4);
}

.title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.1);
}

.badge-online { background: rgba(16, 185, 129, 0.1); color: var(--success-green); }
.badge-sigma { background: rgba(59, 130, 246, 0.1); color: var(--sigma-blue); }
.badge-rdod { background: rgba(168, 85, 247, 0.1); color: var(--rdod-purple); }

/* SECTIONS */
.section {
  max-width: 1200px;
  margin: 2.5rem auto;
  padding: 0 2rem;
}

.section-title {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0.8;
}

/* METRICS GRID */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
}

.metric-card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.metric-icon { font-size: 1.5rem; margin-bottom: 0.75rem; }
.metric-label { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; }
.metric-value { font-size: 1.25rem; font-weight: 700; margin: 0.25rem 0 0.75rem 0; }

.metric-bar {
  height: 4px;
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
  margin-bottom: 0.75rem;
}

.metric-fill { height: 100%; background: var(--success-green); border-radius: 2px; }
.fill-rdod { background: var(--rdod-purple); }
.fill-freq { background: var(--phi-gold); }

.metric-status { font-size: 0.65rem; font-weight: 700; }
.metric-status.ok { color: var(--success-green); }

/* FRAMEWORK GRID */
.framework-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.framework-card {
  background: var(--panel-bg);
  border-left: 3px solid var(--accent-color);
  padding: 1.5rem;
  border-radius: 4px 12px 12px 4px;
}

.framework-card h3 { font-size: 0.95rem; margin-bottom: 0.75rem; }
.framework-card p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1rem; }

.code-pill {
  background: rgba(0,0,0,0.3);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.75rem;
  display: block;
  border: 1px solid rgba(255,255,255,0.05);
}

/* LOG CONTAINER */
.log-container {
  background: #000;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.log-toolbar {
  padding: 0.75rem 1.25rem;
  background: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.log-dot { width: 8px; height: 8px; border-radius: 50%; }
.log-dot.green { background: var(--success-green); box-shadow: 0 0 8px var(--success-green); }

.btn-clear {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.7rem;
}

.log-scroll {
  height: 250px;
  overflow-y: auto;
  padding: 1rem;
  font-family: "Fira Code", monospace;
  font-size: 0.75rem;
}

.log-entry { margin-bottom: 0.4rem; white-space: pre-wrap; }
.log-time { color: var(--text-secondary); margin-right: 0.75rem; }
.log-tag { font-weight: 700; margin-right: 0.75rem; }
.log-tag.info { color: var(--accent-color); }
.log-tag.success { color: var(--success-green); }
.log-tag.warn { color: var(--phi-gold); }

/* CHECK TOOL */
.check-tool {
  background: var(--panel-bg);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

.tool-desc { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 1.5rem; }

.input-row { display: flex; gap: 1rem; }

.check-input {
  flex: 1;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: #fff;
  font-family: monospace;
}

.btn-check {
  background: var(--accent-color);
  color: #000;
  border: none;
  padding: 0 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.check-result {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* NODE GRID */
.node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.node-card {
  background: rgba(15, 20, 30, 0.4);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: 8px;
  position: relative;
}

.node-card.online { border-left: 3px solid var(--success-green); }
.node-card.self { background: rgba(0, 210, 255, 0.05); border: 1px solid var(--accent-color); border-left: 3px solid var(--accent-color); }

.node-name { font-size: 0.8rem; font-weight: 700; margin-bottom: 0.5rem; }
.node-freq, .node-rdod { font-size: 0.7rem; color: var(--text-secondary); }
.node-badge { position: absolute; top: 1rem; right: 1rem; font-size: 0.6rem; font-weight: 700; opacity: 0.6; }

/* FOOTER */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 2rem;
  margin-top: 4rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
