* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top, #0f172a, #020617);
  color: #e5e7eb;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "DevTrackr";
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(120px, 18vw, 260px);
  font-weight: 900;
  color: rgba(249, 115, 22, 0.08); /* transparent orange */
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  letter-spacing: 8px;
  text-transform: uppercase;
}

body.app .left-panel {
  display: none;
}

body.app .page {
  min-height: 100vh;
  display: block;
}

body.app .right-panel {
  width: 100%;
  padding: 48px 64px;
  box-sizing: border-box;
}

/* Animated background */
.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float 15s ease-in-out infinite;
}

.orb-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #3b82f6, transparent);
  top: -50px;
  right: -50px;
  animation-delay: 0s;
}

.orb-2 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, #8b5cf6, transparent);
  bottom: 100px;
  left: 50px;
  animation-delay: 3s;
}

.orb-3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, #06b6d4, transparent);
  top: 50%;
  left: 50%;
  animation-delay: 6s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(-50px, -80px) scale(1.1);
  }
  66% {
    transform: translate(60px, 50px) scale(0.9);
  }
}

/* Common layout */
.page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

/* Left branding panel */
.left-panel {
  flex: 1;
  padding: 48px;
  background: linear-gradient(135deg, #020617, #0b1120);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.left-content {
  max-width: 420px;
}

.left-panel h1 {
  font-size: 52px;
  font-weight: 900;
  background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 50%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  letter-spacing: 2px;
  animation: fadeInScale 0.8s ease-out;
}

.left-panel h1 span {
  color: inherit;
}

.left-panel p {
  max-width: 360px;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 32px;
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.feature-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  background: rgba(148, 163, 184, 0.05);
  border-left: 3px solid #38bdf8;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: rgba(148, 163, 184, 0.1);
  border-left-color: #f97316;
  transform: translateX(4px);
}

.feature-icon {
  font-size: 24px;
  min-width: 24px;
}

.feature-text {
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 500;
}

/* Right content panel */
.right-panel {
  flex: 1;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
}

.card {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  animation: slideUp 0.6s ease-out;
}

.card.wide {
  max-width: 980px;
}

/* UI polish: stronger typography and section visuals */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h2 {
  display: flex;
  align-items: center;
  gap: 12px;
}

h2::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 28px;
  background: linear-gradient(180deg, #3b82f6, #f97316);
  border-radius: 6px;
}

h3 {
  font-size: 18px;
  color: #e6eef8;
  margin-bottom: 10px;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.top-nav a {
  color: #cbd5e1;
  margin-left: 12px;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.top-nav a:hover {
  background: rgba(59,130,246,0.06);
  color: #fff;
}

.top-nav a.active {
  background: linear-gradient(90deg, rgba(59,130,246,0.14), rgba(14,165,233,0.06));
  color: #e6f6ff;
  font-weight: 700;
}

.card > div, .card > section, .card > p {
  margin-bottom: 24px;
}

.hint {
  background: rgba(2,6,23,0.35);
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
}

label {
  color: #a6b3c7;
  font-weight: 600;
}

input, textarea, select {
  transition: all 0.3s ease;
}

input:focus, textarea:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
}

select:focus {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.badge {
  background: linear-gradient(90deg, rgba(14,165,233,0.12), rgba(59,130,246,0.08));
  color: #bfe9ff;
}

.grid > div {
  background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.00));
  padding: 20px;
  border-radius: 12px;
}

/* Improve empty state */
.no-logs-empty {
  color: #9aa9bd;
  font-style: italic;
  padding: 10px 0;
}

/* make buttons crisper */
.btn-primary {
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.12);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.3);
  background: linear-gradient(135deg, #2563eb, #0284c7);
}

.btn-primary:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.2);
}

.btn-secondary {
  border: 1px solid rgba(148,163,184,0.18);  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(148, 163, 184, 0.2);
  border-color: rgba(148, 163, 184, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(148, 163, 184, 0.15);}

.card.wide { padding: 28px 32px; }

/* Enhanced animations and transitions */
.feature-item {
  animation: fadeInUp 0.5s ease-out backwards;
}

.feature-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2) { animation-delay: 0.2s; }
.feature-item:nth-child(3) { animation-delay: 0.3s; }

.top-nav {
  animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Headings */
h1, h2, h3 {
  margin-top: 0;
}

h2 {
  font-size: 32px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 6px;
}

h3 {
  font-size: 20px;
  color: #e5e7eb;
  margin-bottom: 8px;
}

.card-header {
  margin-bottom: 24px;
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(8, 182, 212, 0.2));
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #0ea5e9;
  margin-bottom: 16px;
  animation: fadeInDown 0.8s ease-out;
}

.badge-accent {
  color: #f97316;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 0;
}

.subtitle {
  font-size: 14px;
  color: #cbd5e1;
  margin-bottom: 28px;
  line-height: 1.6;
}

/* Form elements */
label {
  font-size: 13px;
  color: #cbd5e1;
  font-weight: 500;
  display: block;
  margin-bottom: 6px;
}

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

input,
textarea,
select,
button {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.6);
  color: #e5e7eb;
  font-size: 14px;
  transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #38bdf8;
  background: rgba(2, 6, 23, 0.8);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

input::placeholder,
textarea::placeholder {
  color: #64748b;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #0ea5e9);
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.3s ease;
  margin-top: 12px;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.3);
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.3s ease;
  margin-top: 12px;
}

.btn-secondary:hover {
  background: rgba(148, 163, 184, 0.2);
  border-color: rgba(148, 163, 184, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(148, 163, 184, 0.2);
}

button.danger {
  background: #b91c1c;
}

/* Button row */
.button-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.button-row button {
  flex: 1;
}

/* Small text */
.hint {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 12px;
  margin-bottom: 0;
  text-align: center;
  font-style: italic;
}

/* Animation keyframes */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
  50% { box-shadow: 0 0 30px rgba(59, 130, 246, 0.5); }
}

@keyframes slideIn {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Lists */
ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  max-height: 260px;
  overflow-y: auto;
  font-size: 13px;
}

li {
  border-bottom: 1px solid #111827;
  padding: 6px 0;
}

.log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid #0f172a;
  transition: all 0.2s ease;
  border-radius: 8px;
  animation: fadeInUp 0.3s ease;
}

.log-item:hover {
  background: rgba(59, 130, 246, 0.08);
  transform: translateX(4px);
}

.log-left {
  color: #e5e7eb;
  flex: 1;
}

.log-delete-btn {
  background: transparent;
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.15);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.25s ease;
}

.log-delete-btn:hover {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.4);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(248, 113, 113, 0.2);
}

/* Chart + layout */
.grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .page {
    flex-direction: column;
  }
  .left-panel {
    padding: 24px 20px 16px;
  }
  .right-panel {
    padding: 20px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}

/* Playground output */
pre {
  background: #020617;
  padding: 10px;
  border-radius: 10px;
  max-height: 220px;
  overflow: auto;
  font-size: 13px;
  white-space: pre-wrap;
}

/* Playground editor styling */
.playground-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.select-inline {
  background: rgba(2,6,23,0.6);
  color: #e5e7eb;
  border: 1px solid rgba(148,163,184,0.12);
  padding: 8px 10px;
  border-radius: 8px;
}

.code-editor {
  width: 100%;
  min-height: 180px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, 'Roboto Mono', monospace;
  font-size: 13px;
  line-height: 1.5;
  background: rgba(2, 6, 23, 0.9);
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.08);
  padding: 12px;
  border-radius: 12px;
  resize: vertical;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.code-output {
  background: rgba(2, 6, 23, 0.95);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.06);
  padding: 12px;
  border-radius: 10px;
  min-height: 80px;
  white-space: pre-wrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

/* Top nav on app pages */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.top-nav a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 13px;
  margin-left: 12px;
}

.top-nav a.active {
  color: #38bdf8;
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  font-size: 11px;
  margin-bottom: 6px;
}