:root {
  --primary-color: #e0e0e0;
  --accent-color: #7c3aed;
  --accent-hover: #9333ea;
  --secondary-color: #6b7280;
  --background-color: #0f0f0f;
  --container-bg: #1a1a1a;
  --input-bg: #252525;
  --border-color: #2d2d2d;
  --border-color-check: #9233ea1f;
  --font-family: "Inter", sans-serif;
}

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

body {
  background: var(--background-color);
  color: var(--primary-color);
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  max-width: 540px;
  width: 100%;
  background: var(--container-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #e0e0e0 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

span {
  font-size: 0.9rem;
  display: block;
  word-break: break-word;
}

.total-itens {
  display: inline;
  color: var(--accent-color);
  font-weight: bold;
  flex: 1;
  font-size: 0.95rem;
  word-break: break-word;
  white-space: normal;
}

input[type="text"] {
  display: block;
  width: 100%;
  font-size: 1rem;
  height: 50px;
  padding: 0 18px;
  border: 2px solid var(--border-color);
  background: var(--input-bg);
  border-radius: 10px;
  color: var(--primary-color);
  margin-bottom: 12px;
  font-family: var(--font-family);
  transition: all 0.3s ease;
}

input[type="text"]:focus {
  border-color: var(--accent-color);
  background: var(--background-color);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

input[type="text"]::placeholder {
  color: var(--secondary-color);
}

.btn-adicionar {
  width: 100%;
  font-size: 1.05rem;
  height: 54px;
  border: none;
  background: linear-gradient(
    135deg,
    var(--accent-color) 0%,
    var(--accent-hover) 100%
  );
  color: #ffffff;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-family);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
  margin-bottom: 32px;
}

.btn-adicionar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

/* Lista */
.lista-itens {
  list-style: none;
  margin-top: 20px;
}

.lista-itens li {
  background: var(--input-bg);
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border-color);
  animation: aparecer 0.3s ease;
  transition: opacity 0.3s ease;
}

/* Item marcado fica esmaecido */
.lista-itens li.marcado {
  opacity: 0.45;
  border-color: var(--border-color-check);
  box-shadow: 0px 1px 12px 4px var(--border-color-check);
  -webkit-box-shadow: 0px 1px 12px 4px var(--border-color-check);
  -moz-box-shadow: 0px 1px 12px 4px var(--border-color-check);
}

.lista-itens li.marcado .texto-item {
  text-decoration: line-through;
  color: var(--secondary-color);
}

@keyframes aparecer {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Texto do item ocupa o espaço disponível */
.texto-item {
  flex: 1;
  font-size: 0.95rem;
}

/* Checkbox customizado */
.checkbox-item {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  background: var(--background-color);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.checkbox-item:hover {
  border-color: var(--accent-color);
}

.checkbox-item:checked {
  background: var(--accent-color);
  border-color: var(--accent-color);
}

.checkbox-item:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

/* Botão Remover */
.btn-remover {
  padding: 6px 12px;
  font-size: 0.75rem;
  border: none;
  background: #880a0a28;
  color: #ef4444;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-remover:hover {
  background: #ef4444;
  color: white;
}

@media (max-width: 600px) {
  .container {
    padding: 32px 20px;
  }
  h1 {
    font-size: 1.75rem;
  }
}
