/* General styles */
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

body.light-theme {
  background-color: #e8e8e8;
  color: #333; /* Default text color for light theme */
}

body.dark-theme {
  background-color: #333;
  color: #fff; /* Default text color for dark theme */
}

header {
  background: inherit;
  color: inherit;
  padding: 1rem;
  text-align: center;
  position: relative;
}

h1 {
  margin: 0;
  color: inherit; /* Ensure header text color matches the theme */
  font-weight: 500;
  letter-spacing: 1px;
}

/* Theme Switch Button */
.theme-switch {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 25px;
  background-color: #ccc;
  border-radius: 25px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.theme-switch__checkbox {
  display: none;
}

.theme-switch__container {
  position: relative;
  width: 100%;
  height: 100%;
}

.theme-switch__circle-container {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 21px;
  height: 21px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__circle-container {
  transform: translateX(25px);
}

/* Cards container */
/* From Uiverse.io by kamehame-ha */ 
.cards {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 30px;
  padding: 40px;
  width: fit-content;
  margin: 0 auto;
  position: relative;
}

.cards .red {
  background-color: #f43f5e;
}

.cards .blue {
  background-color: #3b82f6;
}

.cards .card {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  height: 150px;
  width: 300px;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  transition: all 400ms;  /* Changed to include all properties */
}

.cards .card p.tip {
  font-size: 1.5em;
  font-weight: 700;
  margin-bottom: 10px;  /* Added spacing between title and description */
}

.cards .card p.second-text {
  font-size: 1em;
}

/* Fix the hover effects */
.cards:hover .card {
  filter: blur(10px);
  transform: scale(0.9, 0.9);
}

.cards .card:hover {
  filter: blur(0);
  transform: scale(1.1, 1.1);
}

/* Individual card styles */
.card {
  width: 300px;
  height: 150px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}

/* Text styles */
.tip {
  font-size: 1.5em;
  margin-bottom: 5px;
  color: white; /* Force white text */
  font-weight: 600;
  letter-spacing: 0.5px;
}

.second-text {
  font-size: 1em;
  color: white; /* Force white text */
  font-weight: 400;
  letter-spacing: 0.2px;
}

/* Card colors */
.card.red {
  background-color: #ff6b6b;
}

.card.blue {
  background-color: #4dabf7;
}

.card.green {
  background-color: #51cf66;
}

/* Hover effects */
.card:hover {
  transform: translateY(-5px);
}

/* Blur effect */
.cards:hover .card {
  filter: blur(3px);
}

.cards:hover .card:hover {
  filter: none;
  transform: translateY(-5px);
}

/* Tools container */
.tools-container {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  color: #333; /* Adjust text color for tools container */
}

body.dark-theme .tools-container {
  background: #444;
  color: #fff; /* Adjust text color for dark theme */
}

/* Tool sections */
.tool-section {
  margin-bottom: 20px;
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

body.dark-theme .tool-section {
  border-bottom: 1px solid #666; /* Adjust border color for dark theme */
}

.tool-section:last-child {
  border-bottom: none;
}

.tool-section h2 {
  margin-bottom: 10px;
  font-size: 1.5em;
  color: inherit; /* Ensure section headers match the theme */
}

input[type="text"] {
  width: calc(100% - 120px);
  padding: 10px;
  margin-right: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
  color: #333; /* Default input text color */
}

body.dark-theme input[type="text"] {
  background-color: #555;
  color: #fff; /* Adjust input text color for dark theme */
  border: 1px solid #777;
}

button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #0056b3;
}

button:focus {
  outline: 3px solid #0056b3;
  outline-offset: 2px;
}

/* Error messages */
#error-message {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  padding: 10px;
  margin-top: 10px;
  border-radius: 5px;
  font-weight: bold;
  display: none;
  text-align: center;
}

body.dark-theme #error-message {
  background-color: #a94442;
  color: #fff;
  border: 1px solid #d9534f;
}

p {
  margin-top: 10px;
  font-size: 1em;
  color: #555;
}

/* Dashboard container */
.dashboard-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px;
}

/* Tool cube (card) */
.tool-cube {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  width: 300px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-cube:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.tool-cube h2 {
  margin-bottom: 10px;
  color: #333;
  font-size: 1.5em;
}

.tool-cube p {
  margin-bottom: 20px;
  color: #555;
}

/* Tool content inside the cube */
.tool-content {
  text-align: left;
}

/* Main container for all tools */
.tools-container {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  color: #333; /* Adjust text color for tools container */
}

body.dark-theme .tools-container {
  background: #444;
  color: #fff; /* Adjust text color for dark theme */
}

/* Individual tool sections inside the container */
.tool-section {
  margin-bottom: 20px;
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

body.dark-theme .tool-section {
  border-bottom: 1px solid #666; /* Adjust border color for dark theme */
}

.tool-section:last-child {
  border-bottom: none;
}

.tool-section h2 {
  margin-bottom: 10px;
  color: inherit; /* Ensure section headers match the theme */
  font-size: 1.5em;
}

tool-section h3 {
  margin-bottom: 10px;
  font-size: 1.2em;
  color: #007bff;
}

input[type="text"] {
  width: calc(100% - 120px);
  padding: 10px;
  margin-right: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
  color: #333; /* Default input text color */
}

body.dark-theme input[type="text"] {
  background-color: #555;
  color: #fff; /* Adjust input text color for dark theme */
  border: 1px solid #777;
}

/* Buttons */
button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #0056b3;
}

button:focus {
  outline: 3px solid #0056b3;
  outline-offset: 2px;
}

/* Error messages */
#error-message {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  padding: 10px;
  margin-top: 10px;
  border-radius: 5px;
  font-weight: bold;
  display: none;
  text-align: center;
}

body.dark-theme #error-message {
  background-color: #a94442;
  color: #fff;
  border: 1px solid #d9534f;
}

p {
  margin-top: 10px;
  font-size: 1em;
  color: #555;
}

/* Cards container */
.cards {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 20px;
}

/* Individual card styles */
.card {
  width: 300px;
  height: 150px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}

/* Text styles */
.tip {
  font-size: 1.5em;
  margin-bottom: 5px;
  color: white; /* Force white text */
  font-weight: 600;
  letter-spacing: 0.5px;
}

.second-text {
  font-size: 1em;
  color: white; /* Force white text */
  font-weight: 400;
  letter-spacing: 0.2px;
}

/* Card colors */
.card.red {
  background-color: #ff6b6b;
}

.card.blue {
  background-color: #4dabf7;
}

.card.green {
  background-color: #51cf66;
}

/* Hover effects */
.card:hover {
  transform: translateY(-5px);
}

/* Blur effect */
.cards:hover .card {
  filter: blur(3px);
}

.cards:hover .card:hover {
  filter: none;
  transform: translateY(-5px);
}

/* Fix: Prevent blur effect when mouse is not inside the container */
.cards:hover {
  pointer-events: auto;
}

.cards:hover .card:not(:hover) {
  filter: blur(3px);
}

/* Text inside cards */
.tip,
.second-text {
  font-size: 1.5em;
  margin-bottom: 5px;
  color: white; /* Force white text */
}

.second-text {
  font-size: 1em;
  font-weight: normal;
}

/* Responsive design */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  input[type="text"] {
    width: 100%;
    margin-bottom: 10px;
  }

  button {
    width: 100%;
  }

  .tool-card {
    width: 100%;
  }

  .tool-cube {
    width: 100%;
  }
}

/* Error messages */
.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 1rem;
  margin: 1rem auto;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  max-width: 800px;
  text-align: center;
  display: none;
}

body.dark-theme .error-message {
  background-color: #2c1f21;
  color: #f8d7da;
  border-color: #721c24;
}
