/* style.css */
:root {
  /* Colors inspired by wrdg.net */
  --bg-color: #0d0d0d;
  --text-color: #e0e0e0;
  --text-secondary-color: #8c8c8c; /* Dimmer gray for subtitle */
  --copyright-text-color: #666666;

  --button-bg-color: #2a2f3b;
  --button-text-color: #e0e0e0;
  --button-border-color: rgba(255, 255, 255, 0.1);

  --button-hover-bg-color: #3b79f9; /* Vibrant blue for hover */
  --button-hover-text-color: #ffffff;

  --feedback-popup-bg-color: var(--button-hover-bg-color);
  --feedback-popup-text-color: var(--button-hover-text-color);

  --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  line-height: 1.6;
}

.content-wrapper {
  width: 100%;
  max-width: 650px; /* Slightly wider to accommodate button min-widths */
}

.title-container {
  margin-bottom: 35px;
  text-align: left;
}

.title-container h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-color);
}

.title-container p {
  font-size: 1.1rem;
  color: var(--text-secondary-color);
  font-weight: 400;
}

.buttons-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
}

.button-item {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 260px; /* Adjusted for icon + text + copy icon */
  padding: 10px 16px; /* Adjusted padding */
  background-color: var(--button-bg-color);
  border: 1px solid var(--button-border-color);
  border-radius: 6px; /* Rounded corners like wrdg.net */
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--button-text-color);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out,
    color 0.2s ease-in-out, transform 0.1s ease-out,
    border-color 0.2s ease-in-out;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.button-item:hover {
  background-color: var(--button-hover-bg-color);
  color: var(--button-hover-text-color);
  border-color: var(
    --button-hover-bg-color
  ); /* Make border match hover bg */
  transform: translateY(-2px);
}
.button-item:active {
  transform: translateY(0px);
}

.button-prefix-icon {
  width: 1em; /* Scales with font-size */
  height: 1em; /* Scales with font-size */
  margin-right: 10px;
  fill: currentColor; /* Inherits button text color */
  flex-shrink: 0; /* Prevents icon from shrinking */
}

.button-item .button-text {
  transition: opacity 0.1s ease-in-out;
  flex-grow: 1; /* Allow text to take available space if needed */
  text-align: left;
}

.button-item .copy-icon {
  display: inline-block;
  margin-left: 12px; /* Increased margin for better spacing */
  width: 1em; /* Scales with font-size */
  height: 1em; /* Scales with font-size */
  fill: currentColor;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out,
    fill 0.2s ease-in-out, transform 0.1s ease;
  flex-shrink: 0;
}

.button-item .copy-icon:active {
  transform: scale(0.95);
}

/* Footer for Copyright */
footer {
  position: fixed;
  bottom: 20px;
  right: 25px;
  font-size: 0.8rem;
  color: var(--copyright-text-color);
  z-index: 500; /* Below copy feedback popup */
}

/* Copy Feedback Popup */
.copy-feedback-popup {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: var(--feedback-popup-bg-color);
  color: var(--feedback-popup-text-color);
  padding: 10px 20px;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease,
    transform 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.copy-feedback-popup.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .content-wrapper {
    max-width: 90%;
  }
  .title-container h1 {
    font-size: 1.9rem;
  }
  .title-container p {
    font-size: 1rem;
  }
  .buttons-container {
    gap: 10px;
    justify-content: center; /* Center buttons when they wrap */
  }
  .button-item {
    padding: 9px 14px;
    font-size: 0.85rem;
    min-width: 0; /* Allow buttons to shrink and wrap naturally */
    width: calc(
      100% - 10px
    ); /* Make buttons take full width on smaller screens, adjust as needed */
    max-width: 350px; /* Optional: prevent them from becoming too wide */
    justify-content: center; /* Center content within button */
  }
  .button-item .button-text {
    text-align: center;
  }
  footer {
    position: relative; /* Change footer position on mobile */
    text-align: center;
    margin-top: 30px;
    bottom: auto;
    right: auto;
    width: 100%;
  }
}

@media (max-width: 480px) {
  body {
    padding: 15px;
    align-items: flex-start;
    padding-top: 30px;
  }
  .title-container {
    text-align: center;
    margin-bottom: 25px;
  }
  .title-container h1 {
    font-size: 1.7rem;
  }
  .title-container p {
    font-size: 0.9rem;
  }
  .button-item {
    padding: 8px 12px;
    font-size: 0.8rem;
    /* width: 100%; /* Ensure full width */
  }
}
