/* ============================================
   ForWebBinX Design System — Enhanced
   ============================================ */

/* --- Reset & Base --- */
html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }

/* --- Custom Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #00d2ff; }

/* --- Brand Gradient Text --- */
.brand-gradient {
  background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-gradient-bg {
  background: linear-gradient(135deg, #00d2ff, #3a7bd5);
}

/* --- Glass Card --- */
.glass-card {
  background: rgba(26, 26, 46, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 210, 255, 0.1);
  border-radius: 1rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 210, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 210, 255, 0.1);
}

/* --- Standard Card Glow --- */
.card-glow {
  background: #1a1a2e;
  border: 1px solid rgba(0, 210, 255, 0.08);
  border-radius: 0.75rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card-glow:hover {
  transform: translateY(-4px);
  border-color: #00d2ff;
  box-shadow: 0 0 25px rgba(0, 210, 255, 0.12);
}

/* --- Tool Card (homepage grid) --- */
.tool-card {
  background: linear-gradient(145deg, rgba(26,26,46,0.8), rgba(17,24,39,0.9));
  border: 1px solid rgba(0, 210, 255, 0.06);
  border-radius: 0.75rem;
  padding: 1.25rem;
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
}
.tool-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(0, 210, 255, 0.3);
  box-shadow: 0 12px 30px -8px rgba(0, 210, 255, 0.15);
  background: linear-gradient(145deg, rgba(26,26,46,0.95), rgba(17,24,39,1));
}

/* --- Ad Container --- */
.ad-slot {
  background: #111827;
  border-radius: 0.5rem;
  padding: 1rem;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.05);
}

/* --- Result Box --- */
.result-box {
  background: linear-gradient(135deg, #16213e, #1a1a2e);
  border: 1px solid rgba(0, 210, 255, 0.2);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-top: 1rem;
}

/* --- Glowing Border Animation --- */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(0, 210, 255, 0.1); }
  50% { box-shadow: 0 0 25px rgba(0, 210, 255, 0.2); }
}
.glow-border {
  animation: glow-pulse 3s ease-in-out infinite;
}

/* --- Fade In Animation --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fadeInUp 0.5s ease forwards;
}
.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }

/* --- Section Title --- */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #00d2ff, #3a7bd5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* --- Numpad / Calculator --- */
.numpad-btn {
  transition: all 0.1s ease;
  user-select: none;
}
.numpad-btn:active {
  transform: scale(0.92);
}
.calc-display {
  animation: fadeInUp 0.2s ease;
}

#sci-row { display: none; }
@media (orientation: landscape) {
  #sci-row { display: grid !important; }
  #mode-badge-landscape { display: inline-block !important; }
}

/* --- Modern Button --- */
.btn-primary {
  background: linear-gradient(135deg, #00d2ff, #3a7bd5);
  color: white;
  padding: 0.625rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 210, 255, 0.25);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(0, 210, 255, 0.08);
  color: #00d2ff;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid rgba(0, 210, 255, 0.2);
  cursor: pointer;
}
.btn-secondary:hover {
  background: rgba(0, 210, 255, 0.15);
  border-color: rgba(0, 210, 255, 0.4);
}

/* --- Navigation --- */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #00d2ff, #3a7bd5);
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* --- Footer --- */
.site-footer {
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.4));
  border-top: 1px solid rgba(0, 210, 255, 0.05);
  padding: 3rem 1rem 2rem;
  margin-top: 4rem;
}

/* --- Input / Textarea styling --- */
input, textarea, select {
  background: #1a1a2e !important;
  border: 1px solid rgba(0, 210, 255, 0.15) !important;
  border-radius: 0.5rem !important;
  color: #e5e7eb !important;
  padding: 0.625rem 1rem !important;
  transition: border-color 0.2s ease !important;
}
input:focus, textarea:focus, select:focus {
  border-color: #00d2ff !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.1) !important;
}

/* --- Skeleton loading --- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, #1a1a2e 25%, #2a2a3e 50%, #1a1a2e 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 0.5rem;
}

/* --- Hero Section --- */
.hero-section {
  position: relative;
  overflow: hidden;
  padding: 4rem 1rem;
  text-align: center;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(0,210,255,0.03) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(58,123,213,0.03) 0%, transparent 50%);
  pointer-events: none;
}

/* --- Badge --- */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(0, 210, 255, 0.1);
  color: #00d2ff;
  border: 1px solid rgba(0, 210, 255, 0.2);
}

/* --- Divider --- */
.divider-gradient {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,210,255,0.2), transparent);
  border: none;
  margin: 2rem 0;
}

/* --- Responsive grid helper --- */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

/* --- Stat / metric display --- */
.stat-value {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #00d2ff, #3a7bd5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.875rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}
