* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #223758; /* Slate blue */
  color: #E2E8F0; /* Soft gray text */
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 40px;
}

header h1 {
  font-size: 2.5em;
  color: #FFFFFF;
  animation: fadeInDown 1s ease-out forwards, glowText 2s ease-in-out infinite alternate;
  animation-delay: 0.1s;
  text-shadow: 0 0 5px #6366F1, 0 0 10px #6366F1, 0 0 20px #6366F1;
  opacity: 0;
}

header p {
  font-size: 1.1em;
  color: #CBD5E1;
  animation: fadeInDown 1s ease-out forwards, glowTextSoft 3s ease-in-out infinite alternate;
  animation-delay: 0.3s;
  text-shadow: 0 0 3px #888, 0 0 6px #aaa;
  opacity: 0;
}

#toggle-dark-mode {
  margin-top: 20px;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  background-color: #6366F1;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s;
  box-shadow: 0 0 8px #6366F1;
}

#toggle-dark-mode:hover {
  background-color: #4F46E5;
  box-shadow: 0 0 12px #4F46E5;
}

/* Animations */
@keyframes glowText {
  from {
    text-shadow: 0 0 5px #6366F1, 0 0 10px #6366F1, 0 0 20px #6366F1;
  }
  to {
    text-shadow: 0 0 10px #818CF8, 0 0 20px #818CF8, 0 0 30px #818CF8;
  }
}

@keyframes glowTextSoft {
  from {
    text-shadow: 0 0 3px #888, 0 0 6px #aaa;
  }
  to {
    text-shadow: 0 0 6px #ccc, 0 0 10px #ddd;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
 
@keyframes fadeInOpacity {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.tools-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.tool-card {
  background-color: #F1F5F9;
  width: 250px;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  animation: fadeInOpacity 0.8s ease-out forwards;
  margin: 10px;
  flex: 1 1 300px;
}

.tool-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2), 0 8px 16px rgba(63, 81, 181, 0.3);
}

/* Staggered delays */
.tool-card:nth-child(1) { animation-delay: 0.5s; }
.tool-card:nth-child(2) { animation-delay: 0.6s; }
.tool-card:nth-child(3) { animation-delay: 0.7s; }
.tool-card:nth-child(4) { animation-delay: 0.8s; }
.tool-card:nth-child(5) { animation-delay: 0.9s; }

.tool-card img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  margin-bottom: 15px;
}

.tool-card h3 {
  margin-bottom: 10px;
  color: #1E293B;
}

.tool-card p {
  font-size: 0.95em;
  color: #475569; /* Cool gray text */
  margin-bottom: 15px;
}

.tool-card a {
  text-decoration: none;
  color: white;
  background-color: #6366F1;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.tool-card:hover {
  transform: scale(1.05) translateY(-10px);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4), 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

footer {
  text-align: center;
  margin-top: 50px;
  color: #94A3B8;
  font-size: 0.9em;
}

.synthesia-logo {
  width: 100px;
  height: auto;
  margin-bottom: 15px;
}

/* 🌙 Dark Mode */
body.dark-mode {
  background-color: #0F172A;
  color: #F8FAFC;
}

body.dark-mode header h1 {
  color: #ffffff;
  text-shadow: 0 0 8px #6366F1, 0 0 16px #6366F1;
}

body.dark-mode header p {
  color: #CBD5E1;
  text-shadow: 0 0 5px #888, 0 0 8px #aaa;
}

body.dark-mode .tool-card {
  background-color: #1E1E1E;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
}

body.dark-mode .tool-card h3 {
  color: #E2E8F0;
}

body.dark-mode .tool-card p {
  color: #AAB4C4;
}

body.dark-mode .tool-card a {
  background-color: #6366F1;
}

body.dark-mode .tool-card:hover {
  box-shadow: 0 10px 20px rgba(129, 140, 248, 0.4), 0 4px 6px rgba(255, 255, 255, 0.05);
}

body.dark-mode footer {
  color: #94A3B8;
}
/* 🔄 Flip card functionality */
.flip-container {
  perspective: 1000px;
  position: relative;
}

.flipper {
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
  position: relative;
}

.flip-container.flipped .flipper {
  transform: rotateY(180deg);
}

.front, .back {
  backface-visibility: hidden;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  border-radius: 12px;
  padding: 0;
  position: relative;
}

.front {
  z-index: 2;
}

.back {
  transform: rotateY(180deg);
  background-color: white;
  color: #1E293B;
  padding: 20px;
  text-align: center;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}

/* 🔁 Flip Button */
.flip-btn {
  margin-top: 10px;
  padding: 6px 12px;
  font-size: 0.75em;
  border: none;
  border-radius: 6px;
  background-color: #ac50b3;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.flip-btn:hover {
  background-color: #4F46E5;
}

/* Make the entire body take full height */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Push footer to the bottom */
footer {
  margin-top: auto;
  padding: 20px;
  text-align: center;
  color: #ccc;
}

footer a {
  color: white;
  text-decoration: none; /* Optional: removes underline */
}

footer a:hover {
  color: #66ccff; /* Optional: changes color on hover */
}
.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 20px;
@media screen and (max-width: 768px) {
  .container {
    flex-direction: column;
    align-items: center;
  }
  .card {
    width: 90%;
    margin: auto;
  }
}