/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-gradient: radial-gradient(circle at 50% 50%, #0d0b26 0%, #04020a 100%);
  --panel-bg: rgba(20, 17, 43, 0.45);
  --panel-border: rgba(255, 255, 255, 0.06);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --primary-accent: #6366f1;
  --primary-accent-hover: #4f46e5;
  --cyan-accent: #38bdf8;
  --danger-accent: #ef4444;
  --success-accent: #10b981;
  --neon-glow: rgba(99, 102, 241, 0.15);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  position: relative;
}

/* SaaS Grid Mesh Overlay */
body::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 50px 50px;
  background-position: center;
  pointer-events: none;
  z-index: 0;
}

/* Ensure content stays above the grid background */
header, main, footer {
  position: relative;
  z-index: 1;
}

/* Header & Navigation */
header {
  border-bottom: 1px solid var(--panel-border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(4, 2, 10, 0.7);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  background: linear-gradient(135deg, var(--cyan-accent) 0%, var(--primary-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 25px;
  align-items: center;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* Main Container */
main {
  flex: 1;
  max-width: 1200px;
  margin: 50px auto;
  padding: 0 30px;
  width: 100%;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 100px 0 70px;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.8rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -1.5px;
  background: linear-gradient(135deg, var(--text-primary) 20%, #a5b4fc 50%, var(--cyan-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 45px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-accent) 0%, var(--primary-accent-hover) 100%);
  color: white;
  padding: 14px 32px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  font-size: 0.95rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
  filter: brightness(1.1);
}

/* Form Container */
.form-card {
  background: var(--panel-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--panel-border);
  padding: 45px;
  border-radius: 24px;
  max-width: 440px;
  margin: 50px auto;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.05);
  animation: floatIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.form-card h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
  text-align: center;
  letter-spacing: -0.5px;
}

.form-card p.subtitle {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 30px;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-accent);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

/* Dashboard Styles */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-top: 30px;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.card {
  background: var(--panel-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--panel-border);
  padding: 35px;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.03);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45), 0 0 50px var(--neon-glow);
}

.card h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.status-badge.online {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-accent);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.offline {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-accent);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-badge.online .dot {
  background: var(--success-accent);
  box-shadow: 0 0 10px var(--success-accent);
  animation: pulse 1.8s infinite;
}

.status-badge.offline .dot {
  background: var(--danger-accent);
}

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

/* Link Box */
.link-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 15px 0;
  word-break: break-all;
  gap: 15px;
}

.link-box span {
  font-family: 'Outfit', monospace;
  font-size: 0.95rem;
  color: var(--cyan-accent);
  font-weight: 500;
}

/* Code Container (Terminal Aesthetic) */
.code-block-container {
  position: relative;
  background: #05030f;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 48px 20px 20px 20px;
  margin-top: 15px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* Terminal Window Header Controls */
.code-block-container::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 20px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 18px 0 0 #f59e0b, 36px 0 0 #10b981;
}

/* Add a subtle terminal title label */
.code-block-container::after {
  content: "terminal";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: monospace;
  opacity: 0.5;
}

.code-block {
  font-family: 'Outfit', monospace;
  color: #a7f3d0;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 0.9rem;
  line-height: 1.5;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 15px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 5;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Messages & Alerts */
.alert {
  padding: 14px 20px;
  border-radius: 12px;
  margin-bottom: 25px;
  font-size: 0.95rem;
  font-weight: 500;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
}

/* Horizontal Rule */
hr {
  border: 0;
  border-top: 1px solid var(--panel-border);
}

/* Footer */
footer {
  text-align: center;
  padding: 35px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-top: 1px solid var(--panel-border);
  margin-top: auto;
  background: rgba(4, 2, 10, 0.4);
}
