/* Reset básico */
* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f0f4f8, #d9e2ec);
  min-height: 100vh;
  padding: 20px;
}

/* Container principal */
.container {
  background: #fff;
  padding: 25px 20px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 650px;
  margin: 0 auto;
  animation: fadeIn 0.6s ease-out;
}

/* Topo com navegação */
.top-bar {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 25px;
}

.top-bar h1 {
  font-size: 22px;
  color: #1f2937;
  font-weight: 700;
  text-align: center;
}

.nav-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-buttons button {
  background: #4f46e5;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  flex: 1;
  min-width: 120px;
  height: 48px;
}

.nav-buttons button:hover {
  background: #4338ca;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.nav-buttons button:active {
  transform: translateY(0);
}

/* Formulário */
form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

label {
  font-weight: 600;
  color: #374151;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

input[type="text"],
input[type="file"] {
  padding: 12px 14px;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  font-size: 14px;
  transition: all 0.3s ease;
  width: 100%;
  font-family: inherit;
}

input[type="text"]:focus,
input[type="file"]:focus {
  border-color: #4f46e5;
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Campo readonly (título) */
input[type="text"][readonly] {
  background-color: #f9fafb;
  color: #6b7280;
  cursor: not-allowed;
  border-color: #d1d5db;
}

/* Botão de submit */
button[type="submit"] {
  background: #4f46e5;
  color: white;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

button[type="submit"]:hover {
  background: #4338ca;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}

button[type="submit"]:active {
  transform: translateY(0);
}

/* Botão Deploy */
#deployBtn {
  background: #10b981;
  color: white;
  padding: 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  margin-top: 0;
}

#deployBtn:hover:not(:disabled) {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

#deployBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mensagens */
#messages {
  margin-top: 20px;
  padding: 14px;
  font-weight: 600;
  text-align: center;
  border-radius: 10px;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1.5;
}

#messages.success {
  background-color: #d1fae5;
  color: #065f46;
  border: 2px solid #10b981;
}

#messages.error {
  background-color: #fee2e2;
  color: #991b1b;
  border: 2px solid #ef4444;
}

/* Footer */
footer {
  margin-top: 30px;
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  border-top: 2px solid #e5e7eb;
}

/* Animação */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estilo para input file customizado */
input[type="file"] {
  padding: 10px;
  font-size: 13px;
}

input[type="file"]::file-selector-button {
  padding: 8px 16px;
  background: #4f46e5;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  margin-right: 12px;
  transition: all 0.3s ease;
}

input[type="file"]::file-selector-button:hover {
  background: #4338ca;
}

/* ========================================
   RESPONSIVO PARA MOBILE
   ======================================== */

/* Tablets e dispositivos médios */
@media (max-width: 768px) {
  body {
    padding: 15px;
  }

  .container {
    padding: 20px 16px;
    border-radius: 12px;
  }

  .top-bar h1 {
    font-size: 20px;
  }

  .nav-buttons {
    flex-direction: column;
  }

  .nav-buttons button {
    width: 100%;
    min-width: unset;
  }

  label {
    font-size: 13px;
  }

  input[type="text"],
  input[type="file"] {
    padding: 11px 12px;
    font-size: 14px;
  }

  button[type="submit"],
  #deployBtn {
    padding: 13px;
    font-size: 14px;
  }

  #messages {
    font-size: 13px;
    padding: 12px;
  }
}

/* Smartphones */
@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .container {
    padding: 18px 14px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  }

  .top-bar {
    gap: 12px;
    margin-bottom: 20px;
  }

  .top-bar h1 {
    font-size: 18px;
  }

  .nav-buttons {
    gap: 8px;
  }

  .nav-buttons button {
    padding: 11px 16px;
    font-size: 13px;
    height: 44px;
  }

  .nav-buttons button span {
    display: inline;
  }

  form {
    gap: 16px;
  }

  label {
    font-size: 13px;
  }

  input[type="text"],
  input[type="file"] {
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 7px;
  }

  input[type="file"] {
    font-size: 12px;
  }

  input[type="file"]::file-selector-button {
    padding: 7px 12px;
    font-size: 12px;
    margin-right: 8px;
  }

  button[type="submit"],
  #deployBtn {
    padding: 12px;
    font-size: 14px;
    border-radius: 8px;
  }

  #messages {
    font-size: 12px;
    padding: 10px;
    min-height: 45px;
    line-height: 1.4;
  }

  footer {
    margin-top: 25px;
    font-size: 12px;
  }
}

/* Telas muito pequenas */
@media (max-width: 360px) {
  .container {
    padding: 15px 12px;
  }

  .top-bar h1 {
    font-size: 17px;
  }

  .nav-buttons button {
    padding: 10px 14px;
    font-size: 12px;
    height: 42px;
  }

  input[type="text"],
  input[type="file"] {
    padding: 9px 10px;
    font-size: 13px;
  }

  button[type="submit"],
  #deployBtn {
    padding: 11px;
    font-size: 13px;
  }

  label {
    font-size: 12px;
  }
}

/* Ajuste para modo paisagem em mobile */
@media (max-height: 500px) and (orientation: landscape) {
  body {
    padding: 10px;
  }

  .container {
    padding: 15px;
  }

  .top-bar {
    margin-bottom: 15px;
  }

  form {
    gap: 12px;
  }

  #messages {
    margin-top: 15px;
  }

  footer {
    margin-top: 15px;
  }
}

/* Fix para iOS Safari */
@supports (-webkit-touch-callout: none) {
  input[type="text"],
  input[type="file"],
  button {
    -webkit-appearance: none;
    appearance: none;
  }
}