* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #4a90e2;
  --primary-dark: #357ab8;
  --background: linear-gradient(135deg, #e0eafc, #cfdef3);
  --text: #333;
  --white: #fff;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--background);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

main {
  text-align: center;
  width: 100%;
}

h1 {
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.box {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 420px;
  margin: auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.box:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.12);
}

.color {
  width: 100%;
  height: 240px;
  margin-bottom: 1.2rem;
  border-radius: 12px;
  background-color: #cccccc;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.6rem;
  font-weight: 600;
  color: #333;
  transition: 
    background-color 0.4s ease,
    color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.color:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.color-code {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

button.generate {
  padding: 14px 24px;
  width: 100%;
  border: none;
  border-radius: 10px;
  background-color: var(--primary);
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

button.generate:hover {
  background-color: var(--primary-dark);
  transform: scale(1.04);
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.7rem;
  }

  .box {
    padding: 1.5rem;
  }

  .color {
    height: 180px;
    font-size: 1.3rem;
  }

  .color-code {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  .color {
    height: 140px;
    font-size: 1.1rem;
  }

  button.generate {
    padding: 12px 20px;
    font-size: 0.95rem;
  }
}
