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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #121212;
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.view {
  width: 100%;
  max-width: 700px;
  text-align: center;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  font-weight: 300;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto;
}

.form-row {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.input-wrapper {
  flex: 1;
  position: relative;
}

input[type="url"],
input[type="password"] {
  width: 100%;
  padding: 0.85rem 2.5rem 0.85rem 1rem;
  font-size: 1rem;
  border: 1px solid #444;
  border-radius: 6px;
  background: #1e1e1e;
  color: #fff;
  outline: none;
  transition: border-color 0.2s;
}

input:focus {
  border-color: #90caf9;
}

input:disabled {
  opacity: 0.5;
}

.clear-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #888;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
}

.clear-btn:hover {
  color: #fff;
}

button#login-btn,
button#download-btn {
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  background: #1976d2;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

button#login-btn:hover,
button#download-btn:hover {
  background: #1565c0;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: #d32f2f;
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 90%;
  font-size: 1rem;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.toast-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.8;
}

.toast-close:hover {
  opacity: 1;
}

footer {
  text-align: center;
  padding: 1.5rem;
  color: #888;
  font-size: 0.85rem;
}

footer a {
  color: #90caf9;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
  h1 {
    font-size: 1.8rem;
  }

  .form-row {
    flex-direction: column;
  }

  button#download-btn {
    width: 100%;
    min-height: 3.2rem;
    font-size: 1.1rem;
  }
}
