body {
  background: #1a1a1a;
  color: #fafafa;
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}
header {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 32px;
}
header h1 {
  font-size: 2.7rem;
  background: linear-gradient(90deg,#43cea2,#185a9d);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  font-weight: bold;
  letter-spacing: 2px;
  margin-bottom: 12px;
  text-transform: uppercase;
}
header h2 {
  font-size: 1.4rem;
  color: #c7e7ff;
  font-weight: 400;
  letter-spacing: 0.8px;
  margin-bottom: 0;
}
.container {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100vw;
  max-width: 1200px;
  margin: 0 auto;
  gap: 32px;
  flex-wrap: wrap;
}
.card {
  background: #23272f;
  padding: 18px 14px 16px 14px;
  border-radius: 14px;
  box-shadow: 0 4px 16px #0008;
  min-width: 210px;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 260px;
  max-width: 350px;
}
.card h3 {
  font-size: 1.15rem;
  color: #00ffe7;
  margin-bottom: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-align: center;
}
.color-result, .calc-result {
  font-size: 1.05rem;
  background: #262626;
  padding: 8px 15px;
  border-radius: 8px;
  box-shadow: 0 2px 6px #0007;
  text-align: center;
  margin-top: 20px;
  margin-bottom: 0;
  width: 95%;
  word-break: break-all;
}
#colorValue {
  font-family: 'Fira Mono', 'Menlo', 'Consolas', monospace;
  font-size: 1.05em;
  color: #fc0;
  letter-spacing: 1px;
}
.calc-btns button {
  width: 36px; height: 36px;
  margin: 2px;
  font-size: 1.07em;
  background: #383838;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.calc-btns button:hover {
  background: #185a9d;
}
#calcDisplay {
  width: 152px;
  margin-bottom: 8px;
  font-size: 1.11em;
  text-align: right;
  border: none;
  background: #181818;
  color: #00ffe7;
  border-radius: 6px;
  padding: 6px 7px;
}
#libName {
  width: 90%;
  padding: 6px 7px;
  border-radius: 6px;
  border: none;
  margin-bottom: 6px;
  background: #181818;
  color: #fff;
}
#libraryList {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}
#libraryList li {
  background: #262626;
  margin: 5px 0;
  padding: 7px 10px;
  border-radius: 7px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 0.98em;
  word-break: break-all;
}
#libraryList li span {
  word-break: break-all;
  max-width: 65%;
  display: inline-block;
}
#libraryList li button {
  background: #43cea2;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  padding: 2px 10px;
  color: #222;
  font-weight: 500;
  transition: background 0.2s;
  margin-left: 6px;
  white-space: nowrap;
}
#libraryList li button:hover {
  background: #28b485;
  color: #fff;
}
#libraryList li button.remove-btn {
  background: #ff6868;
  color: #fff;
  margin-left: 8px;
  transition: background 0.2s;
}
#libraryList li button.remove-btn:hover {
  background: #b62a2a;
}
/* Contraste de cores */
#contrastExample {
  transition: background 0.2s, color 0.2s;
}
/* Cronômetro */
.timer-btn {
  background: #43cea2;
  color: #222;
  border: none;
  border-radius: 6px;
  padding: 6px 18px;
  font-weight: bold;
  margin: 0 4px;
  cursor: pointer;
  transition: background 0.2s;
}
.timer-btn:hover {
  background: #28b485;
  color: #fff;
}
@media (max-width: 1100px) {
  .container { flex-wrap: wrap; gap: 20px; }
  .card { min-width: 180px; max-width: 95vw; }
}
@media (max-width: 820px) {
  .container { flex-direction: column; align-items: center; gap:14px;}
  .card { margin-top: 0; min-width: 165px;}
}
