/* ---------------------------
   Base / Reset
---------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: #111;
  background: #fafafa;
  line-height: 1.6;
}

/* ---------------------------
   Layout
---------------------------- */

.app-header {
  padding: 2rem 3rem;
  border-bottom: 1px solid #e5e5e5;
}

.subtitle {
  color: #666;
  max-width: 40rem;
}

.app-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: calc(100vh - 96px);
}

/* ---------------------------
   Controls Panel
---------------------------- */

.controls {
  padding: 2rem;
  border-right: 1px solid #e5e5e5;
  background: #fff;
}

.controls section {
  margin-bottom: 2rem;
}

.controls h2 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-bottom: 1rem;
}

.control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.control-row label {
  font-size: 0.875rem;
}

.color-value,
.font-value {
  display: block;
  font-size: 0.75rem;
  color: #666;
}

button {
  font-family: inherit;
  font-size: 0.75rem;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
}

button:hover {
  background: #f5f5f5;
}

button.primary {
  background: #111;
  color: #fff;
  border-color: #111;
}

.actions {
  display: flex;
  gap: 0.5rem;
}

.contrast-status {
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

/* ---------------------------
   Preview Area
---------------------------- */

.preview {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.preview-card {
  max-width: 520px;
  padding: 3rem;
  border-radius: 8px;
  transition: background 0.3s ease, color 0.3s ease;
}

.preview-card h1 {
  font-size: 2rem;
  margin-top: 0;
}

.preview-button {
  margin-top: 1.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  border: none;
  font-size: 0.875rem;
  cursor: pointer;
}

input[type="color"],
input[type="range"] {
  width: 100%;
  margin-top: 0.25rem;
}

@media (max-width: 768px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .controls {
    border-right: none;
    border-bottom: 1px solid #e5e5e5;
  }

  .preview {
    padding: 2rem 1.5rem;
  }

  .preview-card {
    padding: 2rem;
  }

  .actions {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}