/* CSS is how you can add style to your website, such as colors, fonts, and positioning of your
   HTML content. To learn how to do something, just try searching Google for questions like
   "how to change link color." */

HTML CSSResult Skip Results Iframe
EDIT ON
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-color: #f8fafc;
  --text-color: #1e293b;
  --header-bg: #e2e8f0;
  --btn-bg: #3b82f6;
  --btn-text: #ffffff;
  --toggle-bg: #94a3b8;
  --toggle-circle: #ffffff;
  --block-1: #ec4899;
  --block-2: #facc15;
  --block-3: #22c55e;
  --block-4: #6366f1;
}

:has(#dark-mode-toggle:checked) {
  --bg-color: #0f172a;
  --text-color: #e2e8f0;
  --header-bg: #1e293b;
  --btn-bg: #14b8a6;
  --btn-text: #0f172a;
  --toggle-bg: #475569;
  --toggle-circle: #0f172a;
  --block-1: #f43f5e;
  --block-2: #f97316;
  --block-3: #84cc16;
  --block-4: #3b82f6;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

.header {
  font-family: "Merriweather", serif;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: var(--header-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: background 0.3s;
}

.logo {
  font-size: 1.5em;
  font-weight: bold;
}

/* Dark Mode Toggle */
#dark-mode-toggle {
  display: none;
}

.toggle {
  display: inline-block;
  width: 60px;
  height: 30px;
  background: var(--toggle-bg);
  border-radius: 30px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
}

.toggle::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: var(--toggle-circle);
  border-radius: 50%;
  transition: transform 0.3s;
}

#dark-mode-toggle:checked + .toggle::before {
  transform: translateX(30px);
}

/* Hero Section */
.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  padding: 50px 20px;
  text-align: center;
}

.hero .content {
  max-width: 800px;
}

.hero h1 {
  font-family: "Merriweather", serif;
  font-size: 2.5em;
  margin-bottom: 20px;
}

.hero p {
  font-family: "Poppins", sans-serif;
  font-size: 1.2em;
  margin-bottom: 30px;
}

.btn {
  font-family: "Poppins", sans-serif;
  padding: 10px 20px;
  font-size: 1em;
  background: var(--btn-bg);
  color: var(--btn-text);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.3s, color 0.3s;
}

.btn:hover {
  background: var(--btn-text);
  color: var(--btn-bg);
}

/* Color Blocks */
.color-blocks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px;
}

.block {
  height: 200px;
  border-radius: 12px;
  transition: background 0.3s;
}

.block-1 {
  background: var(--block-1);
}

.block-2 {
  background: var(--block-2);
}

.block-3 {
  background: var(--block-3);
}

.block-4 {
  background: var(--block-4);
}