 * {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
 }

 body {
     font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
     line-height: 1.6;
     color: #333;
     background: linear-gradient(135deg, #2d5016, #4a7c59);
     min-height: 100vh;
 }

 .container {
     max-width: 1200px;
     margin: 0 auto;
     padding: 20px;
 }

 .header {
     text-align: center;
     margin-bottom: 40px;
     color: white;
 }

 h1 {
     font-size: 2.5em;
     margin-bottom: 10px;
     text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
 }

 .subtitle {
     font-size: 1.2em;
     opacity: 0.9;
 }

 .main-content {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
     gap: 30px;
 }

 .calculator-section {
     background: white;
     padding: 30px;
     border-radius: 15px;
     box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
 }

 h2 {
     color: #2d5016;
     margin-bottom: 20px;
     font-size: 1.8em;
     border-bottom: 3px solid #4a7c59;
     padding-bottom: 10px;
 }

 .form-group {
     margin-bottom: 20px;
 }

 label {
     display: block;
     margin-bottom: 8px;
     font-weight: 600;
     color: #4a5568;
 }

 input,
 select {
     width: 100%;
     padding: 12px;
     border: 2px solid #e2e8f0;
     border-radius: 8px;
     font-size: 16px;
     transition: border-color 0.3s ease, box-shadow 0.3s ease;
 }

 input:focus,
 select:focus {
     outline: none;
     border-color: #4a7c59;
     box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
 }

 .help-text {
     font-size: 0.85em;
     color: #718096;
     margin-top: 5px;
     font-style: italic;
 }

 .calculate-btn {
     width: 100%;
     padding: 15px;
     background: linear-gradient(135deg, #2d5016, #4a7c59);
     color: white;
     border: none;
     border-radius: 10px;
     font-size: 1.1em;
     font-weight: 600;
     cursor: pointer;
     transition: all 0.3s ease;
     text-transform: uppercase;
     letter-spacing: 1px;
 }

 .calculate-btn:hover {
     transform: translateY(-2px);
     box-shadow: 0 8px 25px rgba(45, 80, 22, 0.3);
 }

 .calculate-btn:disabled {
     opacity: 0.6;
     cursor: not-allowed;
     transform: none;
 }

 .info-box {
     background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
     border: 2px solid #0ea5e9;
     border-radius: 10px;
     padding: 15px;
     margin: 15px 0;
     font-size: 0.95em;
 }

 .error-message {
     background: linear-gradient(135deg, #fef2f2, #fee2e2);
     border: 2px solid #ef4444;
     color: #dc2626;
     border-radius: 8px;
     padding: 12px;
     margin: 10px 0;
     font-weight: 500;
 }

 .results-section {
     background: linear-gradient(135deg, #f0fdf4, #dcfce7);
     border: 2px solid #22c55e;
     border-radius: 15px;
     padding: 25px;
     margin-top: 20px;
 }

 .result-value {
     font-size: 2.5em;
     font-weight: bold;
     color: #2d5016;
     text-align: center;
     margin: 20px 0;
     text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
 }

 /* Enhanced Two-Stage Rate Toggle */
 .toggle-container {
     background: linear-gradient(135deg, #f8fafc, #f1f5f9);
     padding: 20px;
     border-radius: 12px;
     border: 2px solid #e2e8f0;
     transition: all 0.3s ease;
 }

 .toggle-container:hover {
     border-color: #4a7c59;
     box-shadow: 0 5px 15px rgba(74, 124, 89, 0.1);
 }

 .toggle-switch {
     display: flex;
     align-items: center;
     gap: 15px;
     margin-bottom: 10px;
 }

 .toggle-switch input[type="checkbox"] {
     display: none;
 }

 .toggle-label {
     display: flex;
     align-items: center;
     gap: 15px;
     cursor: pointer;
     font-weight: 600;
     color: #4a5568;
     font-size: 1.1em;
 }

 .toggle-slider {
     position: relative;
     width: 60px;
     height: 30px;
     background: #cbd5e0;
     border-radius: 15px;
     transition: all 0.3s ease;
 }

 .toggle-slider::before {
     content: '';
     position: absolute;
     top: 3px;
     left: 3px;
     width: 24px;
     height: 24px;
     background: white;
     border-radius: 50%;
     transition: all 0.3s ease;
     box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
 }

 #dual-rate-enable:checked+.toggle-label .toggle-slider {
     background: linear-gradient(135deg, #2d5016, #4a7c59);
 }

 #dual-rate-enable:checked+.toggle-label .toggle-slider::before {
     transform: translateX(30px);
 }

 #dual-rate-enable:checked+.toggle-label .toggle-text {
     color: #2d5016;
 }

 #dual-rate-controls {
     background: linear-gradient(135deg, rgba(74, 124, 89, 0.08), rgba(45, 80, 22, 0.05));
     padding: 25px;
     border-radius: 12px;
     margin: 20px 0;
     border: 2px solid rgba(74, 124, 89, 0.2);
     box-shadow: 0 5px 15px rgba(74, 124, 89, 0.1);
     transition: all 0.3s ease;
 }

 #dual-rate-controls h4 {
     color: #2d5016;
     margin-bottom: 15px;
     font-size: 1.2em;
     padding-bottom: 8px;
     border-bottom: 2px solid rgba(74, 124, 89, 0.3);
 }

 .graph-legend {
     display: flex;
     flex-wrap: wrap;
     gap: 15px;
     margin: 20px 0;
     padding: 15px;
     background: #f8fafc;
     border-radius: 8px;
 }

 .legend-item {
     display: flex;
     align-items: center;
     gap: 8px;
     font-size: 0.9em;
 }

 .legend-color {
     width: 20px;
     height: 3px;
     border-radius: 2px;
 }

 @media (max-width: 768px) {
     .main-content {
         grid-template-columns: 1fr;
         gap: 20px;
     }
 }