/* CalculatorSets.com - Professional Modern Design */

:root {
  /* Modern Color Palette */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary: #059669;
  --accent: #7c3aed;
  
  /* Neutral Colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  
  /* Semantic Colors */
  --text: var(--gray-900);
  --text-light: var(--gray-600);
  --text-muted: var(--gray-500);
  --bg: #ffffff;
  --bg-soft: var(--gray-50);
  --bg-card: #ffffff;
  --border: var(--gray-200);
  --border-light: var(--gray-100);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Spacing */
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  
  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  
  /* Border Radius */
  --rounded-md: 0.375rem;
  --rounded-lg: 0.5rem;
  --rounded-xl: 0.75rem;
  --rounded-2xl: 1rem;
  
  /* Transitions */
  --transition: all 0.15s ease-in-out;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-5xl); font-weight: 800; }
h2 { font-size: var(--text-4xl); font-weight: 700; }
h3 { font-size: var(--text-2xl); font-weight: 600; }
h4 { font-size: var(--text-xl); font-weight: 600; }

p {
  margin-bottom: var(--space-4);
  color: var(--text-light);
  line-height: 1.625;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

ul, ol {
  margin-left: var(--space-6);
  margin-bottom: var(--space-4);
}

li {
  margin-bottom: var(--space-2);
  color: var(--text-light);
}

pre {
  background: var(--bg-soft);
  padding: var(--space-4);
  border-radius: var(--rounded-lg);
  overflow-x: auto;
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (min-width: 640px) {
  .container { padding: 0 var(--space-6); }
}

/* Header */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  color: var(--primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-light);
  transition: var(--transition);
}

.nav a:hover {
  color: var(--primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: var(--text-2xl);
  color: var(--text);
  cursor: pointer;
  padding: var(--space-2);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 4rem;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 40;
}

.mobile-nav.active {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: var(--space-4) var(--space-6);
  color: var(--text);
  font-weight: 500;
  border-bottom: 1px solid var(--border-light);
}

.mobile-nav a:hover {
  background: var(--bg-soft);
  color: var(--primary);
}

@media (max-width: 768px) {
  .nav { display: none; }
  .mobile-menu-btn { display: block; }
}

/* Section */
.section {
  padding: var(--space-20) 0;
}

.section-alt {
  background: var(--bg-soft);
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-16);
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--rounded-xl);
  padding: var(--space-6);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
              0 2px 4px -1px rgba(0, 0, 0, 0.06),
              0 0 0 1px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
              0 10px 10px -5px rgba(0, 0, 0, 0.04),
              0 0 0 1px rgba(37, 99, 235, 0.1);
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.2);
}

/* Category Cards */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}

.category-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--rounded-xl);
  padding: var(--space-8);
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
              0 2px 4px -1px rgba(0, 0, 0, 0.06),
              0 0 0 1px rgba(0, 0, 0, 0.05);
}

.category-card:hover {
  border-color: var(--primary);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
              0 10px 10px -5px rgba(0, 0, 0, 0.04),
              0 0 0 1px rgba(37, 99, 235, 0.15);
  transform: translateY(-6px) scale(1.02);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  display: block;
}

.category-card h3 {
  color: var(--text);
  margin-bottom: var(--space-3);
}

.category-card p {
  color: var(--text-light);
  margin-bottom: var(--space-4);
}

.category-count {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: var(--primary);
  color: white;
  border-radius: var(--rounded-2xl);
  font-size: var(--text-sm);
  font-weight: 600;
}

/* Calculator Cards */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
}

.calc-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--rounded-lg);
  padding: var(--space-6);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.calc-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.calc-card h4 {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.calc-icon {
  font-size: var(--text-2xl);
}

.calc-card p {
  color: var(--text-light);
  font-size: var(--text-sm);
  margin: 0;
}

/* Calculator Page */
.breadcrumb {
  padding: var(--space-4) 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
}

.calc-page {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-4);
}

.calc-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--rounded-xl);
  padding: var(--space-8);
  margin: var(--space-8) 0;
  box-shadow: var(--shadow-sm);
}

.calc-input-group {
  margin-bottom: var(--space-6);
}

.calc-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--text);
  font-size: var(--text-sm);
}

.calc-input {
  width: 100%;
  padding: var(--space-4);
  border: 2px solid var(--border);
  border-radius: var(--rounded-lg);
  font-size: var(--text-lg);
  transition: var(--transition);
  background: var(--bg);
}

.calc-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Result Section - Redesigned */
.result {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--rounded-xl);
  overflow: hidden;
  margin: var(--space-8) 0;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 
              0 4px 6px -2px rgba(0, 0, 0, 0.05),
              0 0 0 1px rgba(37, 99, 235, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.result:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
              0 10px 10px -5px rgba(0, 0, 0, 0.04),
              0 0 0 1px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.result-header {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-header h2 {
  margin: 0;
  color: white;
  font-size: var(--text-xl);
  font-weight: 600;
}

.result-content {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
  padding: var(--space-8);
  text-align: center;
}

.big-number {
  font-size: var(--text-5xl);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: var(--space-4);
  line-height: 1.2;
}

.big-number small {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-light);
  display: block;
  margin-top: var(--space-2);
}

.result-breakdown {
  margin-top: var(--space-6);
  padding: var(--space-4);
  background: white;
  border-radius: var(--rounded-lg);
  border: 1px solid var(--border);
}

.result-breakdown ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.result-breakdown ul.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-4);
}

.result-breakdown li {
  padding: var(--space-3);
  background: var(--bg-soft);
  border-radius: var(--rounded-md);
  font-size: var(--text-sm);
}

.result-breakdown b {
  color: var(--primary);
  font-weight: 600;
}

.actions {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-6);
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  justify-content: center;
}

.actions button {
  flex: 1;
  min-width: 140px;
  padding: var(--space-3) var(--space-5);
  border: none;
  border-radius: var(--rounded-lg);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary, .actions button:first-child {
  background: var(--primary);
  color: white;
}

.btn-primary:hover, .actions button:first-child:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary, .actions button:nth-child(2) {
  background: var(--accent);
  color: white;
}

.btn-secondary:hover, .actions button:nth-child(2):hover {
  background: #6d28d9;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-reset, .actions button.secondary, .actions button:last-child {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-reset:hover, .actions button.secondary:hover, .actions button:last-child:hover {
  background: var(--bg-soft);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Legacy result styles for compatibility */
.calc-result {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: var(--space-8);
  border-radius: var(--rounded-xl);
  text-align: center;
  margin: var(--space-8) 0;
  box-shadow: var(--shadow-lg);
}

.result-value {
  font-size: var(--text-5xl);
  font-weight: 800;
  margin-bottom: var(--space-2);
}

.result-label {
  font-size: var(--text-lg);
  opacity: 0.9;
  font-weight: 500;
}

/* Content Sections */
.content-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--rounded-lg);
  padding: var(--space-8);
  margin: var(--space-8) 0;
}

.content-section h2 {
  margin-bottom: var(--space-6);
}

/* FAQ */
.faq-item {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--rounded-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
}

.faq-item h4 {
  color: var(--text);
  margin-bottom: var(--space-3);
  font-size: var(--text-lg);
}

.faq-item p {
  margin: 0;
  color: var(--text-light);
}

/* Related */
.related {
  margin-top: var(--space-12);
}

.related h3 {
  margin-bottom: var(--space-6);
}

.related-list {
  list-style: none;
  margin: 0;
  display: grid;
  gap: var(--space-3);
}

.related-list li {
  margin: 0;
}

.related-list a {
  display: block;
  padding: var(--space-4);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--rounded-lg);
  transition: var(--transition);
}

.related-list a:hover {
  background: var(--bg-card);
  border-color: var(--primary);
  transform: translateX(4px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--rounded-lg);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-card);
  color: var(--text);
}

.btn:hover {
  background: var(--bg-soft);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: white;
}

.btn-secondary {
  background: var(--bg-soft);
  color: var(--text);
}

.btn-group {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* Footer */
.footer {
  background: var(--gray-900);
  color: white;
  padding: var(--space-16) 0 var(--space-8);
  margin-top: var(--space-20);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer h4 {
  color: white;
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

.footer ul {
  list-style: none;
  margin: 0;
}

.footer ul li {
  margin-bottom: var(--space-2);
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.footer a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

/* Utility Classes */
.mt-lg { margin-top: var(--space-12); }
.mb-lg { margin-bottom: var(--space-12); }
.text-center { text-align: center; }

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  .calc-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--gray-900);
  color: white;
  padding: var(--space-4) var(--space-6);
  border-radius: var(--rounded-lg);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-base);
  font-weight: 500;
  z-index: 10000;
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Card heading styles */
.card h2 {
  margin-bottom: var(--space-6);
  font-size: var(--text-2xl);
  color: var(--text);
}

/* Input Fields */
.field {
  margin-bottom: var(--space-6);
}

.field label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 600;
  color: var(--text);
  font-size: var(--text-base);
}

.field input,
.field select {
  width: 100%;
  padding: var(--space-4);
  border: 2px solid var(--border);
  border-radius: var(--rounded-lg);
  font-size: var(--text-base);
  transition: var(--transition);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap input {
  padding-right: 4rem;
}

.input-wrap .unit {
  position: absolute;
  right: var(--space-4);
  color: var(--text-muted);
  font-weight: 600;
  pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .actions {
    flex-direction: column;
  }
  
  .actions button {
    width: 100%;
    min-width: auto;
  }
  
  .result-breakdown ul.grid {
    grid-template-columns: 1fr;
  }
  
  .big-number {
    font-size: var(--text-4xl);
  }
  
  .toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
  
  /* Reduce shadows on mobile for better performance */
  .card,
  .category-card,
  .result {
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1), 
                0 1px 2px -1px rgba(0, 0, 0, 0.06);
  }
  
  .card:hover,
  .category-card:hover,
  .result:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
  }
  
  .category-card:hover {
    transform: translateY(-3px) scale(1.01);
  }
}

/* Search Box */
.search-box {
  margin-bottom: var(--space-8);
  max-width: 600px;
}

.search-box input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 2px solid var(--border);
  border-radius: var(--rounded-lg);
  font-size: var(--text-base);
  transition: all 0.2s;
  background: var(--bg-card);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%236b7280" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>');
  background-repeat: no-repeat;
  background-position: 16px center;
  background-size: 20px;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%232563eb" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>');
}

.search-box input::placeholder {
  color: var(--text-muted);
}

/* ========================================
   FULL-WIDTH CALCULATOR PAGES
   ======================================== */

/* Full-width container */
.container-full {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.calc-page-header {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin-bottom: var(--space-12);
  padding: var(--space-8);
  background: white;
  border-radius: var(--rounded-xl);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.calc-icon-large {
  font-size: 4rem;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  border-radius: var(--rounded-xl);
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.calc-page-header h1 {
  margin: 0;
  font-size: var(--text-4xl);
  color: var(--text);
}

.calc-subtitle {
  margin: var(--space-2) 0 0 0;
  font-size: var(--text-lg);
  color: var(--text-light);
}

/* Calculator Grid Layout */
.calc-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

/* Main Calculator Column */
.calc-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.calc-section {
  background: white;
  border-radius: var(--rounded-xl);
  padding: var(--space-8);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
              0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-6) 0;
  font-size: var(--text-2xl);
  color: var(--text);
}

.section-icon {
  font-size: 1.5rem;
}

/* Calculator Inputs */
.calc-inputs {
  display: grid;
  gap: var(--space-6);
}

/* Result Display */
.calc-result-section {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
  border: 2px solid rgba(37, 99, 235, 0.1);
}

.calc-result-display {
  background: white;
  border-radius: var(--rounded-lg);
  padding: var(--space-8);
  margin-bottom: var(--space-6);
  text-align: center;
}

.result-main {
  font-size: var(--text-5xl);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: var(--space-4);
  line-height: 1.2;
}

.result-breakdown {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 2px solid var(--border);
}

.result-breakdown ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-4);
}

.result-breakdown li {
  padding: var(--space-3);
  background: var(--bg-soft);
  border-radius: var(--rounded-md);
  font-size: var(--text-sm);
}

.result-breakdown b {
  color: var(--primary);
  font-weight: 600;
}

/* Calculator Actions */
.calc-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border: none;
  border-radius: var(--rounded-lg);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background: var(--accent);
  color: white;
}

.btn-secondary:hover {
  background: #6d28d9;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(124, 58, 237, 0.3);
}

.btn-outline {
  background: white;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  background: var(--bg-soft);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Sidebar */
.calc-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.info-card {
  background: white;
  border-radius: var(--rounded-xl);
  padding: var(--space-6);
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.info-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-4) 0;
  font-size: var(--text-lg);
  color: var(--text);
}

.formula-box,
.example-box {
  background: var(--bg-soft);
  border-radius: var(--rounded-md);
  padding: var(--space-4);
  font-family: 'Courier New', monospace;
  font-size: var(--text-sm);
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.6;
}

.howto-list {
  margin: 0;
  padding-left: var(--space-6);
  color: var(--text-light);
}

.howto-list li {
  margin-bottom: var(--space-3);
  line-height: 1.6;
}

/* FAQ Section */
.faq-section {
  background: white;
  border-radius: var(--rounded-xl);
  padding: var(--space-12) var(--space-8);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.section-title-large {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: 0 0 var(--space-8) 0;
  font-size: var(--text-3xl);
  color: var(--text);
  text-align: center;
  justify-content: center;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}

.faq-item {
  background: var(--bg-soft);
  border-radius: var(--rounded-lg);
  padding: var(--space-6);
  border-left: 4px solid var(--primary);
}

.faq-item h4 {
  margin: 0 0 var(--space-3) 0;
  color: var(--text);
  font-size: var(--text-lg);
}

.faq-item p {
  margin: 0;
  color: var(--text-light);
  line-height: 1.6;
}

/* Responsive Design for Calculator Pages */
@media (max-width: 1024px) {
  .calc-layout {
    grid-template-columns: 1fr;
  }
  
  .calc-sidebar {
    order: 2;
  }
}

@media (max-width: 768px) {
  .calc-page-header {
    flex-direction: column;
    text-align: center;
  }
  
  .calc-icon-large {
    width: 80px;
    height: 80px;
    font-size: 3rem;
  }
  
  .calc-page-header h1 {
    font-size: var(--text-3xl);
  }
  
  .calc-actions {
    grid-template-columns: 1fr;
  }
  
  .faq-grid {
    grid-template-columns: 1fr;
  }
  
  .result-breakdown ul {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   MODERN ACTION BUTTONS
   ======================================== */

.actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border: none;
  border-radius: var(--rounded-lg);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.action-btn svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s;
}

.action-btn:hover svg {
  transform: scale(1.1);
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.action-btn:active::before {
  width: 300px;
  height: 300px;
}

/* Primary Button (Copy) */
.action-btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3),
              0 2px 4px -1px rgba(37, 99, 235, 0.2);
}

.action-btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4),
              0 4px 6px -2px rgba(37, 99, 235, 0.3);
  transform: translateY(-2px);
}

.action-btn-primary:active {
  transform: translateY(0);
}

/* Secondary Button (Share) */
.action-btn-secondary {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(124, 58, 237, 0.3),
              0 2px 4px -1px rgba(124, 58, 237, 0.2);
}

.action-btn-secondary:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
  box-shadow: 0 10px 15px -3px rgba(124, 58, 237, 0.4),
              0 4px 6px -2px rgba(124, 58, 237, 0.3);
  transform: translateY(-2px);
}

.action-btn-secondary:active {
  transform: translateY(0);
}

/* Outline Button (Reset) */
.action-btn-outline {
  background: white;
  color: var(--text);
  border: 2px solid var(--border);
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.action-btn-outline:hover {
  background: var(--bg-soft);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.action-btn-outline:active {
  transform: translateY(0);
}

/* Responsive Button Layout */
@media (max-width: 768px) {
  .actions {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  
  .action-btn {
    width: 100%;
    padding: var(--space-4);
  }
}

@media (max-width: 480px) {
  .action-btn span {
    font-size: var(--text-sm);
  }
  
  .action-btn svg {
    width: 18px;
    height: 18px;
  }
}

/* Button Loading State */
.action-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.action-btn.loading svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Button Success State */
.action-btn.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}
/* ========================================
   COMPLETE BUTTON REDESIGN - SITE WIDE
   ======================================== */

/* Modern Button Base */
button, .btn, .action-btn {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

button:focus, .btn:focus, .action-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Button Ripple Effect */
button::after, .btn::after, .action-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:active::after, .btn:active::after, .action-btn:active::after {
  width: 300px;
  height: 300px;
}

/* Primary Button - Blue Gradient */
.btn-primary, .action-btn-primary, button.primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.4);
}

.btn-primary:hover, .action-btn-primary:hover, button.primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
  box-shadow: 0 6px 20px 0 rgba(37, 99, 235, 0.5);
  transform: translateY(-2px);
}

.btn-primary:active, .action-btn-primary:active, button.primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px 0 rgba(37, 99, 235, 0.3);
}

/* Secondary Button - Purple Gradient */
.btn-secondary, .action-btn-secondary, button.secondary {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(124, 58, 237, 0.4);
}

.btn-secondary:hover, .action-btn-secondary:hover, button.secondary:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #5b21b6 100%);
  box-shadow: 0 6px 20px 0 rgba(124, 58, 237, 0.5);
  transform: translateY(-2px);
}

.btn-secondary:active, .action-btn-secondary:active, button.secondary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px 0 rgba(124, 58, 237, 0.3);
}

/* Success Button - Green Gradient */
.btn-success, button.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.4);
}

.btn-success:hover, button.success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 50%, #065f46 100%);
  box-shadow: 0 6px 20px 0 rgba(16, 185, 129, 0.5);
  transform: translateY(-2px);
}

/* Outline Button */
.btn-outline, .action-btn-outline, button.outline {
  background: white;
  color: var(--text);
  border: 2px solid var(--border);
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.08);
}

.btn-outline:hover, .action-btn-outline:hover, button.outline:hover {
  background: var(--bg-soft);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 4px 12px 0 rgba(37, 99, 235, 0.15);
  transform: translateY(-2px);
}

/* Button Icons */
button svg, .btn svg, .action-btn svg {
  width: 20px;
  height: 20px;
  transition: transform 0.25s;
}

button:hover svg, .btn:hover svg, .action-btn:hover svg {
  transform: scale(1.1);
}

/* Button Sizes */
.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1.125rem 2rem;
  font-size: 1.125rem;
}

/* Button States */
button:disabled, .btn:disabled, .action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

button.loading, .btn.loading, .action-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

button.loading svg, .btn.loading svg, .action-btn.loading svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ========================================
   RESULT SECTION REDESIGN
   ======================================== */

/* Result Container */
.result, #calc-result {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
  margin: 2rem 0;
}

/* Result Header */
.result-header {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  padding: 1.5rem 2rem;
  position: relative;
  overflow: hidden;
}

.result-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.result-header h2 {
  margin: 0;
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

/* Result Content */
.result-content {
  padding: 2.5rem 2rem;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.03) 0%, rgba(139, 92, 246, 0.03) 100%);
}

/* Big Number Display */
.big-number {
  text-align: center;
  margin-bottom: 2rem;
}

#result-main {
  display: block;
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.big-number small {
  display: block;
  font-size: 1.125rem;
  color: var(--text-light);
  font-weight: 600;
  margin-top: 0.5rem;
}

/* Result Breakdown */
.result-breakdown {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
}

.result-breakdown ul, .result-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.result-breakdown li, .result-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1.25rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
  border-radius: 0.5rem;
  border-left: 3px solid #3b82f6;
  transition: all 0.2s;
}

.result-breakdown li:hover, .result-list li:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  transform: translateX(4px);
}

.result-breakdown .label {
  font-weight: 600;
  color: var(--text);
}

.result-breakdown .value {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.125rem;
}

.result-breakdown b {
  color: var(--primary);
  font-weight: 700;
}

/* Actions Section */
.actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  padding: 1.5rem 2rem;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
}

/* Responsive Design */
@media (max-width: 768px) {
  #result-main {
    font-size: 3rem;
  }
  
  .actions {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .result-content {
    padding: 2rem 1.5rem;
  }
  
  .result-breakdown {
    padding: 1.25rem;
  }
  
  .result-breakdown li, .result-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  button, .btn, .action-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  #result-main {
    font-size: 2.5rem;
  }
  
  .result-header h2 {
    font-size: 1.25rem;
  }
  
  button, .btn, .action-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
  }
}

/* Success Animation */
@keyframes successPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.result.success {
  animation: successPulse 0.5s ease-in-out;
}

/* ========================================
   SITE-WIDE SEARCH
   ======================================== */

.search-results {
  background: var(--bg-soft);
  padding: 3rem 0;
  min-height: 400px;
}

.search-results .calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.search-results .calc-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--rounded-lg);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  display: block;
}

.search-results .calc-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 16px -4px rgba(37, 99, 235, 0.2);
  transform: translateY(-4px);
}

.search-results .calc-card h4 {
  margin: 0 0 0.5rem 0;
  color: var(--text);
  font-size: 1.125rem;
}

.search-results .calc-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  text-transform: capitalize;
}

/* Search input focus state */
#search-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}
