* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f9fafb;
  color: #1f2937;
  line-height: 1.6; /* Slightly wider line spacing for readability */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; /* Allow header elements to wrap */
  gap: 1rem; /* Space between header elements */
}

.logo {
  display: flex;
  align-items: center;
}

.logo-icon {
  margin-right: 0.5rem;
  color: #4f46e5;
}

.logo-text {
  font-weight: 700;
  font-size: 1.25rem;
  color: #1f2937;
}

.color-format {
  padding: 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid #d1d5db;
  font-size: 0.875rem;
}

main {
  flex: 1;
  padding: 1.5rem 0;
}

.controls {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem; /* Slightly increased padding */
  margin-bottom: 1.5rem;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem; /* Adjusted gap between controls */
  align-items: flex-end;
}

.control-group {
    flex: 1; /* Groups expand evenly */
    min-width: 180px; /* Minimum width for groups */
}

.control-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem; /* Adjusted margin below label */
  color: #4b5563;
}

.color-input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.color-picker {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid #d1d5db; /* Added border for visibility */
  border-radius: 0.375rem; /* Rounded corners */
  cursor: pointer;
  background-color: #fff; /* Background color */
}
/* Webkit browsers */
.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}
.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 0.25rem;
}
/* Firefox */
.color-picker::-moz-color-swatch {
    border: none;
    border-radius: 0.25rem;
}


.color-text {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  width: 7rem; /* Slightly wider */
}

.pattern-select {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.6rem 0.75rem; /* Adjusted padding */
  font-size: 0.875rem;
  width: 100%; /* Full width */
  background-color: #fff; /* Added background color */
}

/* --- Removed unnecessary file input styles --- */

.content-card {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 2rem; /* Margin to content below */
}

.tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  background-color: #f9fafb; /* Slightly different tab background */
}

.tab {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.25rem; /* Adjusted padding */
  font-size: 0.9rem; /* Adjusted font size */
  font-weight: 600; /* Slightly bolder */
  cursor: pointer;
  color: #6b7280;
  background: none;
  border: none;
  border-bottom: 3px solid transparent; /* Thicker underline */
  transition: color 0.2s, border-color 0.2s; /* Added transitions */
  margin-bottom: -1px; /* Overlap with border */
}

.tab.active {
  color: #4f46e5;
  border-bottom-color: #4f46e5; /* Active tab underline */
}

.tab:hover:not(.active) {
  color: #1f2937;
  border-bottom-color: #d1d5db; /* Hover underline */
}

.tab-icon {
  margin-right: 0.5rem;
}

.tab-content {
  padding: 1.5rem; /* Increased content padding */
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* Adjusted card minimum width */
  gap: 1.5rem; /* Adjusted gap between cards */
}

.color-card {
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem; /* Adjusted padding */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: flex; /* Flexbox layout */
  flex-direction: column; /* Vertical alignment */
}

.color-preview {
  height: 8rem; /* Adjusted preview height */
  border-radius: 0.375rem;
  margin-bottom: 1rem; /* Adjusted bottom margin */
  border: 1px solid #f3f4f6; /* Light border added */
}

.color-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto; /* Align to bottom */
}

.color-code {
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  word-break: break-all;
  flex-grow: 1; /* Code area expands */
  margin-right: 0.5rem; /* Margin between code and button */
}

.copy-btn {
  padding: 0.3rem; /* Adjusted padding */
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, transform 0.1s; /* Added transform */
  border-radius: 50%; /* Rounded */
}

.copy-btn:hover {
  color: #4f46e5;
  background-color: #eef2ff; /* Hover background */
}
.copy-btn:active {
    transform: scale(0.9); /* Click animation */
}


.copied {
  padding: 0.3rem; /* Adjusted padding */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
  font-size: 0.75rem;
  font-weight: 500; /* Slightly bolder */
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem; /* Adjusted gap between previews */
}

@media (min-width: 768px) {
  .preview-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.preview-title {
  display: flex;
  align-items: center;
  font-size: 1rem; /* Slightly larger title */
  font-weight: 600; /* Slightly bolder */
  color: #374151; /* Slightly darker color */
  margin-bottom: 1rem; /* Adjusted margin */
  border-bottom: 1px solid #e5e7eb; /* Added underline */
  padding-bottom: 0.5rem; /* Underline spacing */
}

.preview-icon {
  margin-right: 0.5rem; /* Adjusted icon margin */
  color: #4f46e5; /* Icon color */
}

.website-preview, .ui-preview {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem; /* Slightly larger radius */
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07); /* Slightly adjusted shadow */
  background-color: #fff;
}

.website-header {
  padding: 1rem 1.5rem; /* Adjusted padding */
}

.website-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.website-logo {
  font-weight: 700;
  color: #fff;
  font-size: 1.1rem; /* Adjusted logo size */
}

.website-menu {
  display: flex;
  gap: 1rem; /* Adjusted menu gap */
}

.menu-item {
  color: #fff;
  font-size: 0.9rem; /* Adjusted menu font size */
  opacity: 0.9; /* Slightly transparent */
}

.website-content {
  padding: 1.5rem; /* Adjusted content padding */
  background-color: #fff;
}

.website-heading {
  font-size: 1.25rem; /* Adjusted heading size */
  font-weight: 700;
  margin-bottom: 0.75rem; /* Adjusted margin */
}

.website-text {
  font-size: 0.9rem; /* Adjusted text size */
  color: #4b5563; /* Slightly darker text */
  margin-bottom: 1.5rem; /* Adjusted margin */
}

.website-buttons {
  display: flex;
  gap: 0.75rem; /* Adjusted button gap */
}

.primary-btn, .secondary-btn {
  padding: 0.5rem 1rem; /* Adjusted button padding */
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600; /* Slightly bolder */
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s; /* Added transitions */
}

.primary-btn {
  color: #fff;
}
.primary-btn:hover {
    opacity: 0.9; /* Slightly transparent on hover */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Hover shadow */
}

.secondary-btn {
  background-color: transparent;
}
 .secondary-btn:hover {
    background-color: rgba(0, 0, 0, 0.05); /* Hover background */
}


.ui-preview {
  padding: 1.5rem; /* Adjusted padding */
}

.ui-components {
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* Adjusted gap between components */
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem; /* Adjusted margin */
  font-size: 0.875rem;
  font-weight: 500;
}

.text-input {
  width: 100%;
  padding: 0.6rem 0.75rem; /* Adjusted padding */
  border: 1px solid;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s; /* Transitions */
}
.text-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3); /* Focus style */
    border-color: #4f46e5;
}

.checkbox-group {
  display: flex;
  align-items: center;
}

.checkbox {
  height: 1.1rem; /* Adjusted size */
  width: 1.1rem; /* Adjusted size */
  cursor: pointer;
  accent-color: #4f46e5; /* Checked color */
}

.checkbox-label {
  margin-left: 0.6rem; /* Adjusted margin */
  font-size: 0.9rem; /* Adjusted size */
  color: #4b5563;
  cursor: pointer;
}

.alert-box {
  padding: 1rem; /* Adjusted padding */
  border-radius: 0.375rem;
  border-left-width: 4px;
}

.alert-text {
  font-size: 0.9rem; /* Adjusted size */
  font-weight: 500; /* Slightly bolder */
}

.color-dots {
  display: flex;
  gap: 0.5rem; /* Adjusted dot gap */
  margin-top: 0.5rem; /* Top margin */
}

.color-dot {
  height: 0.75rem; /* Adjusted dot size */
  width: 0.75rem; /* Adjusted dot size */
  border-radius: 9999px;
  border: 1px solid rgba(0, 0, 0, 0.1); /* Light border */
}

/* --- SEO Content Section Styles --- */
#seo-content {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 2rem 1.5rem; /* Generous padding */
    margin-top: 2rem; /* Top margin */
}

#seo-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4f46e5; /* Theme color */
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb; /* Underline */
}

#seo-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 1.8rem;
    margin-bottom: 1rem;
}

#seo-content p {
    margin-bottom: 1rem;
    color: #374151; /* Adjusted text color */
}

#seo-content ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    color: #374151;
}
 #seo-content ul li {
    margin-bottom: 0.5rem;
}

 #seo-content strong {
     color: #4f46e5; /* Emphasized text color */
 }

footer {
  background-color: #fff; /* Footer background */
  padding: 1.5rem 0; /* Adjusted padding */
  margin-top: 2rem; /* Margin from main */
}

.footer-text {
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
}

/* SVG Icons */
.icon {
  height: 1.5rem;
  width: 1.5rem;
  display: inline-block;
  vertical-align: middle;
}

.icon-sm {
  height: 1.1rem; /* Adjusted icon size */
  width: 1.1rem; /* Adjusted icon size */
}

/* Responsive */
@media (max-width: 640px) {
    .control-row {
        gap: 1rem;
    }
    .control-group {
        min-width: 100%; /* Stack vertically on mobile */
    }
    .header-content {
        justify-content: center; /* Center header */
    }
     .tabs {
         overflow-x: auto; /* Scroll if tabs overflow */
         white-space: nowrap;
     }
}
