/* General Reset */
body, h1, h2, h3, p, ul, ol, li, form, input, button, select, textarea, a {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
  }
  
  /* Body Styling with Pattern */
  body {
    /* Base background color */
    background-color: #f4f4f4;
    
    /* Rotated squares pattern with gradient overlay */
    background-image: 
        linear-gradient(to bottom, rgba(244, 244, 244, 0.8) 0%, rgba(255, 255, 255, 1) 100%),
        linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0),
        linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    background-position: 0 0, 0 0, 20px 20px;
    background-attachment: fixed;
    
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
  }
  
  /* Navigation Bar */
  header {
    background-color: #414758;
    color: white;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  }
  
  nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  nav ul {
    display: flex;
    list-style: none;
  }
  
  nav ul li {
    margin-right: 2rem;
  }
  
  nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    padding: 0.5rem;
  }
  
  nav ul li a:hover {
    color: #D8C3A5;
  }
  
  .user-welcome {
    color: white;
    font-weight: bold;
  }
  
  /* Main Content */
  main {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 1rem;
    background: transparent;
  }
  
  .main-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background: transparent;
  }
  
  /* Converter Container Styling */
  .converter-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 1.5rem;
    position: relative;
  }
  
  .converter-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6C567B, #9A8C98, #6C567B);
    opacity: 0.7;
  }
  
  .converter-container h2 {
    color: #333;
    margin-bottom: 0.5rem;
    text-align: center;
  }
  
  .subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
  }
  
  /* Form Styling */
  .converter-form {
    max-width: 600px;
    margin: 0 auto;
  }
  
  .form-group {
    margin-bottom: 1rem;
  }
  
  .form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
  }
  
  .form-row .form-group {
    flex: 1;
    margin-bottom: 0;
  }
  
  .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
  }
  
  .form-group input,
  .form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fafafa;
  }
  
  .form-group input:focus,
  .form-group select:focus {
    border-color: #9A8C98;
    outline: none;
    box-shadow: 0 0 0 3px rgba(154, 140, 152, 0.2);
    background-color: white;
  }
  
  /* Button Styling */
  .primary-button {
    background: #9A8C98;
    color: white;
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .primary-button:hover {
    background: #6C567B;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  
  .primary-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  /* Results Styling */
  .result-box {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 1rem;
    text-align: center;
    font-weight: bold;
  }
  
  .results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
  }
  
  .result-grid-item {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.8rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
  }
  
  .result-grid-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  }
  
  .currency-code {
    font-weight: bold;
    color: #414758;
  }
  
  .currency-value {
    font-size: 1.1rem;
    margin-top: 0.3rem;
  }
  
  /* Tax Calculator Styling */
  .tax-rate-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .tax-presets {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  
  .tax-preset-btn {
    background: #e0e0e0;
    border: none;
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .tax-preset-btn:hover {
    background: #d0d0d0;
  }
  
  .tax-preset-btn.active {
    background: #9A8C98;
    color: white;
  }
  
  .result-grid {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 1rem;
    margin-top: 1rem;
  }
  
  .result-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
  }
  
  .result-item:last-child {
    border-bottom: none;
  }
  
  .result-item.total {
    font-weight: bold;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 2px solid #ccc;
  }
  
  .result-label {
    color: #555;
  }
  
  /* Exchange Rates Styling */
  .rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
  }
  
  .rates-grid div {
    background: #f9f9f9;
    padding: 0.6rem;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #e0e0e0;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
  }
  
  .rates-grid div:hover {
    transform: translateY(-2px);
    background: #f0f0f0;
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .form-row {
      flex-direction: column;
      gap: 1rem;
    }
    
    .results-grid,
    .rates-grid {
      grid-template-columns: 1fr 1fr;
    }
    
    nav {
      flex-direction: column;
      align-items: flex-start;
    }
    
    nav ul {
      margin-bottom: 0.5rem;
    }
    
    .user-welcome {
      align-self: flex-end;
      margin-top: -2rem;
    }
  }
  
  @media (max-width: 480px) {
    .results-grid,
    .rates-grid {
      grid-template-columns: 1fr;
    }
  }

  /* Footer Styling */
.footer {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    font-size: 0.85rem;
    color: #666;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    border-top: 1px solid #e0e0e0;
  }
  
  .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
  }
  
  .copyright {
    margin-bottom: 0.5rem;
    font-weight: 500;
  }
  
  .footer-note {
    font-size: 0.8rem;
    color: #888;
  }
  
  @media (max-width: 768px) {
    .copyright {
      font-size: 0.8rem;
    }
    
    .footer-note {
      font-size: 0.75rem;
    }
  }