* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* body {
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  font-weight: 400;
  color: #1e293b; /* neutral-800 */ 
/*   background-color: #ffffff;
  background: linear-gradient(135deg, #dbeafe 0%, #f8fafc 100%);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale; */
/* } */

#app {
  min-height: 100vh;
  padding: 2rem 1rem;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    text-align: center;
     background: linear-gradient(135deg, #9CA1E2 0%, #4b85e6 50%, #9CA1E2 100%);
    color: white !important;
    padding: 20px;
    border-radius: 15px;
/*     margin-bottom: 30px; */
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.2);
}




header h1 {
    font-size: 45px !important;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
  font-size: 1.125rem;
  color:white; /* neutral-600 */
}

.converter-card, .info-card {
  background: white !important;
  border-radius: 16px !important;
  padding: 2rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
  border: 1px solid #e2e8f0 !important; /* neutral-200 */
	margin-bottom:10px;
}

.conversion-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: end;
  margin-bottom: 2rem;
}

.dropdown-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dropdown-group label {
  font-weight: 600;
  color: #334155; /* neutral-700 */
  font-size: 0.875rem;
}

.dropdown, .input-field {
  padding: 0.75rem 1rem !important;
  border: 2px solid #e2e8f0 !important; /* neutral-200 */
  border-radius: 8px !important;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: white !important;
}

.dropdown:focus, .input-field:focus {
  outline: none !important;
  border-color: #3b82f6 !important; /* primary-blue */
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.swap-btn {
  background: #dbeafe !important; /* light-blue */
  border: 2px solid #3b82f6 !important; /* primary-blue */
  border-radius: 50% !important;
  width: 48px !important;
  height: 48px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #3b82f6 !important;
	padding:10px !important;
}

.swap-btn:hover {
  background: #3b82f6 !important;
  color: white !important;
  transform: rotate(180deg);
}

.swap-btn svg {
  width: 20px ;
  height: 20px;
}

.input-section {
  margin-bottom: 2rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  font-weight: 600 !important;
  color: #334155 !important; /* neutral-700 */
  font-size: 0.875rem;
}

.fraction-inputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: end;
}

.fraction-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fraction-divider {
  font-size: 2rem;
  font-weight: bold !important;
  color: #475569 !important; /* neutral-600 */
  text-align: center;
  padding-bottom: 0.75rem;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.btn {
  padding: 0.75rem 2rem !important;
  border-radius: 8px !important;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer !important;
  transition: all 0.2s ease;
  border: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {

	 background: linear-gradient(135deg, #9CA1E2 0%, #4b85e6 50%, #9CA1E2 100%)!important;
  color: white !important;
}

.btn-primary:hover {
   background: #3b82f6 !important; /* secondary-blue */
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
}

.btn-secondary {
  background: #e2e8f0 !important; /* neutral-200 */
  color: #334155 !important; /* neutral-700 */
}

.btn-secondary:hover {
  background: #cbd5e1 !important; /* neutral-300 */
}

.btn-outline {
  background: transparent !important;
  border: 2px solid #3b82f6 !important;
  color: #3b82f6 !important;
}

.btn-outline:hover, .btn-outline.active {
  background: linear-gradient(135deg, #9CA1E2 0%, #4b85e6 50%, #9CA1E2 100%) !important;
  color: white !important;
}

.fraction-type-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.mixed-fraction-inputs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mixed-fraction-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mixed-fraction-proper {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: end;
}

.result-section, .calculation-section {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: #f8fafc !important; /* neutral-50 */
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important; /* neutral-200 */
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.result-header h3, .calculation-section h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b; /* neutral-800 */
}

.copy-btn {
  background: #0891b2 !important; /* accent-blue */
  color: white !important;
  border: none !important;
  padding: 0.5rem 1rem !important;
  border-radius: 6px !important;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.copy-btn:hover {
  background: #3b82f6;
}

.copy-btn svg {
  width: 16px;
  height: 16px;
}

.result-value {
  font-size: 2rem;
  font-weight: bold !important;
  color: #1e40af !important; /* secondary-blue */
  margin-bottom: 0.5rem;
  word-break: break-all;
}

.calculation-steps {
  font-family: 'Courier New', monospace;
  background: white;
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid #3b82f6;
  white-space: pre-line;
  line-height: 1.6;
  color: #334155; /* neutral-700 */
}

.info-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b; /* neutral-800 */
  margin-bottom: 1rem;
}

.info-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.info-card li {
  padding-left: 1rem;
  position: relative;
  color: #475569; /* neutral-600 */
}

.info-card li::before {
  content: "•";
  color: #3b82f6;
  font-weight: bold;
  position: absolute;
  left: 0;
}

.info-card strong {
  color: #1e293b; /* neutral-800 */
}

/* Error state */
.input-field.error {
  border-color: #ef4444; /* error-red */
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
  color: #ef4444; /* error-red */
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Success animation */
@keyframes success {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.success {
  animation: success 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header h1 {
    font-size: 35px !important;
  }
	.container{
		padding:0px !important;
	}
	#app{
		padding:0px !important;
	}
  
  .header p {
    font-size: 1rem;
  }
  
  .converter-card, .info-card {
    padding: 1.5rem;
  }
  
  .conversion-controls {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .swap-btn {
    justify-self: center;
    transform: rotate(90deg);
  }
  
  .swap-btn:hover {
    transform: rotate(270deg);
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .fraction-type-controls {
    flex-direction: column;
  }
  
  .result-value {
    font-size: 1.5rem;
  }
  
  .fraction-inputs {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
  }
  
  .fraction-divider {
    order: 1;
    padding: 0.5rem 0;
  }
  
  .mixed-fraction-proper {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
  }
  
  .mixed-fraction-proper .fraction-divider {
    order: 1;
    padding: 0.5rem 0;
  }
}

@media (max-width: 480px) {
  #app {
    padding: 1rem 0.5rem;
  }
  
  .container {
    gap: 1.5rem;
  }
  
  .header h1 {
    font-size: 1.75rem;
  }
  
  .converter-card, .info-card {
    padding: 1rem;
  }
  
  .result-value {
    font-size: 1.25rem;
  }
}

/* Print styles */
@media print {
  body {
    background: white;
  }
  
  .converter-card, .info-card {
    box-shadow: none;
    border: 1px solid #cbd5e1; /* neutral-300 */
  }
  
  .copy-btn, .swap-btn {
    display: none;
  }
}
