
    :root {
      --primary: #3e3f88;
      --primary-dark: #4f46e5;
      --secondary: #502983;
      --accent: #970bf5;
      --danger: #ef4444;
      --warning: #f97316;
      --bg-light: #f8fafc;
      --bg-dark: #162d38;
      --card-light: #ffffff;
      --card-dark: #0c2835;
      --text-light: #1e293b;
      --text-dark: #f1f5f9;
      --border-light: #e2e8f0;
      --border-dark: #334155;
      --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
      --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      line-height: 1.6;
      transition: all 0.3s ease;
      min-height: 100vh;
    }

    body[data-theme='light'] {
      background: linear-gradient(135deg, var(--bg-light) 0%, #e0e7ff 100%);
      color: var(--text-light);
    }

    body[data-theme='dark'] {
      background: linear-gradient(135deg, var(--bg-dark) 0%, #1e1b4b 100%);
      color: var(--text-dark);
    }


    .header-controls {
      display: flex;
      align-items: center;
      gap: 1rem;
    }

/* Flex content */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

/* Controls section */
.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Theme toggle button */
.header-controls .theme-toggle {
  background: rgba(133, 127, 127, 0.226);
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #000000;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}


    .theme-toggle {
      background: var(--primary);
      color: rgb(255, 255, 255);
      border: none;
      padding: 0.5rem;
      border-radius: 50%;
      cursor: pointer;
      transition: all 0.3s ease;
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .theme-toggle:hover {
      background: var(--primary-dark);
      transform: scale(1.1);
    }


    body[data-theme='dark'] nav {
      background: rgba(23, 33, 49, 0.9);
      border-bottom-color: var(--border-dark);
    }


    body[data-theme='dark'] .tab {
      color: black;
    }


    /* Main Content */
    main {
      padding: 2rem;
      max-width: 1200px;
      margin: 0 auto;
    }

    .calculator {
      display: none;
      animation: fadeIn 0.5s ease;
    }

    .calculator.active {
      display: block;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(20px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* Card Styles */
    .card {
      background: var(--card-light);
      border-radius: 16px;
      padding: 2rem;
      box-shadow: var(--shadow);
      border: 1px solid var(--border-light);
      transition: all 0.3s ease;
    }

    body[data-theme='dark'] .card {
      background: var(--card-dark);
      border-color: var(--border-dark);
    }

     @media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    }
    }
    

    /* Form Styles */
    .form-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 1.5rem;
      margin-bottom: 2rem;
    }

    .form-group {
      position: relative;
    }

    .form-group label {
      display: block;
      margin-bottom: 0.5rem;
      font-weight: 600;
      color: var(--text-light);
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    body[data-theme='dark'] .form-group label {
      color: var(--text-dark);
    }

    .form-group input, .form-group select {
      width: 100%;
      padding: 0.75rem 1rem;
      border: 2px solid var(--border-light);
      border-radius: 12px;
      background: var(--card-light);
      color: var(--text-light);
      font-size: 1rem;
      transition: all 0.3s ease;
    }

    body[data-theme='dark'] .form-group input,
    body[data-theme='dark'] .form-group select {
      background: var(--card-dark);
      border-color: var(--border-dark);
      color: var(--text-dark);
    }

    .form-group input:focus, .form-group select:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    }

    /* Button Styles */
    .btn {
      padding: 0.75rem 2rem;
      border: none;
      border-radius: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s ease;
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      text-decoration: none;
      font-size: 1rem;
    }

    .btn-primary {
      background: linear-gradient(135deg, var(--primary), var(--primary-dark));
      color: white;
      box-shadow: var(--shadow);
    }

    .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: var(--shadow-lg);
    }

    .btn-secondary {
      background: var(--secondary);
      color: white;
    }

    .btn-warning {
      background: var(--warning);
      color: white;
    }

    .btn-full {
      width: 100%;
      justify-content: center;
    }

    /* Result Styles */
    .result {
      background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(99, 102, 241, 0.1));
      border: 2px solid var(--secondary);
      border-radius: 16px;
      padding: 2rem;
      margin-top: 2rem;
      animation: slideIn 0.5s ease;
    }

    @keyframes slideIn {
      from { opacity: 0; transform: translateX(-20px); }
      to { opacity: 1; transform: translateX(0); }
    }

    .result-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.75rem 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .result-item:last-child {
      border-bottom: none;
      font-size: 1.2rem;
      font-weight: 700;
      color: var(--secondary);
    }

    /* Chart Styles */
    .chart-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 2rem;
      margin-top: 2rem;
    }

    .chart-card {
      background: var(--card-light);
      border-radius: 16px;
      padding: 1.5rem;
      box-shadow: var(--shadow);
      border: 1px solid var(--border-light);
    }

    body[data-theme='dark'] .chart-card {
      background: var(--card-dark);
      border-color: var(--border-dark);
    }

    .chart-card h3 {
      margin-bottom: 1rem;
      color: var(--primary);
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    /* Stats Grid */
    .stats-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 1rem;
      margin-bottom: 2rem;
    }

    .stat-card {
      background: linear-gradient(135deg, var(--primary), var(--primary-dark));
      color: white;
      padding: 1.5rem;
      border-radius: 16px;
      text-align: center;
      box-shadow: var(--shadow);
      transition: all 0.3s ease;
    }

    .stat-card:hover {
      transform: translateY(-4px);
    }

    .stat-card .stat-value {
      font-size: 2rem;
      font-weight: 700;
      margin-bottom: 0.5rem;
    }

    .stat-card .stat-label {
      opacity: 0.9;
      font-size: 0.9rem;
    }

    /* Coming Soon Styles */
    .coming-soon {
      text-align: center;
      padding: 4rem 2rem;
      background: var(--card-light);
      border-radius: 16px;
      box-shadow: var(--shadow);
      border: 1px solid var(--border-light);
    }

    body[data-theme='dark'] .coming-soon {
      background: var(--card-dark);
      border-color: var(--border-dark);
    }

    .coming-soon i {
      font-size: 4rem;
      color: var(--primary);
      margin-bottom: 1rem;
    }

    .coming-soon h2 {
      color: var(--primary);
      margin-bottom: 1rem;
    }

    /* Responsive Design */
    @media (max-width: 768px) {
      .header-content {
        padding: 0 1rem;
      }
      
      .nav-container {
        padding: 0 1rem;
      }
      
      main {
        padding: 1rem;
      }
      
      .form-grid {
        grid-template-columns: 1fr;
      }
      
      .chart-grid {
        grid-template-columns: 1fr;
      }
      
      .chart-card {
        min-width: unset;
      }
    }

    /* Loading Animation */
    .loading {
      display: inline-block;
      width: 20px;
      height: 20px;
      border: 3px solid rgba(255, 255, 255, 0.3);
      border-radius: 50%;
      border-top-color: white;
      animation: spin 1s ease-in-out infinite;
    }

    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    /* Tooltip */
    .tooltip {
      position: relative;
      cursor: help;
    }

    .tooltip::after {
      content: attr(data-tooltip);
      position: absolute;
      bottom: 125%;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(0, 0, 0, 0.9);
      color: white;
      padding: 0.5rem;
      border-radius: 6px;
      font-size: 0.8rem;
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s;
      z-index: 1000;
    }

    .tooltip:hover::after {
      opacity: 1;
    }
    /* Navigation wrapper */
nav {
  position: relative;
  top: auto;
  z-index: 900;
  background: var(--card-light);
  border-bottom: 1px solid var(--border-light);
  padding: 0.75rem 1rem;
}

body[data-theme='dark'] nav {
  background: var(--card-dark);
  border-bottom-color: var(--border-dark);
}


/* Nav container */

.nav-container {
  display: flex;
  justify-content: space-between; /* tabs left, button right */
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
  padding: 0 0.5rem;
}

/* Tab buttons (pill shape) */

.tab {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  border-radius: 999px;
  background: #f1f1f1;
  border: none;
  cursor: pointer;
}

.tab.active {
  background: var(--primary);
  color: #fff;
}


/* Icon in tabs */
.tab i {
  font-size: 1rem;
  opacity: 0.7;
}

/* Hover effect */
.tab:hover {
  background: #f5c0c0;
  transform: translateY(-2px);
}

/* Active tab */
.tab.active {
  background: linear-gradient(135deg, #5f028a, #ff005d);
  color: #000000;
  box-shadow: 0 3px 10px rgba(229,46,113,0.3);
}

h2 {
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, #5f028a, #ff005d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

}

h2  {
  color: #ff8800;        /* Icon remains solid orange */
  font-size: 1.4rem;
  transition: transform 0.3s ease;
}



 i {
  color: #ff7300; /* accent color for icon */
  font-size: 1.4rem;
  transition: transform 0.3s ease;
}

.card{}

.btn-primary.btn-full {
  width: 100%;
  padding: 0.75rem 1rem;
   background: linear-gradient(135deg, #5f028a, #ff005d);
           /* Orange background */
  color: #fff;                    /* White text */
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-primary.btn-full i {
  font-size: 1rem;
}

/* Hover effect */
.btn-primary.btn-full:hover {
  background: linear-gradient(#ff005d,#5f028a);            /* Darker orange on hover */
  transform: translateY(-2px);
}

/* Active click effect */
.btn-primary.btn-full:active {
  transform: scale(0.98);
}



@media (max-width: 768px) {
  header {
    padding: 0.6rem 0.8rem;
  }

  .logo {
    font-size: 1.2rem;
  }

}
 


@media (max-width: 768px) {
  .nav-container {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .tab {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    white-space: nowrap;
  }
}


.theme-toggle-nav {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 1rem;
}

.theme-toggle-nav:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
