:root {
  --bg-dark: #090D16;
  --card-bg: rgba(18, 24, 38, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --accent-blue: #3B82F6;
  --accent-purple: #8B5CF6;
  --accent-emerald: #10B981;
  --accent-amber: #F59E0B;
  --text-main: #F3F4F6;
  --text-muted: #9CA3AF;
  --terminal-bg: #050811;
  --radius-lg: 18px;
  --radius-md: 12px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}

/* Background Ambient Glows */
.glow-bg {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.28;
}

.glow-1 {
  width: 500px;
  height: 500px;
  top: -100px;
  left: 10%;
  background: radial-gradient(circle, var(--accent-purple), transparent 70%);
}

.glow-2 {
  width: 600px;
  height: 600px;
  bottom: -150px;
  right: 5%;
  background: radial-gradient(circle, var(--accent-blue), transparent 70%);
}

/* Navigation Tabs */
.tabs-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  z-index: 1;
  position: relative;
}

.tab-btn {
  background: rgba(18, 24, 38, 0.7);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.tab-btn.active {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.5);
  color: #60a5fa;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.25);
}

.container {
  width: 100%;
  max-width: 980px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* App Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 8px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.temple-badge {
  font-size: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #FFFFFF 30%, #93C5FD 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
}

.badges-group {
  display: flex;
  gap: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  color: #34D399;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10B981;
  animation: pulse 2s infinite;
}

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

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  padding: 28px;
}

.action-card {
  background: linear-gradient(145deg, rgba(26, 35, 55, 0.8), rgba(16, 22, 36, 0.8));
  border: 1px solid rgba(139, 92, 246, 0.2);
  position: relative;
  overflow: hidden;
}

.action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-purple), var(--accent-blue), transparent);
}

.tag-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FBBF24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.action-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.action-header h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
}

.desc {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 600px;
  line-height: 1.5;
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, #6366F1, #3B82F6);
  color: #FFFFFF;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(99, 102, 241, 0.5);
  background: linear-gradient(135deg, #4F46E5, #2563EB);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-icon {
  font-size: 18px;
}

/* Progress Bar */
.progress-container {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  transition: var(--transition);
}

.progress-container.hidden {
  display: none;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366F1, #3B82F6, #10B981);
  border-radius: 10px;
  transition: width 0.4s ease;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.metric-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

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

.metric-icon {
  font-size: 28px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
  border-radius: var(--radius-md);
}

.metric-data {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-title {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.metric-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

/* Terminal Card */
.terminal-card {
  background: var(--terminal-bg);
  border-color: rgba(255, 255, 255, 0.05);
  padding: 0;
  overflow: hidden;
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

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

.dot-red { background-color: #EF4444; }
.dot-yellow { background-color: #F59E0B; }
.dot-green { background-color: #10B981; }

.terminal-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
}

.btn-clear {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.btn-clear:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.terminal-body {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 16px 20px;
  min-height: 160px;
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.6;
}

.log-line {
  color: #D1D5DB;
}

.log-line.info { color: #60A5FA; }
.log-line.success { color: #34D399; }
.log-line.warning { color: #FBBF24; }
.log-line.error { color: #F87171; }

/* Footer */
.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sheet-link {
  color: #60A5FA;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.sheet-link:hover {
  color: #93C5FD;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .app-header { flex-direction: column; align-items: flex-start; }
  .action-header { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; justify-content: center; }
}
