/* Enhanced Calculator UI with Vector Line Art Style */
:root {
  --calc-primary: #74893e;
  --calc-secondary: #5a6b30;
  --calc-success: #10b981;
  --calc-warning: #f59e0b;
  --calc-danger: #ef4444;
  --calc-info: #06b6d4;
  --calc-light: #f8fafc;
  --calc-dark: #1e293b;
  --calc-gradient-1: linear-gradient(135deg, #74893e 0%, #5a6b30 100%);
  --calc-gradient-2: linear-gradient(135deg, #74893e 0%, #8fa653 100%);
  --calc-gradient-3: linear-gradient(135deg, #5a6b30 0%, #74893e 100%);
  --calc-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --calc-shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Vector Icon Styles */
.vector-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vector-icon::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid currentColor;
  border-radius: 20px;
  opacity: 0.1;
  transform: rotate(45deg);
}

.vector-icon i {
  font-size: 2.5rem;
  z-index: 1;
  position: relative;
}

/* Enhanced Card Styles */
.calc-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: var(--calc-shadow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
  z-index: 10;
  margin-bottom: 2rem;
}

.calc-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--calc-gradient-1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.calc-card:hover::before {
  opacity: 1;
}

.calc-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--calc-shadow-lg);
}

.calc-header {
  background: rgba(255, 255, 255, 1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 30px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.calc-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: var(--calc-gradient-1);
  border-radius: 1px;
}

.calc-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--calc-dark);
  margin: 0 0 8px 0;
  letter-spacing: -0.025em;
}

.calc-subtitle {
  color: #64748b;
  font-size: 0.95rem;
  margin: 0;
  font-weight: 400;
}

/* Enhanced Form Styles */
.calc-form {
  padding: 30px;
}

.form-group-enhanced {
  margin-bottom: 24px;
  position: relative;
}

.form-label-enhanced {
  font-weight: 600;
  color: var(--calc-dark);
  margin-bottom: 8px;
  font-size: 0.9rem;
  letter-spacing: 0.025em;
  display: block;
}

.form-control-enhanced {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.form-control-enhanced:focus {
  outline: none;
  border-color: var(--calc-primary);
  box-shadow: 0 0 0 4px rgba(116, 137, 62, 0.1);
  background: rgba(255, 255, 255, 0.95);
}

.form-select-enhanced {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 48px;
}

/* Enhanced Button Styles */
.btn-calc {
  padding: 16px 32px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-transform: none;
  letter-spacing: 0.025em;
}

.btn-calc::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-calc:hover::before {
  left: 100%;
}

.btn-calc-primary {
  background: var(--calc-gradient-1);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(116, 137, 62, 0.3);
}

.btn-calc-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px 0 rgba(116, 137, 62, 0.4);
}

/* Result Cards */
.result-section {
  padding: 30px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.result-card-enhanced {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.result-card-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--calc-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.result-card-enhanced:hover::before {
  opacity: 1;
}

.result-card-enhanced:hover {
  transform: translateX(8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.result-label {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 4px;
}

.result-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--calc-dark);
  margin: 0;
}

.result-card-success {
  border-left: 4px solid var(--calc-success);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.02));
}

.result-card-info {
  border-left: 4px solid var(--calc-info);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.05), rgba(6, 182, 212, 0.02));
}

.result-card-warning {
  border-left: 4px solid var(--calc-warning);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(245, 158, 11, 0.02));
}

/* Vector Line Art Animations */
@keyframes drawLine {
  from {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
  }
  to {
    stroke-dasharray: 1000;
    stroke-dashoffset: 0;
  }
}

.line-art {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 2s ease-in-out forwards;
}

/* Calculator Grid Layout */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

/* Enhanced Alert Styles */
.alert-enhanced {
  border: none;
  border-radius: 16px;
  padding: 20px 24px;
  margin: 20px 0;
  backdrop-filter: blur(10px);
  border-left: 4px solid;
}

.alert-success-enhanced {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
  border-left-color: var(--calc-success);
  color: #065f46;
}

.alert-info-enhanced {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(6, 182, 212, 0.05));
  border-left-color: var(--calc-info);
  color: #0c4a6e;
}

.alert-warning-enhanced {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
  border-left-color: var(--calc-warning);
  color: #92400e;
}

/* Chart Container Enhancement */
.chart-container {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 24px;
  margin-top: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .calc-header {
    padding: 20px;
  }
  
  .calc-form {
    padding: 20px;
  }
  
  .result-section {
    padding: 20px;
  }
  
  .vector-icon {
    width: 60px;
    height: 60px;
  }
  
  .vector-icon i {
    font-size: 2rem;
  }
  
  .calc-title {
    font-size: 1.25rem;
  }
  
  .result-value {
    font-size: 1.2rem;
  }
}

/* Loading Animation */
.calc-loading {
  position: relative;
  overflow: hidden;
}

.calc-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Vector SVG Icons */
.vector-svg {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
}

.vector-svg svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Enhanced Accordion Styles */
.accordion-item {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.accordion-button {
  background: rgba(255, 255, 255, 0.8);
  border: none;
  font-weight: 600;
  color: var(--calc-dark);
  padding: 20px 24px;
  transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
  background: var(--calc-gradient-1);
  color: white;
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: 0 0 0 4px rgba(116, 137, 62, 0.1);
  border: none;
}

.accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  transition: transform 0.3s ease;
}

.accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  transform: rotate(180deg);
}

.accordion-body {
  padding: 24px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--calc-dark);
  line-height: 1.6;
}

.accordion-body ul {
  padding-left: 0;
}

.accordion-body li {
  margin-bottom: 8px;
  padding-left: 0;
}

.accordion-body code {
  background: rgba(116, 137, 62, 0.1);
  color: var(--calc-primary);
  padding: 4px 8px;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-weight: 600;
}

/* Enhanced Table Styles */
.table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.table thead th {
  background: var(--calc-gradient-1);
  color: white;
  font-weight: 600;
  text-align: center;
  padding: 16px 12px;
  border: none;
  font-size: 0.9rem;
}

.table tbody td {
  padding: 14px 12px;
  text-align: center;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.table tbody tr {
  transition: all 0.3s ease;
}

.table tbody tr:hover {
  background: rgba(116, 137, 62, 0.05);
  transform: scale(1.01);
}

.table-striped tbody tr:nth-of-type(odd) {
  background: rgba(248, 250, 252, 0.8);
}

.table-striped tbody tr:nth-of-type(odd):hover {
  background: rgba(116, 137, 62, 0.05);
}

.table-bordered {
  border: 1px solid rgba(116, 137, 62, 0.2);
}

.table-bordered th,
.table-bordered td {
  border: 1px solid rgba(116, 137, 62, 0.1);
}

/* Table Header Variants */
.table-primary thead th {
  background: linear-gradient(135deg, #74893e, #5a6b30);
}

.table-success thead th {
  background: linear-gradient(135deg, #10b981, #059669);
}

.table-info thead th {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.table-warning thead th {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Responsive Table */
.table-responsive {
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
  .table thead th,
  .table tbody td {
    padding: 10px 8px;
    font-size: 0.85rem;
  }
  
  .table {
    font-size: 0.9rem;
  }
}