:root {
  --color-primary: #4B69FD;
  --color-secondary: #FFF9EB;
  --color-tertiary: #C4C4C4;
  --color-quaternary: #FFF9C4;
  --color-button: #fe652b;
  --color-button-hover: #e55720;
  --color-text: #444444;
  --color-white: #FFFFFF;
  --color-primary-hover: #3d56c6;
}

/* Estilos gerais */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  height: 100vh;
  background-color: var(--color-primary);
  display: flex;
  justify-content: center;
  align-items: center;
}

.main-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

/* Banner */
.header-banner {
  flex: 40%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0 0;
}

/* Seção de entrada */
.input-section {
  flex: 60%;
  background-color: var(--color-secondary);
  border: 1px solid #000;
  border-radius: 64px 64px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 20px 0;
  width: 100%;
}

/* Títulos */
.main-title {
  font-size: 48px;
  font-family: "Merriweather", serif;
  font-weight: 900;
  font-style: italic;
  color: var(--color-white);
}

.section-title {
  font-family: "Inter", serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 10px 0;
  text-align: center;
}

/* Contêineres de entrada e botão */
.input-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 600px;
  margin-top: 20px;
}

.input-name {
  width: 100%;
  padding: 10px;
  border: 2px solid #000;
  border-radius: 25px 0 0 25px;
  font-size: 16px;
}

.button-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  max-width: 600px;
  margin-top: 10px;
  margin-bottom: 10px;
}

/* Estilos de entrada de texto */
.input-title {
  flex: 1;
  padding: 10px 15px;
  font-size: 16px;
  border: 2px solid #333;
  border-right: none;
  border-radius: 25px 0 0 25px;
  font-family: "Merriweather", serif;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Estilos de botão */
button {
  padding: 15px 30px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  border: 2px solid #000;
  border-radius: 25px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.button-add {
  background-color: var(--color-tertiary);
  color: var(--color-text);
  border-radius: 0 25px 25px 0;
}

.button-add:hover {
  background-color: #a1a1a1;
}

/* Listas */
ul {
  list-style-type: none;
  color: var(--color-text);
  font-family: "Inter", sans-serif;
  font-size: 18px;
  margin: 20px 0;
}

.table-container {
  width: 100%;
  max-width: 600px;
  margin-top: 20px 0;
  font-family: "Inter", sans-serif;
  font-size: 18px;
  color: var(--color-text);
  background-color: var(--color-quaternary);
}

.table-border {
  padding: 20px 0px;
  border: 1px solid #000;
  border-radius: 25px;
}

.table-wrapper {
  max-height: 300px;
  overflow-y: auto;
  display: block;
  background: none;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--color-text) var(--color-quaternary);
  width: 100%;
}

.table-wrapper td {
  width: 100%;
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.table-wrapper th {
  background-color: var(--color-quaternary);
  font-weight: bold;
  color: var(--color-text);
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Coluna do nome - ocupa a maior parte do espaço */
.col-nome {
  width: 80%;
}

/* Coluna das ações - ocupa espaço mínimo necessário */
.col-acoes {
  width: 20%;
  text-align: center;
}

/* Container para os botões de ação */
.acoes-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
}

/* Estilos para os ícones de ação */
.acoes-container a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.acoes-container a:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.acoes-container .editar {
  color: var(--color-primary);
}

.acoes-container .deletar {
  color: red;
}

.result-list {
  margin-top: 15px;
  color: var(--color-button);
  font-size: 22px;
  font-weight: bold;
  text-align: center;
}

/* Botão de sortear título */
.button-draw,
.button-clear {
  display: flex;
  align-items: center;
  width: 300px;
  padding: 10px 40px;
  color: var(--color-white);
  font-size: 16px;
}

.button-draw {
  background-color: var(--color-button);
}

.button-clear {
  background-color: var(--color-primary);
}

.button-draw img,
.button-clear img {
  margin-right: 40px;
}

.button-draw:hover {
  background-color: var(--color-button-hover);
}

.button-clear:hover {
  background-color: var(--color-primary-hover);
}

.error-message {
  color: red;
  font-family: "Inter", serif;
  font-size: 18px;
  font-weight: 700;
  margin: 10px 0;
  text-align: center;
}

.button-draw:disabled {
  opacity: 0.5;
  cursor: default;
  position: relative;
}

.button-draw:disabled:hover::after {
  content: "Precisa ter mais de 1 nome para sortear.";
  position: absolute;
  left: 50%;
  top: 110%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 15px;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

footer {
  font-family: "Inter", sans-serif;
  margin-top: auto;
  text-align: center;
  margin-bottom: 5px;
}

/* ===== RESPONSIVIDADE SIMPLES ===== */

/* Mobile (até 767px) */
@media screen and (max-width: 767px) {

  .button-container {
    flex-direction: column;
    gap: 10px;
  }

  .button-draw,
  .button-clear {
    width: 100%;
  }

  .main-title {
    font-size: 32px;
  }

  .section-title {
    font-size: 24px;
  }

  .input-name {
    font-size: 14px;
  }

  button {
    font-size: 14px;
  }

  .table-wrapper td {
    font-size: 14px;
  }

  .result-list {
    font-size: 18px;
  }

  .error-message {
    font-size: 14px;
  }

  .header-banner {
    flex-direction: column;
    gap: 10px;
  }

  .header-banner img {
    width: 240px;
    height: auto;
  }

  .input-section {
    flex: 1;
    min-height: calc(100vh - 150px);
  }
}