:root {
    --bg-light: #f9f9f9;
    --text-light: #333;
    --bg-dark: #1f1f1f;
    --text-dark: #eee;
    --primary: #6f4e37;
    --accent: #d4a373;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

main {
    margin: 0;
    font-family: 'Arial', sans-serif;
    padding: 30px;
    display: flex;
    justify-content: center;
    transition: background 0.3s, color 0.3s;
}

body.light {
    background-color: var(--bg-light);
    color: var(--text-light);
}

body.dark {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

.app-container {
    max-width: 500px;
    width: 100%;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
    transition: background 0.3s, color 0.3s;
}

body.dark .app-container {
    background: #2b2b2b;
}

h2 {
    text-align: center;
    color: var(--primary);
}

label, select, input {
    display: block;
    width: 100%;
    margin-top: 10px;
    font-size: 16px;
}

input, select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.app-button {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    color: white;
    background-color: var(--primary);
    cursor: pointer;
    transition: background 0.3s;
}

.app-button:hover {
    background-color: #593823;
}

#resultado {
    margin-top: 15px;
    font-weight: bold;
    text-align: center;
}

.etapa {
    margin-top: 25px;
    text-align: center;
}

#timerDisplay {
    font-size: 2em;
    margin-top: 20px;
    color: var(--accent);
    font-weight: bold;
}

#etapaAtual {
    margin-top: 10px;
    font-size: 1.1em;
}

#qtdeParcialTexto {
    margin-top: 20px;
    font-size: 1.1em;
}

#qtdeParcial {
    margin-top: 5px;
    font-size: 1.5em;
    font-weight: bold;
}

#etapasSugestao {
    margin-top: 10px;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-group button {
    flex: 1;
}

.theme-toggle {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
    flex-wrap: wrap;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-top: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #666;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

@media (max-width: 768px) {
  .app-container {
    font-size: 18px;
  }

  main {
    padding: 10px 0 10px;
  }

}

@media (max-width: 480px) {
  .app-container {
    padding: 10px;
    font-size: 16px;
  }
  
  main {
    padding: 10px 0 10px;
  }

  body {
    padding: 10px;
  }

  .etapa {
    margin-top: 10px;
  }
}

@keyframes piscar {
    0%, 100% { color: inherit; }
    50% { color: red; }
}

.piscar {
    animation: piscar 0.8s infinite;
}
