/* DemonScraper Main Styles */
:root {
  /* Color Variables */
  --bg-dark: #111111;
  --bg-pattern: radial-gradient(circle at 20% 80%, rgba(0, 191, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(50, 205, 50, 0.05) 0%, transparent 50%);
  --card: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.1);
  --text: #e6ecff;
  --muted: #aedeec;
  --electric-blue: #00BFFF;
  --magenta: #FF00FF;
  --lime: #32CD32;
  --glow: 0 0 40px rgba(124, 158, 255, 0.35);
}

/* Reset and Base Styles */
* { 
  box-sizing: border-box; 
}

html { 
  scroll-behavior: smooth;
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', 'Source Code Pro', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg-dark);
  background-image: var(--bg-pattern);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Glass Effect Utility */
.glass-effect {
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
}

/* Text Gradients */
.text-gradient {
  background: linear-gradient(135deg, var(--electric-blue), var(--magenta), var(--lime));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation Styles */
.nav-link {
  transition: all 0.3s ease;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--electric-blue) !important;
}

/* Button Styles */
.btn {
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--lime);
  color: var(--bg-dark);
}

.btn-primary:hover {
  background: #28a745;
  transform: translateY(-2px);
}

.btn-outline {
  border: 2px solid var(--electric-blue);
  color: var(--electric-blue);
  background: transparent;
}

.btn-outline:hover {
  background: var(--electric-blue);
  color: white;
}

/* Workflow Run Button - Inline with nav buttons */
#workflow-run-button {
  background: linear-gradient(135deg, #28a745, #20c997);
  border: none;
  color: white;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  font-size: 0.9rem;
  height: auto;
  min-height: 36px;
}

#workflow-run-button:hover {
  background: linear-gradient(135deg, #218838, #1ea588);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
  color: white;
}

#workflow-run-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

/* Loading state */
#workflow-run-button.loading {
  background: linear-gradient(135deg, #6c757d, #5a6268);
  cursor: not-allowed;
  pointer-events: none;
}

#workflow-run-button.loading i {
  animation: spin 1s linear infinite;
}

/* Success state */
#workflow-run-button.success {
  background: linear-gradient(135deg, #28a745, #20c997);
  animation: pulse-success 0.6s ease;
}

/* Error state */
#workflow-run-button.error {
  background: linear-gradient(135deg, #dc3545, #c82333);
  animation: shake 0.6s ease;
}

/* Animations */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse-success {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Card Styles */
.card {
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 15px;
  padding: 25px;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Disable hover lift for modal cards only */
.modal-card:hover {
  transform: none;
  box-shadow: none;
}

/* Prevent background scroll when any modal is open */
body.modal-open {
  overflow: hidden;
}

/* Pricing Card Styles */
.pricing-card {
  transition: all 0.3s ease;
}

.pricing-card:hover {
  transform: translateY(-10px);
}

.pricing-card.featured {
  border: 2px solid var(--electric-blue);
  transform: scale(1.05);
}

/* Animation Classes */
.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite alternate;
}

.animate-fade-in-up {
  animation: fade-in-up 0.8s ease-out forwards;
}

.animate-pulse-glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

/* Keyframes */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes glow {
  0% { box-shadow: 0 0 20px rgba(0, 191, 255, 0.5); }
  100% { box-shadow: 0 0 40px rgba(0, 191, 255, 0.8); }
}

@keyframes fade-in-up {
  0% { opacity: 0; transform: translateY(50px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 30px rgba(50, 205, 50, 0.3); }
  50% { box-shadow: 0 0 60px rgba(50, 205, 50, 0.6); }
}

/* Scroll Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Use Case Cards */
.use-case-card {
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.use-case-card:hover {
  transform: translateY(-10px) scale(1.05);
}

.use-case-card .node-graph {
  position: relative;
  width: 200px;
  height: 150px;
  margin: 0 auto;
}

.node {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--electric-blue);
  box-shadow: 0 0 10px rgba(0, 191, 255, 0.8);
}

.connection {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, rgba(0, 191, 255, 0.8), rgba(255, 0, 255, 0.8));
  border-radius: 1px;
}

/* Form Styles */
.form-field {
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 500;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  transition: border-color 0.3s ease;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--electric-blue);
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }
  
  .card {
    padding: 20px;
  }
  
  .btn {
    padding: 10px 20px;
  }
  
  .use-case-card .node-graph {
    width: 150px;
    height: 100px;
  }
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 2.5rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 2.5rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 2.5rem; }

/* Profile Button Styles */
.profile-circle {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(128, 128, 128, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.profile-circle:hover {
  background: rgba(128, 128, 128, 0.9);
  transform: translateY(-1px);
}

.profile-circle.authenticated {
  background: var(--lime);
  box-shadow: 0 0 10px rgba(50, 205, 50, 0.4);
}

.profile-circle.authenticated:hover {
  background: #28a428;
  box-shadow: 0 0 15px rgba(50, 205, 50, 0.6);
}

.profile-circle i {
  font-size: 16px;
  color: white;
}

/* User Profile Dropdown Menu */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(17, 17, 17, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  min-width: 200px;
  opacity: 0;
  transform: translateY(-10px);
  visibility: hidden;
  transition: all 0.3s ease;
  overflow: hidden;
}

.profile-dropdown.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.profile-dropdown-header {
  padding: 16px 16px 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-dropdown-email {
  color: var(--lime);
  font-weight: 500;
  font-size: 14px;
  word-break: break-all;
  margin: 0;
}

.profile-dropdown-menu {
  padding: 8px 0;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
}

.profile-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.profile-dropdown-item.logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.profile-dropdown-item i {
  width: 16px;
  margin-right: 10px;
  font-size: 14px;
}

/* Dashboard center nav paddle (workflow page only) */
.dashboard-nav-paddle {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: 10vw; /* ~10% of viewport width */
  min-width: 140px;
  max-width: 240px;
  background: linear-gradient(160deg, rgba(200,200,200,0.25), rgba(120,120,120,0.35));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08);
  clip-path: polygon(8% 0%, 92% 0%, 100% 100%, 0% 100%);
  cursor: pointer;
  z-index: 20;
}

.dashboard-nav-paddle:hover {
  background: linear-gradient(160deg, rgba(220,220,220,0.28), rgba(140,140,140,0.4));
}

.dashboard-nav-paddle a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  color: #e6ecff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.dashboard-nav-paddle::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.08), transparent);
  pointer-events: none;
}

/* Social Proof Animation */
.social-proof {
  animation: scroll 20s linear infinite;
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
