/* Enhanced Calculator Styles for Artemis Website */

/* Import color variables */
@import url('colors.css');
@import url('fonts.css');

/* Variables */
:root {
  --primary-color: #0a4d8c;
  --secondary-color: #d4a84f;
  --dark-color: #0a192f;
  --light-color: #f9f9f7;
  --accent-color: #4a90e2;
  --white-color: #ffffff;
  --text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  --box-shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
  --box-shadow-md: 0 6px 16px rgba(0, 0, 0, 0.1);
  --box-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --transition-fast: all 0.3s ease;
  --transition-medium: all 0.5s ease;
}

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

body {
      font-family: 'Inter', Tahoma, Geneva, Verdana, sans-serif;
  direction: rtl;
  text-align: right;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  color: var(--white-color);
  background-color: var(--dark-color);
  overflow-x: hidden;
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  padding: 8px;
  background-color: var(--secondary-color);
  color: var(--dark-color);
  z-index: 9999;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Background and container */
#pulseLines,
#bg {
  background: radial-gradient(ellipse at center, var(--primary-color) 0%, var(--dark-color) 100%);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Add particle effect */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
}

.calculator {
  position: relative;
  background: linear-gradient(135deg, rgba(10, 77, 140, 0.8), rgba(26, 26, 46, 0.9));
  border: 2px solid var(--secondary-color);
  border-radius: 25px;
  padding: 40px;
  width: 95%;
  max-width: 900px;
  text-align: center;
  backdrop-filter: blur(12px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  perspective: 1000px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(212, 168, 79, 0.3);
  z-index: 1;
}

.calculator:hover {
  /* Removing zoom effect */
  transform: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.calculator::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(212, 168, 79, 0.2) 0%,
    transparent 60%
  );
  opacity: 0.5;
  animation: rotateGlow 6s linear infinite;
  z-index: -1;
}

/* Pulse animation for calculator on load */
.pulse-animation {
  animation: pulse 1s ease;
}

@keyframes pulse {
  0% { transform: scale(0.98); opacity: 0.8; }
  50% { transform: scale(1.02); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Calculator header */
.calculator-header {
  position: relative;
  margin-bottom: 30px;
  text-align: center;
}

.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}

.calculator-logo {
  width: 90px;
  height: auto;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.calculator-header h2 {
  margin-bottom: 15px;
  font-size: 2.5rem;
  color: var(--secondary-color);
  position: relative;
  padding-bottom: 15px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  font-weight: 700;
}

.calculator-header h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
  animation: lineGlow 2.5s infinite;
}

.subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  margin-bottom: 20px;
  font-weight: 300;
}

/* Calculator content */
.calculator-content {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 30px;
}

/* Enhanced inputs */
.inputs {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  opacity: 0;
  animation: fadeIn 0.5s forwards;
}

.input-group:nth-child(1) { animation-delay: 0.1s; }
.input-group:nth-child(2) { animation-delay: 0.2s; }
.input-group:nth-child(3) { animation-delay: 0.3s; }
.input-group:nth-child(4) { animation-delay: 0.4s; }

.input-group label {
  display: block;
  margin-bottom: 12px;
  font-size: 1.1rem;
  color: var(--white-color);
  text-shadow: var(--text-shadow);
  font-weight: 500;
}

/* Enhanced sliders */
.slider-container {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 18px;
  border-radius: 15px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--box-shadow-sm);
}

.slider-container:hover {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: var(--box-shadow-md);
  transform: translateY(-2px);
}

.slider-container input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 10px;
  outline: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.slider-container input[type="range"]:hover {
  height: 10px;
  box-shadow: 0 0 10px rgba(212, 168, 79, 0.5);
}

.slider-container input[type="range"]:focus {
  height: 10px;
  box-shadow: 0 0 15px rgba(212, 168, 79, 0.7);
}

.slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: var(--secondary-color);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(212, 168, 79, 0.7);
}

.slider-container input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--secondary-color);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.slider-container input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(212, 168, 79, 0.7);
}

.slider-focused {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(212, 168, 79, 0.4);
  transform: translateY(-3px);
}

.value-display {
  min-width: 100px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: 20px;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 15px;
  border-radius: 10px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}

#amount-value, #months-value, #rate-value {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--secondary-color);
  margin-right: 5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.stacked-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.million {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
}

.toman {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Button container */
.button-container {
  margin-top: 15px;
}

/* Enhanced CTA button */
.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, var(--secondary-color), #b08a40);
  color: var(--dark-color);
  text-decoration: none;
  padding: 15px 30px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(212, 168, 79, 0.3);
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.2);
  transition: width 0.3s ease;
  z-index: 0;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 20px rgba(212, 168, 79, 0.4);
}

.cta-button:hover::before {
  width: 100%;
}

.cta-button i {
  margin-right: 10px;
  position: relative;
  z-index: 1;
}

.pressed {
  transform: translateY(2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Result section enhancements */
.results {
  flex: 1;
  min-width: 300px;
  background: rgba(255, 255, 255, 0.05);
  padding: 25px;
  border-radius: 15px;
  box-shadow: var(--box-shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: translateZ(0);
}

.results h3 {
  color: var(--secondary-color);
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-shadow: var(--text-shadow);
  position: relative;
  padding-bottom: 10px;
}

.results h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--secondary-color);
}

.results:hover {
  box-shadow: var(--box-shadow-md);
  transform: translateY(-3px);
}

.result-item {
  display: flex;
  align-items: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  transition: var(--transition-fast);
  border-left: 3px solid var(--secondary-color);
  opacity: 0;
  animation: fadeIn 0.5s forwards;
}

.result-item:nth-child(2) { animation-delay: 0.1s; }
.result-item:nth-child(3) { animation-delay: 0.2s; }
.result-item:nth-child(4) { animation-delay: 0.3s; }

.result-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
}

.result-icon {
  margin-right: 15px;
  font-size: 1.8rem;
  color: var(--secondary-color);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.result-item:hover .result-icon {
  transform: scale(1.1);
}

.pulse {
  animation: iconPulse 0.5s ease;
}

@keyframes iconPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.result-details {
  flex: 1;
}

.result-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 5px;
}

.result-value {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--white-color);
  transition: var(--transition-fast);
}

.result-item:hover .result-value {
  color: var(--secondary-color);
}

.highlight {
  animation: highlight 1s ease;
}

@keyframes highlight {
  0% { color: var(--secondary-color); }
  100% { color: var(--white-color); }
}

/* Share results section */
.share-results {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 12px;
  animation: fadeIn 0.5s forwards;
  animation-delay: 0.4s;
  opacity: 0;
}

.share-results p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 10px;
}

.share-buttons {
  display: flex;
  gap: 15px;
}

.share-buttons a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white-color);
  text-decoration: none;
  transition: var(--transition-fast);
}

.share-buttons a:hover {
  background: var(--secondary-color);
  color: var(--dark-color);
  transform: translateY(-3px);
}

.bounce {
  animation: bounce 0.5s ease;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Calculator footer */
.calculator-footer {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 15px;
  animation: fadeIn 0.5s forwards;
  animation-delay: 0.5s;
  opacity: 0;
}

.calculator-footer .highlight {
  color: var(--secondary-color);
  font-weight: bold;
}

.back-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
}

.back-link:hover {
  opacity: 0.8;
}

.back-link i {
  margin-left: 5px;
  transition: var(--transition-fast);
}

.back-link:hover i {
  transform: translateX(3px);
}

/* Animations */
@keyframes rotateGlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes neonGlow {
  0% { box-shadow: 0 0 10px rgba(212, 168, 79, 0.3); }
  50% { box-shadow: 0 0 30px rgba(212, 168, 79, 0.7); }
  100% { box-shadow: 0 0 10px rgba(212, 168, 79, 0.3); }
}

@keyframes lineGlow {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive styles */
@media (max-width: 992px) {
  .calculator {
    padding: 15px;
    max-height: 850px;
    overflow: hidden;
  }
  
  .calculator-content {
    flex-direction: column;
    gap: 15px;
  }
  
  .inputs, .results {
    width: 100%;
    max-width: 100%;
  }
  
  .input-group {
    margin-bottom: 12px;
  }
  
  .result-item {
    margin-bottom: 10px;
    padding: 10px;
  }
  
  .calculator-footer {
    padding: 10px;
    margin-top: 10px;
  }
}

@media (max-width: 768px) {
  .calculator {
    padding: 10px;
    max-height: 1000px;
  }
  
  .calculator-header {
    margin-bottom: 10px;
  }
  
  .calculator-logo {
    width: 40px;
    height: 40px;
  }
  
  .calculator-header h2 {
    font-size: 1.4rem;
    margin-bottom: 5px;
  }
  
  .subtitle {
    font-size: 0.9rem;
    margin-bottom: 10px;
  }
  
  .input-group label {
    font-size: 0.9rem;
  }
  
  .value-display {
    font-size: 0.9rem;
  }
  
  .results h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
  }
  
  .result-icon {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
  
  .result-value {
    font-size: 1rem;
  }
  
  .share-results {
    margin-top: 10px;
  }
  
  .share-buttons a {
    width: 30px;
    height: 30px;
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .calculator {
    padding: 20px;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .slider-container input[type="range"] {
    height: 4px;
  }
  
  .calculator-logo {
    width: 70px;
  }
  
  .button-container {
    margin-top: 10px;
  }
  
  .share-buttons a {
    width: 35px;
    height: 35px;
  }
  
  .share-buttons {
    gap: 10px;
  }
  
  .result-item {
    padding: 12px;
  }
  
  .results h3 {
    font-size: 1.3rem;
  }
  
  .result-icon {
    font-size: 1.5rem;
    width: 30px;
    height: 30px;
  }
  
  .result-value {
    font-size: 1.1rem;
  }
  
  .subtitle {
    font-size: 0.9rem;
  }
}
