:root {
  /* Light Theme */
  --primary: #4361ee;
  --primary-light: #4895ef;
  --secondary: #3f37c9;
  --accent: #f72585;
  --dark: #1a1a2e;
  --light: #f8f9fa;
  --success: #4cc9f0;
  --warning: #f8961e;
  --danger: #ef233c;
  
  --gradient-primary: linear-gradient(135deg, #4361ee, #3f37c9);
  --gradient-accent: linear-gradient(135deg, #f72585, #b5179e);
  --gradient-success: linear-gradient(135deg, #4cc9f0, #4895ef);
  
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a68;
  --text-light: #f8f9fa;
  
  --bg-color: #f8f9fa;
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
  --border-color: rgba(255, 255, 255, 0.3);
  
  /* Dark Theme */
  --dark-primary: #4361ee;
  --dark-primary-light: #4895ef;
  --dark-secondary: #3f37c9;
  --dark-accent: #f72585;
  --dark-dark: #0f0e17;
  --dark-light: #161629;
  --dark-success: #4cc9f0;
  --dark-warning: #f8961e;
  --dark-danger: #ef233c;
  
  --dark-text-primary: #f8f9fa;
  --dark-text-secondary: #b8b8d1;
  
  --dark-bg-color: #0f0e17;
  --dark-card-bg: rgba(22, 22, 41, 0.85);
  --dark-card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --dark-border-color: rgba(255, 255, 255, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: var(--dark-primary);
    --primary-light: var(--dark-primary-light);
    --secondary: var(--dark-secondary);
    --accent: var(--dark-accent);
    --dark: var(--dark-dark);
    --light: var(--dark-light);
    --success: var(--dark-success);
    --warning: var(--dark-warning);
    --danger: var(--dark-danger);
    
    --text-primary: var(--dark-text-primary);
    --text-secondary: var(--dark-text-secondary);
    
    --bg-color: var(--dark-bg-color);
    --card-bg: var(--dark-card-bg);
    --card-shadow: var(--dark-card-shadow);
    --border-color: var(--dark-border-color);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
  font-family: 'Poppins', 'Hind Siliguri', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  padding: 20px;
  overflow-x: hidden;
  position: relative;
}

.bn {
  font-family: 'Hind Siliguri', sans-serif;
}

.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.3;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  position: relative;
}

.hero-content {
  text-align: center;
  margin-bottom: 30px;
  z-index: 2;
}

.hero h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 3.5rem;
  margin-bottom: 15px;
  font-weight: 900;
  line-height: 1.2;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.hero-illustration {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
}

.planet {
  position: absolute;
  width: 120px;
  height: 120px;
  background: var(--gradient-primary);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 30px rgba(67, 97, 238, 0.3);
}

.ring {
  position: absolute;
  width: 180px;
  height: 180px;
  border: 4px solid rgba(67, 97, 238, 0.3);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: rotate 20s linear infinite;
}

.satellite {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 10px var(--accent);
  animation: orbit 8s linear infinite;
}

@keyframes rotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes orbit {
  0% { transform: rotate(0deg) translateX(90px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(90px) rotate(-360deg); }
}

.calculator-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  margin-bottom: 40px;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.calculator-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(31, 38, 135, 0.2);
}

.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
}

.section-header h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-left: 15px;
  color: var(--text-primary);
}

.icon-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.icon-circle i {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.pulse {
  animation: pulse 2s infinite;
}

.input-section {
  text-align: center;
  width: 100%;
}

.date-input {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.input-group label {
  margin-bottom: 10px;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.input-wrapper {
  position: relative;
}

.num-input {
  width: 90px;
  padding: 15px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  font-size: 1.2rem;
  text-align: center;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.num-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 2px var(--primary);
}

.input-decoration {
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 3px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.num-input:focus + .input-decoration {
  transform: scaleX(1);
}

.btn-gradient {
  display: inline-block;
  margin: 20px auto;
  position: relative;
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
  overflow: hidden;
  z-index: 1;
  text-align: center;
  min-width: 200px;
}

.btn-gradient span {
  position: relative;
  z-index: 2;
}

.hover-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-accent);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-gradient:hover .hover-effect {
  opacity: 1;
}

.btn-gradient:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(67, 97, 238, 0.4);
}

.btn-gradient:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-outline:hover {
  background: rgba(67, 97, 238, 0.1);
}

.result-section {
  display: none;
  animation: fadeIn 0.5s ease-out forwards;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.result-header h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem;
  color: var(--text-primary);
  flex-grow: 1;
  text-align: center;
  margin: 0 20px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.result-card {
  padding: 25px;
  border-radius: 15px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  animation: fadeInUp 0.5s ease-out forwards;
}

.result-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(31, 38, 135, 0.15);
}

.age-visualization {
  grid-column: span 2;
}

.visualization-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.age-circle {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.circle-progress {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0%, transparent 0%);
  transition: background 1s ease;
}

.circle-center {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.circle-center span {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
}

.circle-center small {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: -5px;
}

.age-bars {
  flex-grow: 1;
  margin-left: 30px;
}

.age-bar {
  margin-bottom: 20px;
}

.bar-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.bar-container {
  height: 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  width: 0;
  transition: width 1s ease;
}

.bar-value {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: right;
  margin-top: 5px;
}

.exact-age {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-color);
}

.exact-age i {
  color: var(--primary);
  margin-right: 10px;
  font-size: 1.2rem;
}

.exact-age span {
  font-size: 1.1rem;
  font-weight: 500;
}

.card-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.card-header i {
  color: var(--primary);
  font-size: 1.2rem;
  margin-right: 10px;
}

.card-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.result-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.result-item i {
  color: var(--primary);
  margin-right: 15px;
  font-size: 1.1rem;
  min-width: 20px;
}

.result-item div {
  flex-grow: 1;
}

.result-item span:first-child {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 2px;
}

.planet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.planet-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.planet-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.planet-icon.mercury {
  background: linear-gradient(135deg, #7f8c8d, #95a5a6);
}

.planet-icon.venus {
  background: linear-gradient(135deg, #e67e22, #d35400);
}

.planet-icon.earth {
  background: linear-gradient(135deg, #3498db, #2980b9);
}

.planet-icon.mars {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.planet-icon.jupiter {
  background: linear-gradient(135deg, #f39c12, #e67e22);
}

.planet-icon.saturn {
  background: linear-gradient(135deg, #f1c40f, #f39c12);
}

.planet-item span:first-of-type {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 5px;
}

.planet-item span:last-of-type {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.time-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 5px;
}

.time-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.progress-container {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-bar {
  flex-grow: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar div {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
  width: 0;
  transition: width 1s ease;
}

.share-section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
}

.qr-code {
  background: white;
  padding: 10px;
  border-radius: 12px;
  display: inline-block;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.fun-facts-section {
  display: none;
  margin-top: 40px;
  animation: fadeIn 0.5s ease-out forwards;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

.fact-card {
  padding: 25px;
  border-radius: 15px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  animation: fadeInUp 0.5s ease-out forwards;
}

.fact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(31, 38, 135, 0.15);
}

.fact-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.fact-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.fact-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.theme-toggle, .language-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
}

.language-toggle {
  right: 80px;
}

.theme-toggle button, .language-toggle button {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.2rem;
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.language-toggle button {
  width: auto;
  padding: 0 20px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.theme-toggle button:hover, .language-toggle button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.result-card:nth-child(1) { animation-delay: 0.1s; }
.result-card:nth-child(2) { animation-delay: 0.2s; }
.result-card:nth-child(3) { animation-delay: 0.3s; }
.result-card:nth-child(4) { animation-delay: 0.4s; }
.result-card:nth-child(5) { animation-delay: 0.5s; }
.result-card:nth-child(6) { animation-delay: 0.6s; }

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

@media (max-width: 992px) {
  .age-visualization {
    grid-column: span 1;
  }
  
  .visualization-container {
    flex-direction: column;
  }
  
  .age-bars {
    margin-left: 0;
    margin-top: 30px;
    width: 100%;
  }
  
  .hero h1 {
    font-size: 2.8rem;
  }
}

@media (max-width: 768px) {
  .date-input {
    flex-direction: column;
    align-items: center;
  }
  
  .input-group {
    width: 100%;
    max-width: 200px;
  }
  
  .result-header {
    flex-direction: column;
  }
  
  .result-header h2 {
    margin: 15px 0;
  }
  
  .planet-grid, .time-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .theme-toggle {
    top: 15px;
    right: 15px;
  }
  
  .language-toggle {
    right: 75px;
    top: 15px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 15px;
  }
  
  .calculator-card {
    padding: 20px;
  }
  
  .planet-grid, .time-grid {
    grid-template-columns: 1fr;
  }
  
  .share-section {
    flex-direction: column;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .section-header h2 {
    font-size: 1.5rem;
  }
}