/* XIRR Calculator - Premium Edition */

.page-title {
  font-size: 32px;
  margin-bottom: 10px;
  font-weight: 700;
  background: linear-gradient(135deg, #9200C5 0%, #A020D0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  color: #555;
  margin-bottom: 25px;
  font-size: 16px;
  font-weight: 400;
}

.calc-card {
  background: #fff;
  border: 1px solid #E8E4EC;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.calc-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 40px;
}

/* INPUTS */
.input-group {
  margin-bottom: 25px;
}

.input-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 14px;
  color: #666;
  text-transform: capitalize;
}

.frequency-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.radio-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 12px;
  border: 2px solid #E8E4EC;
  border-radius: 20px;
  transition: all 0.2s ease;
  font-size: 14px;
}

.radio-option input[type="radio"] {
  margin-right: 6px;
  accent-color: #40E0D0;
}

.radio-option:has(input:checked) {
  border-color: #40E0D0;
  background: rgba(64, 224, 208, 0.1);
  color: #40E0D0;
  font-weight: 600;
}

input[type="date"] {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #E8E4EC;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.2s ease;
  color: #333;
  font-family: inherit;
  background: #fff;
  cursor: pointer;
}

input[type="date"]:focus {
  outline: none;
  border-color: #40E0D0;
  box-shadow: 0 0 0 3px rgba(64, 224, 208, 0.15);
}

input[type="date"]:hover {
  border-color: #40E0D0;
  background: rgba(64, 224, 208, 0.02);
}

/* Custom date picker calendar styling - Modern Design */
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  width: 20px;
  height: 20px;
  filter: invert(46%) sepia(73%) saturate(1250%) hue-rotate(248deg);
  transition: all 0.2s ease;
  opacity: 0.7;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  filter: invert(67%) sepia(94%) saturate(2527%) hue-rotate(146deg);
  opacity: 1;
  transform: scale(1.1);
}

/* Modern Calendar Dropdown Styling */
input[type="date"]::-webkit-datetime-edit {
  padding: 0;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

input[type="date"]::-webkit-datetime-edit-text {
  color: #999;
  padding: 0 2px;
}

input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
  color: #333;
  font-weight: 500;
}

input[type="date"]::-webkit-datetime-edit-month-field:focus,
input[type="date"]::-webkit-datetime-edit-day-field:focus,
input[type="date"]::-webkit-datetime-edit-year-field:focus {
  background: rgba(64, 224, 208, 0.1);
  color: #40E0D0;
  outline: none;
  border-radius: 3px;
}

.input-with-icon {
  position: relative;
}

.rupee-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  font-size: 15px;
  font-weight: 600;
}

.input-with-icon input[type="text"] {
  width: 100%;
  padding: 12px 12px 12px 35px;
  border: 2px solid #E8E4EC;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.2s ease;
  background: #fff;
  font-weight: 500;
  color: #333;
}

.input-with-icon input[type="text"]:focus {
  outline: none;
  border-color: #40E0D0;
  box-shadow: 0 0 0 3px rgba(64, 224, 208, 0.15);
}

.input-with-icon input[type="text"]:hover {
  border-color: #40E0D0;
  background: rgba(64, 224, 208, 0.02);
}

/* RESULTS */
.xirr-result {
  background: linear-gradient(135deg, rgba(64, 224, 208, 0.1) 0%, rgba(72, 212, 196, 0.15) 100%);
  border: 2px solid #40E0D0;
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  margin-bottom: 30px;
}

.result-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
  font-weight: 600;
}

.result-value {
  font-size: 48px;
  font-weight: 700;
  color: #40E0D0;
}

.wealth-projection {
  margin-bottom: 30px;
}

.wealth-projection h4 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
}

.chart-container {
  height: 300px;
  position: relative;
}

.chart-container canvas {
  max-height: 300px;
}

.result-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.result-box {
  background: #f9f9f9;
  padding: 16px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid #E8E4EC;
  transition: all 0.2s ease;
}

.result-box:hover {
  border-color: #40E0D0;
  transform: translateY(-2px);
}

.result-box span {
  font-size: 12px;
  color: #666;
  font-weight: 500;
  display: block;
}

.result-box strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, #9200C5 0%, #A020D0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* SEO */
section {
  margin-top: 40px;
  line-height: 1.7;
}

section h2 {
  font-size: 24px;
  margin-bottom: 16px;
  font-weight: 600;
  background: linear-gradient(135deg, #9200C5 0%, #A020D0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

section p {
  color: #444;
  margin-bottom: 14px;
}

section ul {
  margin-left: 20px;
  color: #444;
}

section ul li {
  margin-bottom: 10px;
}

/* FAQ */
.faq-section {
  margin-top: 40px;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #E8E4EC;
}

.faq-section h2 {
  font-size: 24px;
  margin-bottom: 20px;
  font-weight: 600;
  background: linear-gradient(135deg, #9200C5 0%, #A020D0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* RELATED CALCULATORS SECTION */
.related-calculators {
  margin-top: 60px;
  padding: 40px 30px;
  background: linear-gradient(135deg, rgba(103, 76, 196, 0.03) 0%, rgba(64, 224, 208, 0.03) 100%);
  border-radius: 16px;
  border: 1px solid #E8E4EC;
}

.related-calculators h2 {
  font-size: 28px;
  margin-bottom: 8px;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(135deg, #9200C5 0%, #A020D0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.related-subtitle {
  text-align: center;
  color: #666;
  font-size: 15px;
  margin-bottom: 30px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.related-card {
  background: #fff;
  border: 1px solid #E8E4EC;
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.related-card:hover {
  transform: translateY(-4px);
  border-color: #40E0D0;
  box-shadow: 0 6px 20px rgba(64, 224, 208, 0.15);
}

.related-icon {
  font-size: 40px;
  margin-bottom: 12px;
  filter: grayscale(20%);
  transition: all 0.3s ease;
}

.related-card:hover .related-icon {
  transform: scale(1.15);
  filter: grayscale(0%);
}

.related-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #9200C5;
  transition: color 0.2s ease;
}

.related-card:hover h3 {
  color: #40E0D0;
}

.related-card p {
  font-size: 14px;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

.related-cta {
  text-align: center;
  padding-top: 10px;
}

.btn-all-calculators {
  display: inline-block;
  padding: 12px 28px;
  background: linear-gradient(135deg, #9200C5 0%, #A020D0 100%);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border-radius: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(103, 76, 196, 0.25);
}

.btn-all-calculators:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(103, 76, 196, 0.35);
}

/* MOBILE */
@media (max-width: 1024px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-title {
    font-size: 28px;
  }

  .result-cards {
    grid-template-columns: 1fr;
  }

  .result-value {
    font-size: 36px;
  }

  .frequency-options {
    flex-direction: column;
  }

  .radio-option {
    width: 100%;
  }
  
  .related-calculators {
    padding: 30px 20px;
    margin-top: 40px;
  }
  
  .related-calculators h2 {
    font-size: 24px;
  }
  
  .related-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .related-card {
    padding: 20px;
  }
  
  .related-icon {
    font-size: 36px;
  }
}

/* Smooth animations */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}