/* -----------------------------------------------------------
   Cresco — Cinematic Premium UI
   Colors, Glow, Panels, Spacing, Mobile-first responsive
------------------------------------------------------------ */

:root {
  --bg: #04100a;
  --panel: #062113;
  --panel-soft: rgba(8, 45, 24, 0.6);
  --panel-glow: rgba(39, 224, 106, 0.15);

  --primary: #27e06a;
  --primary-soft: rgba(39, 224, 106, 0.5);
  --text: #eafbee;
  --muted: #8bbd9a;

  --radius: 14px;
  --shadow: 0 0 30px rgba(39, 224, 106, 0.12);
  --transition: 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Inter, Arial, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* -----------------------------------------------------------
   Header
------------------------------------------------------------ */

.site-header {
  width: 100%;
  padding: 20px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6, 33, 19, 0.35);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.site-header.small {
  padding: 15px 25px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 42px;
  height: 42px;
}

.brand-name {
  font-size: 20px;
  font-weight: 600;
}

.nav-link {
  margin-right: 18px;
  color: var(--muted);
  text-decoration: none;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--primary);
}

.auth .btn {
  margin-left: 10px;
}

/* -----------------------------------------------------------
   Buttons
------------------------------------------------------------ */

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.btn.primary {
  background: var(--primary);
  color: #04100a;
  box-shadow: 0 0 12px rgba(39, 224, 106, 0.5);
}

.btn.primary:hover {
  background: #31ff81;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

.btn.ghost:hover {
  background: var(--primary-soft);
}

/* -----------------------------------------------------------
   Hero Section
------------------------------------------------------------ */

.cinematic .hero {
  position: relative;
  width: 100%;
  padding: 120px 20px;
  text-align: center;
  overflow: hidden;
}

.hero-visual {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  opacity: 0.18;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-title {
  font-size: 60px;
  font-weight: 700;
  color: var(--primary);
  text-shadow: 0 0 18px rgba(39, 224, 106, 0.4);
  animation: fadein 1.2s ease;
}

.hero-sub {
  color: var(--muted);
  margin-top: 10px;
  font-size: 20px;
}

/* -----------------------------------------------------------
   Panels and UI blocks
------------------------------------------------------------ */

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 25px;
  box-shadow: var(--shadow);
}

.cinematic-panel {
  background: var(--panel-soft);
  border: 1px solid rgba(39, 224, 106, 0.15);
  backdrop-filter: blur(10px);
}

.side-panel {
  background: rgba(6, 33, 19, 0.45);
  border: 1px solid rgba(255,255,255,0.05);
}

.container {
  width: 95%;
  max-width: 1200px;
  margin: auto;
  padding-top: 20px;
}

.feature-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 20px;
}

/* -----------------------------------------------------------
   Auth Pages
------------------------------------------------------------ */

.auth-page {
  padding-top: 40px;
}

.auth-panel input,
.auth-panel textarea,
.auth-panel select {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  margin-bottom: 15px;
  border: none;
  outline: none;
  background: #0a2919;
  color: var(--text);
}

.form-actions {
  display: flex;
  gap: 12px;
}

/* -----------------------------------------------------------
   Dashboard
------------------------------------------------------------ */

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 30px;
  margin-top: 20px;
}

.metric-card {
  background: rgba(6, 33, 19, 0.55);
  padding: 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metric-value {
  font-size: 22px;
  color: var(--primary);
  margin-top: 5px;
}

.nodes-table {
  width: 100%;
  margin-top: 20px;
  border-spacing: 0 10px;
}

.nodes-table td, .nodes-table th {
  padding: 12px 14px;
  background: #062113;
  border-radius: var(--radius);
}

/* -----------------------------------------------------------
   Switch (Sim / Real toggle)
------------------------------------------------------------ */

.switch {
  width: 58px;
  height: 28px;
  border-radius: 30px;
  background: #0b3320;
  border: 1px solid var(--primary-soft);
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}

.switch .knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  transition: var(--transition);
}

.switch.active {
  background: var(--primary);
}

.switch.active .knob {
  left: 32px;
  background: #04100a;
}

/* -----------------------------------------------------------
   Modal
------------------------------------------------------------ */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
}

.modal.show {
  display: flex;
}

.modal-inner {
  width: 90%;
  max-width: 400px;
  background: #062113;
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal-close {
  float: right;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
}

/* -----------------------------------------------------------
   Footer
------------------------------------------------------------ */

.site-footer {
  text-align: center;
  padding: 25px;
  margin-top: 40px;
  color: var(--muted);
}

/* -----------------------------------------------------------
   Animations
------------------------------------------------------------ */

@keyframes fadein {
  from { opacity: 0; transform: translateY(20px) }
  to { opacity: 1; transform: translateY(0) }
}

/* -----------------------------------------------------------
   Mobile Responsive
------------------------------------------------------------ */

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .hero-title {
    font-size: 42px;
  }
}
