#text-tool {
  max-width: 720px;
  margin: 2rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Enhanced shadow */
  font-family: "Inter", sans-serif; /* Changed font to Inter */
  color: #333;
  text-align: center; /* Center content within the tool */
}

#text-tool h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 2.2rem; /* Slightly larger heading */
  color: #222; /* Darker for better contrast */
  font-weight: 700; /* Bolder */
}

input[type="file"] {
  display: block;
  margin: 1.5rem auto; /* More vertical space */
  padding: 0.5rem; /* Add some padding */
  border: 1px solid #ddd;
  border-radius: 8px; /* Rounded corners */
  width: calc(100% - 2rem); /* Adjust width for padding */
  max-width: 300px; /* Limit max width */
  box-sizing: border-box; /* Include padding in width */
}

.button-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem; /* More space */
  flex-wrap: wrap; /* Allow buttons to wrap on small screens */
}

.button-group button,
.download-btn,
.copy-btn { /* Apply styles to all buttons */
  background-color: #FF8A08; /* Your orange color */
  border: none;
  color: white;
  padding: 0.8rem 1.5rem; /* Larger padding for better touch targets */
  font-size: 1rem; /* Slightly larger font */
  border-radius: 8px; /* More rounded corners */
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow */
  min-width: 120px; /* Ensure minimum width */
}

.button-group button:hover,
.download-btn:hover,
.copy-btn:hover {
  background-color: #e97706; /* Darker orange on hover */
  transform: translateY(-2px); /* Slight lift effect */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Enhanced shadow on hover */
}

.button-group button:active,
.download-btn:active,
.copy-btn:active {
  transform: translateY(0); /* Reset lift on click */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Reset shadow on click */
}

/* Disabled button style */
.button-group button:disabled,
.download-btn:disabled,
.copy-btn:disabled {
    background-color: #cccccc !important;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}


/* Download Section */
#downloadSection {
  padding: 1.5rem;
  background: #f9f9f9;
  border-radius: 10px;
  border: 1px solid #eee;
  margin-top: 2rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05); /* Inner shadow */
}

#downloadSection p {
  font-size: 1.1rem;
  font-weight: bold;
  color: #555;
  margin-bottom: 1rem;
}

/* HTML Tags section */
.html-tags {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0; /* Separator line */
}

.html-tags h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #333;
}

#htmlSnippet {
  width: 100%;
  height: 160px; /* Increased height */
  margin-top: 0.8rem;
  font-family: 'Fira Code', 'Courier New', monospace; /* Monospace font for code */
  font-size: 0.95rem;
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #f8f8f8;
  resize: vertical; /* Allow vertical resizing */
  box-sizing: border-box; /* Include padding in width */
  line-height: 1.5; /* Better readability */
}

/* Hidden Utility Class */
.hidden {
  display: none !important; /* Use !important to override inline styles or other rules */
}

/* Message Display */
#messageDisplay {
    margin-top: 1rem;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    background-color: #f0f0f0; /* Neutral background */
    border: 1px solid #ddd;
    color: #333;
    transition: all 0.3s ease;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
  #text-tool {
    padding: 1.5rem;
    margin: 1rem;
    border-radius: 8px;
  }
  h2 {
    font-size: 1.8rem;
  }
  .button-group {
    flex-direction: column; /* Stack buttons vertically */
    gap: 0.8rem;
  }
  .button-group button,
  .download-btn,
  .copy-btn {
    width: 100%; /* Full width for stacked buttons */
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
  }
  input[type="file"] {
    width: 100%;
    max-width: none; /* Remove max-width on small screens */
  }
  #htmlSnippet {
    height: 120px; /* Adjust height for smaller screens */
    font-size: 0.85rem;
  }
}