/* Premium Futuristic Stylesheet */
:root {
  --bg: #09090e;
  --bg-gradient: radial-gradient(circle at 50% 50%, #151128 0%, #08070d 100%);
  --accent-primary: #8b5cf6;     /* Purple glow */
  --accent-primary-hover: #a78bfa;
  --accent-secondary: #06b6d4;   /* Cyan glow */
  --card-bg: rgba(255, 255, 255, 0.03);
  --border-color: rgba(255, 255, 255, 0.07);
  --text: #f3f4f6;
  --text-muted: #9ca3af;
  --panel-blur: blur(24px);
  --neon-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
  --cyan-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
  --danger: #ef4444;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  padding: 2rem;
}

/* Backlighting Glow Effect */
.glow-bg {
  position: absolute;
  top: 10%;
  left: 25%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(60px);
}

.container {
  width: 100%;
  max-width: 1200px;
  z-index: 10;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 2.5rem;
}

/* Logo Container Branding */
.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.church-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  line-height: 24px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

h1 {
  font-size: 2.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 40%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-muted);
  font-weight: 300;
  font-size: 1.1rem;
}

/* Glassmorphic Grid */
.grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2rem;
}

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

.card {
  border-radius: 20px;
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass {
  background: var(--card-bg);
  backdrop-filter: var(--panel-blur);
  -webkit-backdrop-filter: var(--panel-blur);
}

.card:hover {
  border-color: rgba(139, 92, 246, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.flex-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

/* Inputs and Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

input, select, textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}

input::placeholder, textarea::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

select option {
  background-color: #12101e;
  color: #fff;
}

/* Buttons */
button {
  width: 100%;
  padding: 1rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}

#submitBtn {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #7c3aed 100%);
  color: #fff;
  margin-top: 1rem;
  box-shadow: var(--neon-shadow);
}

#submitBtn:hover {
  background: linear-gradient(135deg, var(--accent-primary-hover) 0%, var(--accent-primary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
}

#submitBtn:active {
  transform: translateY(0);
}

.action-footer {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

.btn-group {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--text);
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.btn-cyan {
  background: linear-gradient(135deg, var(--accent-secondary) 0%, #0891b2 100%);
  color: #fff;
  box-shadow: var(--cyan-shadow);
}

.btn-cyan:hover {
  background: linear-gradient(135deg, #22d3ee 0%, var(--accent-secondary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.6);
}

/* Worker Cards */
.worker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.worker-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.2rem;
  transition: all 0.3s ease;
}

.worker-card.active {
  border-color: var(--accent-primary);
  background: rgba(139, 92, 246, 0.03);
}

.worker-card.active-cyan {
  border-color: var(--accent-secondary);
  background: rgba(6, 182, 212, 0.03);
}

.worker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

.badge-primary {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-primary-hover);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-secondary {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-indicator.idle {
  background-color: var(--text-muted);
}

.status-indicator.running {
  background-color: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: blink 1.2s infinite;
}

@keyframes blink {
  50% { opacity: 0.4; }
}

h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.worker-task {
  font-size: 0.85rem;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Progress Section */
.progress-section {
  margin-bottom: 1.5rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
  transition: width 0.4s ease;
}

/* Console Section */
.console-section {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 220px;
}

.console-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
}

.btn-clear {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: inherit;
  font-family: inherit;
  padding: 0;
  cursor: pointer;
  width: auto;
}

.btn-clear:hover {
  color: #fff;
}

.console-body {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #a7f3d0;  /* Cool terminal green */
  overflow-y: auto;
  flex-grow: 1;
  text-align: left;
  line-height: 1.5;
}

.console-line {
  margin-bottom: 0.35rem;
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  transition: opacity 0.25s ease;
}

.modal.hidden {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  border-radius: 16px;
  border: 1px solid var(--border-color);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  white-space: pre-line;
}

.modal-content h3 {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 1rem;
}

.modal-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.modal-content button {
  background: var(--accent-primary);
  color: #fff;
  width: auto;
  padding: 0.6rem 1.8rem;
  border-radius: 8px;
}
