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

/* ===== CSS Variables (Design Tokens) ===== */
:root {
  --bg-primary: #0a0a1a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --bg-input: rgba(255, 255, 255, 0.06);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 255, 255, 0.15);
  --text-primary: #f0f0f5;
  --text-secondary: #9a9ab0;
  --text-muted: #5e5e7a;
  --accent-1: #7c3aed;
  --accent-2: #a855f7;
  --accent-3: #6366f1;
  --accent-gradient: linear-gradient(135deg, #7c3aed, #a855f7, #6366f1);
  --accent-glow: rgba(124, 58, 237, 0.35);
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.15);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== Professional Background ===== */
.bg-animation {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Dot grid pattern — like Vercel / Linear */
.bg-animation::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 80%);
}

/* Subtle noise grain */
.bg-animation::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* Ambient glow orbs — subtle, professional */
.bg-animation .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
  will-change: transform;
}

.bg-animation .orb:nth-child(1) {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.25), transparent 70%);
  top: -20%;
  left: -10%;
  animation: ambientDrift1 30s ease-in-out infinite;
}

.bg-animation .orb:nth-child(2) {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18), transparent 70%);
  top: 40%;
  right: -15%;
  animation: ambientDrift2 35s ease-in-out infinite;
}

.bg-animation .orb:nth-child(3) {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.15), transparent 70%);
  bottom: -15%;
  left: 25%;
  animation: ambientDrift3 28s ease-in-out infinite;
}

.bg-animation .orb:nth-child(4) {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.12), transparent 70%);
  top: 20%;
  left: 45%;
  animation: ambientDrift1 32s ease-in-out infinite reverse;
}

/* Spotlight effect at top center */
.bg-spotlight {
  position: fixed;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 80vh;
  background: radial-gradient(ellipse 50% 50% at 50% 0%, rgba(124, 58, 237, 0.12) 0%, rgba(99, 102, 241, 0.05) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Horizontal glow line under navbar */
.bg-glow-line {
  position: fixed;
  top: 65px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.3), rgba(168, 85, 247, 0.4), rgba(99, 102, 241, 0.3), transparent);
  z-index: 0;
  pointer-events: none;
  filter: blur(0.5px);
}

@keyframes ambientDrift1 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(30px, -20px); }
  66% { transform: translate(-20px, 15px); }
}

@keyframes ambientDrift2 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-25px, 20px); }
  66% { transform: translate(15px, -25px); }
}

@keyframes ambientDrift3 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(20px, 15px); }
  66% { transform: translate(-15px, -20px); }
}

/* ===== App Container ===== */
.app-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Header / Navbar ===== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: rgba(10, 10, 26, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  box-shadow: 0 4px 15px var(--accent-glow);
  transition: transform var(--transition-spring);
}

.logo-icon:hover {
  transform: rotate(-10deg) scale(1.1);
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
}

.nav-links li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.nav-links li a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-fast);
  border-radius: inherit;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--text-primary);
  border-color: var(--border-glass-hover);
  background: var(--bg-card);
}

.nav-links li a.active::before {
  opacity: 0.1;
}

.nav-links li a .nav-icon {
  font-size: 18px;
  transition: transform var(--transition-spring);
}

.nav-links li a:hover .nav-icon {
  transform: scale(1.2);
}

/* Mobile menu button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.menu-toggle:hover {
  background: var(--bg-card);
}

/* ===== Main Content ===== */
.main-content {
  flex: 1;
  padding: 40px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* ===== Hero Section ===== */
.hero {
  text-align: center;
  padding: 60px 20px 40px;
  animation: fadeInUp 0.8s ease-out;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero h1 .gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== Tool Section ===== */
.tool-section {
  display: none;
  animation: fadeInUp 0.5s ease-out;
}

.tool-section.active {
  display: block;
}

.section-header {
  text-align: center;
  margin-bottom: 36px;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* ===== Glass Card ===== */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-smooth);
}

.glass-card:hover {
  border-color: var(--border-glass-hover);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  background: var(--bg-card-hover);
}

/* ===== Home Page Tool Grid ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.tool-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.tool-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glass-hover);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.tool-card:hover::before {
  opacity: 0.06;
}

.tool-card .card-icon {
  font-size: 44px;
  margin-bottom: 18px;
  display: block;
  position: relative;
  z-index: 1;
  transition: transform var(--transition-spring);
}

.tool-card:hover .card-icon {
  transform: scale(1.15) translateY(-4px);
}

.tool-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.tool-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* ===== Calculator ===== */
.calculator-wrapper {
  max-width: 400px;
  margin: 0 auto;
}

.calc-display {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
  text-align: right;
  overflow: hidden;
}

.calc-expression {
  font-size: 14px;
  color: var(--text-muted);
  min-height: 22px;
  margin-bottom: 6px;
  word-break: break-all;
}

.calc-result {
  font-size: 42px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -1px;
  transition: all var(--transition-fast);
  word-break: break-all;
}

.calc-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.calc-btn {
  padding: 18px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.calc-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity 0.15s;
}

.calc-btn:active::after {
  opacity: 0.08;
}

.calc-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass-hover);
  transform: scale(1.04);
}

.calc-btn.operator {
  background: rgba(124, 58, 237, 0.15);
  color: var(--accent-2);
  border-color: rgba(124, 58, 237, 0.2);
}

.calc-btn.operator:hover {
  background: rgba(124, 58, 237, 0.25);
}

.calc-btn.equals {
  background: var(--accent-gradient);
  color: white;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.calc-btn.equals:hover {
  box-shadow: 0 6px 25px var(--accent-glow);
  transform: scale(1.04);
}

.calc-btn.clear {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.calc-btn.clear:hover {
  background: rgba(239, 68, 68, 0.2);
}

.calc-btn.span-2 {
  grid-column: span 2;
}

/* ===== Notes Maker ===== */
.notes-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.notes-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-bottom: none;
}

.toolbar-btn {
  padding: 8px 12px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: 'Inter', sans-serif;
}

.toolbar-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-glass-hover);
}

.toolbar-btn.active {
  background: rgba(124, 58, 237, 0.15);
  color: var(--accent-2);
  border-color: rgba(124, 58, 237, 0.3);
}

.notes-title-input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-glass);
  border-top: none;
  border-bottom: none;
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  outline: none;
  letter-spacing: -0.5px;
}

.notes-title-input::placeholder {
  color: var(--text-muted);
}

.notes-editor {
  width: 100%;
  min-height: 400px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-glass);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  line-height: 1.8;
  outline: none;
  resize: vertical;
  overflow-y: auto;
}

.notes-editor:focus {
  border-color: var(--border-glass-hover);
  box-shadow: var(--shadow-glow);
}

.notes-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.notes-list-section {
  margin-top: 40px;
}

.notes-list-section h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.saved-notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.saved-note-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.saved-note-card:hover {
  border-color: var(--border-glass-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.saved-note-card h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saved-note-card .note-preview {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.saved-note-card .note-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 10px;
}

.saved-note-card .note-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ===== Converter Sections ===== */
.converter-wrapper {
  max-width: 700px;
  margin: 0 auto;
}

.upload-zone {
  border: 2px dashed var(--border-glass-hover);
  border-radius: var(--radius-lg);
  padding: 50px 30px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.upload-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.upload-zone.disabled {
  pointer-events: none;
  opacity: 0.4;
  filter: grayscale(1);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent-2);
  background: rgba(124, 58, 237, 0.05);
}

.upload-zone:hover::before,
.upload-zone.drag-over::before {
  opacity: 0.04;
}

.upload-zone .upload-icon {
  font-size: 52px;
  display: block;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  transition: transform var(--transition-spring);
}

.upload-zone:hover .upload-icon {
  transform: translateY(-6px) scale(1.1);
}

.upload-zone h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.upload-zone p {
  font-size: 13px;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

.upload-zone input[type="file"] {
  display: none;
}

/* Preview area */
.preview-area {
  margin-top: 24px;
  display: none;
}

.preview-area.has-files {
  display: block;
  animation: fadeInUp 0.4s ease-out;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.preview-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  aspect-ratio: 1;
  background: rgba(0, 0, 0, 0.2);
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-item .remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.85);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.preview-item:hover .remove-btn {
  opacity: 1;
}

/* PDF pages preview */
.pdf-pages-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.pdf-page-item {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-smooth);
}

.pdf-page-item:hover {
  border-color: var(--border-glass-hover);
  transform: translateY(-3px);
}

.pdf-page-item canvas {
  width: 100%;
  display: block;
}

.pdf-page-item .page-label {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
  box-shadow: 0 6px 25px var(--accent-glow);
  transform: translateY(-2px);
}

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

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass-hover);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== Status / Toast Messages ===== */
.status-msg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
}

.status-msg.success {
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.08);
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: rgba(20, 20, 40, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 14px;
  box-shadow: var(--shadow-card);
  animation: slideInRight 0.4s ease-out;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.success { border-color: rgba(16, 185, 129, 0.3); }
.toast.error { border-color: rgba(239, 68, 68, 0.3); }

/* ===== Progress Bar ===== */
.progress-bar-wrapper {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 16px;
  display: none;
}

.progress-bar-wrapper.active {
  display: block;
}

.progress-bar {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

/* ===== Spinner ===== */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent-2);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 24px 40px;
  border-top: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 13px;
  background: rgba(10, 10, 26, 0.4);
  backdrop-filter: blur(10px);
}

.footer a {
  color: var(--accent-2);
  text-decoration: none;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .navbar {
    padding: 12px 20px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 16px;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    gap: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .main-content {
    padding: 20px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 15px;
  }

  .section-header h2 {
    font-size: 24px;
  }

  .glass-card {
    padding: 20px;
  }

  .calc-result {
    font-size: 32px;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 26px;
  }

  .calc-buttons {
    gap: 8px;
  }

  .calc-btn {
    padding: 14px;
    font-size: 16px;
  }
}

/* ===== Utility ===== */
.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mt-sm { margin-top: 12px; }
.mt-md { margin-top: 24px; }
.mt-lg { margin-top: 40px; }
.mb-sm { margin-bottom: 12px; }
.mb-md { margin-bottom: 24px; }
.text-center { text-align: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.14);
}
