:root {
  --s-color: #00c3ff;
  --k-color: #ff005e;
  --y-color: #00ff85;
  --dark-bg: #1a2238;
  --card-bg: #242f4e;
  --text-light: #f0f5ff;
  --gradient: linear-gradient(135deg, var(--s-color), var(--k-color), var(--y-color));
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--dark-bg);
  color: var(--text-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: var(--card-bg);
  text-align: center;
  padding: 12px 15px;
  font-size: 1.8em;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--gradient);
}


.content h3 {
  color: #0901f3 !important;  /* vivid blue to match your theme */
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.content p {
  color: #f0f5ff;      /* Dark gray for readability */
  font-size: 1rem;     /* Adjust font size if needed */
  line-height: 1.6;    /* Space between lines */
  margin-bottom: 15px; /* Space after each paragraph */
}

.content li {
  color: #333333;       /* Dark gray for readability */
  font-size: 1rem;      /* Adjust font size if needed */
  line-height: 1.6;     /* Space between lines */
  margin-bottom: 10px;  /* Space between list items */
}


.logo {
  display: flex;
  align-items: center;
}

.logo-text {
  background: linear-gradient(135deg, var(--s-color), var(--k-color), var(--y-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 1200;
  font-size: 0.8em;
}

.auth-section {
  display: flex;
  align-items: center;
  position: relative;
  gap: 10px;
}

/* Buttons */
.feature-btn, .tool-btn {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
}

.feature-btn:hover, .tool-btn:hover {
  background: linear-gradient(90deg, #ff4e50, #f9d423); /* gradient hover */
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Responsive for smaller screens */
@media (max-width: 600px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .header-links {
    width: 100%;
    justify-content: flex-start;
  }
}


.subtitle {
  text-align: center;
  margin: 10px 0 20px;
  font-weight: 300;
  font-size: 1em;
  opacity: 0.8;
}

.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
  flex: 1;
}

.card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  width: 350px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.card-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 1.3em;
}

h2 {
  margin: 0;
  color: var(--text-light);
  font-weight: 600;
  font-size: 1.4em;
}

.tool-section {
  margin-top: 12px;
}

.input-group {
  margin-bottom: 12px;
  text-align: left;
}

.input-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text-light);
  opacity: 0.9;
  font-size: 0.9em;
}

input, select, button {
  padding: 10px 12px;
  margin: 4px 0;
  font-size: 0.95em;
  width: 100%;
  border-radius: 6px;
  border: none;
  font-family: 'Poppins', sans-serif;
  transition: var(--transition);
}

input, select {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Improved dropdown styling */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 35px;
}

select option {
  background: var(--card-bg);
  color: var(--text-light);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--s-color);
  box-shadow: 0 0 0 2px rgba(9, 1, 243, 0.2);
}

input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

button {
  background: var(--gradient);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 500;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

button:hover::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 1;
  }
  20% {
    transform: scale(25, 25);
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

button:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.result-box {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
  border-radius: 8px;
  margin-top: 15px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 1.1em;
  transition: var(--transition);
}

.result-box.highlight {
  background: rgba(9, 1, 243, 0.1);
  color: var(--s-color);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(9, 1, 243, 0.2); }
  70% { box-shadow: 0 0 0 8px rgba(9, 1, 243, 0); }
  100% { box-shadow: 0 0 0 0 rgba(9, 1, 243, 0); }
}

.shortcut-group {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.shortcut-btn {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85em;
}

.shortcut-btn:hover {
  background: var(--gradient);
  transform: translateY(-2px);
}

.emi-controls {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.emi-controls button {
  flex: 1;
}

.emi-result {
  margin-top: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.emi-detail {
  display: flex;
  justify-content: space-between;
  margin: 8px 0;
  font-size: 0.9em;
}

.emi-detail .label {
  opacity: 0.8;
}

.emi-detail .value {
  font-weight: 600;
  color: var(--y-color);
}

.unit-options {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.unit-options select {
  flex: 1;
}

.calculator-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 15px;
}

.calc-toggle-btn {
  flex: 1;
  padding: 8px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9em;
}

.calc-toggle-btn.active {
  background: var(--gradient);
}

.currency-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.currency-selector select {
  flex: 1;
}

.adsense-slot {
  margin-top: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  text-align: center;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
}

.about-section {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
  display: flex;
  gap: 30px;
}

.about-content {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 10px;
  line-height: 1.5;
  font-size: 0.9em;
}

.about-content h3 {
  font-size: 1.3em;
  margin-bottom: 15px;
  color: var(--y-color);
}

.about-content p {
  margin-bottom: 12px;
  opacity: 0.9;
}

.getting-started {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 10px;
  font-size: 0.9em;
}

.getting-started h3 {
  font-size: 1.3em;
  margin-bottom: 15px;
  color: var(--s-color);
}

.getting-started ol {
  padding-left: 20px;
  margin: 12px 0;
}

.getting-started li {
  margin-bottom: 10px;
  opacity: 0.9;
}

.getting-started .highlight {
  color: var(--k-color);
  font-weight: 500;
}

footer {
  background: var(--card-bg);
  padding: 12px 20px;
  text-align: center;
  margin-top: auto;
  font-size: 0.85em;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  max-width: 1000px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.footer-links a {
  color: var(--y-color);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--s-color);
  text-decoration: underline;
}

.footer-divider {
  color: rgba(255, 255, 255, 0.3);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--card-bg);
  margin: auto;
  padding: 25px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  position: relative;
}

.close {
  color: #aaa;
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5em;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: var(--text-light);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.auth-form h2 {
  text-align: center;
  margin-bottom: 10px;
}

.social-auth {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 15px 0;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.google-btn {
  background: #fff;
  color: #757575;
}

.google-btn:hover {
  background: #f5f5f5;
}

.auth-divider {
  text-align: center;
  margin: 15px 0;
  position: relative;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
  background: var(--card-bg);
  padding: 0 10px;
  position: relative;
  z-index: 1;
}

/* Loading spinner */
.spinner {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 2px solid var(--s-color);
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 8px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .container {
    gap: 18px;
    padding: 15px;
  }
  
  .card {
    width: 100%;
    max-width: 400px;
  }
  
  header {
    flex-direction: column;
    gap: 10px;
    padding: 15px;
  }
  
  .auth-section {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .about-section {
    flex-direction: column;
  }
  
  .unit-options {
    flex-direction: column;
    gap: 12px;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 8px;
  }
  
  .footer-links {
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .subtitle {
    font-size: 0.9em;
    padding: 0 15px;
  }
  
  .card-header {
    flex-direction: column;
    gap: 8px;
  }
  
  .card-icon {
    margin-right: 0;
  }
  
  .shortcut-group {
    flex-direction: column;
    gap: 6px;
  }
  
  .shortcut-btn {
    width: 100%;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--card-bg);
  color: var(--text-light);
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  border-left: 4px solid var(--y-color);
}

.toast.error {
  border-left: 4px solid var(--k-color);
}

.toast.info {
  border-left: 4px solid var(--s-color);
}

/* Dark mode toggle */
.dark-mode-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 100;
  transition: var(--transition);
}

.dark-mode-toggle:hover {
  transform: scale(1.1);
}


/* Blogs Section */
.blog-list {
  display: flex;
  flex-wrap: wrap;      /* wrap to next row if needed */
  gap: 20px;            /* space between cards */
  margin-top: 20px;
}

.blog-card {
  flex: 1 1 calc(33% - 20px);  /* 3 cards per row, responsive */
  background: rgba(0, 0, 0, 0.08); /* slightly dark for contrast */
  border-radius: 12px;
  padding: 20px;
  box-sizing: border-box;
  transition: 0.3s ease;
  color: #fff; /* text color */
}

.blog-card h2 {
  margin-bottom: 10px;
  font-size: 1.2em;
}

.blog-card p {
  margin-bottom: 15px;
  line-height: 1.5;
  font-size: 0.95em;
  color: #e0e0e0; /* light gray for readability */
}

.blog-card a {
  text-decoration: none;
  color: var(--primary, #00bcd4);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Back button for individual blogs */
.back-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 8px 15px;
  border-radius: 20px;
  background: var(--gradient, linear-gradient(90deg,#00bcd4,#2196f3));
  color: white;
  text-decoration: none;
  font-size: 0.9em;
}

.back-btn:hover {
  opacity: 0.9;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .blog-card {
    flex: 1 1 calc(50% - 20px); /* 2 cards per row */
  }
}

@media (max-width: 600px) {
  .blog-card {
    flex: 1 1 100%; /* 1 card per row on small screens */
  }
}

/* ---------- Header Links & Dropdown Fix ---------- */
.header-links {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
  position: relative;
  z-index: 1001; /* Parent z-index for stacking */
}

/* Dropdown container */
.dropdown {
  position: relative;
  z-index: 1002; /* Ensure dropdown has higher z-index */
}

/* Dropdown button */
.dropbtn {
  background-color: #007bff; 
  color: #fff;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Dropdown content container - Updated */
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #00ff85;        /* White background */
  color: #ff005e;             /* Black text */
  min-width: 170px;           /* Reduced width */
  max-width: 170px;           /* Optional max width */
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border-radius: 5px;
  z-index: 1003;              /* Higher than all other elements */
  overflow: visible !important;
  font-weight: 800;
  transition: all 0.2s ease;
}


/* Dropdown links */
.dropdown-content a {
  color: #ff005e;       /* Black text */
  padding: 8px 10px;   /* Padding inside links */
  text-decoration: none;
  display: block;
  font-size: 12px;      /* Add this line to reduce text size */
}

.dropdown-content a:hover {
  background-color: #f1f1f1;  /* Light gray hover effect */
}

/* Show dropdown on hover (desktop) */
@media (min-width: 768px) {
  .dropdown:hover .dropdown-content {
    display: block;
  }
}

/* Ensure no parent elements are clipping the dropdown */
header, .container, body {
  overflow: visible !important;
}

/* Show dropdown when .show added via JS (mobile) */
.dropdown-content.show {
  display: block;
}

/* Mobile-specific dropdown */
@media (max-width: 768px) {
  .dropdown-content {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;          /* Full width on mobile */
    top: 80px;                /* Adjust based on header height */
    border-radius: 0;
    background: #ffffff;      /* White background on mobile */
    z-index: 1003;
  }

  .dropdown-content a {
    color: #000000;
  }

  .dropdown-content a:hover {
    background-color: #f1f1f1;
  }
}


  /* Scoped header styles */
  #site-header nav a {
    color: white;
    padding: 10px;
  }

  /* Scoped footer styles */
  #site-footer {
    background: #111;
    color: #eee;
    padding: 20px;
    text-align: center;
  }




