/* Custom styles and Tailwind CSS utility enhancements for Scientific Calculator */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-cyan: #06b6d4;
  --accent-indigo: #6366f1;
}

body {
  font-family: 'Inter', sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

.font-mono-math {
  font-family: 'Fira Code', monospace;
}

/* Glassmorphism card effects */
.glass-panel {
  background: rgba(30, 41, 59, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.light-theme .glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

/* Button hover & active tactile animations */
.calc-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.calc-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.12);
}

.calc-btn:active {
  transform: translateY(1px) scale(0.97);
  filter: brightness(0.95);
}

/* Custom scrollbars for history */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

/* Cursor pulse effect for active input */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.animate-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background-color: #38bdf8;
  vertical-align: middle;
  margin-left: 2px;
  animation: blink 1s infinite;
}

/* Glow effects */
.glow-accent {
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

.glow-btn {
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

/* Light Theme Overrides */
body.light-theme {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

body.light-theme .text-slate-100,
body.light-theme .text-slate-200,
body.light-theme .text-slate-300 {
  color: #1e293b !important;
}

body.light-theme .text-slate-400,
body.light-theme .text-slate-500 {
  color: #64748b !important;
}

body.light-theme .bg-slate-900 {
  background-color: #f8fafc !important;
}

body.light-theme .bg-slate-800\/60 {
  background-color: rgba(241, 245, 249, 0.8) !important;
}

body.light-theme .bg-slate-800 {
  background-color: #e2e8f0 !important;
}

body.light-theme .bg-slate-700 {
  background-color: #cbd5e1 !important;
}

body.light-theme .bg-slate-700\/50 {
  background-color: rgba(203, 213, 225, 0.5) !important;
}

body.light-theme .border-slate-700,
body.light-theme .border-slate-800 {
  border-color: #cbd5e1 !important;
}
