/* --- START: Theme Variables --- */
:root {
  --bg-color: #f9fafb;
  --card-bg-color: #ffffff;
  --text-color: #141413;
  --text-secondary: #374151;
  --border-color: #D1D5DB;
  --btn-bg: #141413;
  --btn-text: #FAFAF8;
  --btn-hover-bg: #374151;
  --shadow-color: rgba(0, 0, 0, 0.06);
  --input-color: #374151;
}

[data-theme="dark"] {
  --bg-color: #111827;
  --card-bg-color: #1F2937;
  --text-color: #f9fafb;
  --text-secondary: #9CA3AF;
  --border-color: #4B5563;
  --btn-bg: #f9fafb;
  --btn-text: #111827;
  --btn-hover-bg: #D1D5DB;
  --shadow-color: rgba(0, 0, 0, 0.2);
  --input-color: #f9fafb;
}
/* --- END: Theme Variables --- */

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color); /* MODIFIED */
  color: var(--text-secondary); /* MODIFIED */
  transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition */
}

header {
  width: 100%;
  padding: 24px 16px;
  background: var(--card-bg-color); /* MODIFIED */
  box-shadow: 0 1px 2px var(--shadow-color); /* MODIFIED */
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  position: relative; /* Added for toggle button positioning */
}

/* --- START: Theme Toggle Button Style --- */
.theme-toggle {
  position: absolute;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.theme-toggle:hover {
  background-color: var(--bg-color);
}
/* --- END: Theme Toggle Button Style --- */


.header-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-content img {
  width: 43px;
  height: 52px;
}

.header-content div {
  color: var(--text-color); /* MODIFIED */
  font-size: 32px;
  font-weight: 400;
  line-height: 60px;
}

main {
  padding: 50px 20px;
  max-width: 1200px;
  margin: auto;
}

.title-section {
  text-align: center;
  margin-bottom: 40px;
}

.title-section h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 38px;
  margin: 0;
  color: var(--text-color); /* MODIFIED */
}

.title-section p {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
}

.input-section {
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
}

input {
  width: 399px;
  padding: 9px 13px;
  background: var(--card-bg-color); /* MODIFIED */
  border: 1px solid var(--border-color); /* MODIFIED */
  border-radius: 6px;
  font-size: 14px;
  color: var(--input-color); /* MODIFIED */
  box-shadow: 0px 1px 2px var(--shadow-color); /* MODIFIED */
}

input::placeholder {
  color: var(--text-secondary); /* MODIFIED */
}

button {
  width: 183px;
  padding: 9px 17px;
  background: var(--btn-bg); /* MODIFIED */
  color: var(--btn-text); /* MODIFIED */
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
  box-shadow: 0px 1px 2px var(--shadow-color); /* MODIFIED */
}

button:hover {
  background: var(--btn-hover-bg); /* MODIFIED */
}

.swatches-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 50px;
  min-height: 375px;
}

.color-swatch {
  width: 200px;
  height: 300px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  box-sizing: border-box;
  color: white;
  font-family: 'Inter', sans-serif;
  transition: transform 0.2s ease-in-out;
  cursor: pointer;
}

.color-swatch:hover {
  transform: translateY(-5px);
}

.swatch-info {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 8px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.output-container {
  width: 100%;
  padding: 40px 20px;
  box-sizing: border-box;
  text-align: center;
}

#output {
  color: var(--text-secondary); /* MODIFIED */
  font-size: 16px;
  line-height: 24px;
  max-width: 800px;
  margin: auto;
  min-height: 48px;
}

