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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #1a1a2e;
  color: #e0e0e0;
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #fff;
  font-size: 28px;
}

/* Auth */
#auth-section {
  text-align: center;
  padding: 60px 20px;
}

#auth-section p { margin-bottom: 20px; color: #aaa; }

#auth-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  max-width: 400px;
  margin: 0 auto;
}

input[type="password"] {
  padding: 12px 16px;
  border: 1px solid #333;
  border-radius: 8px;
  background: #16213e;
  color: #fff;
  font-size: 16px;
  flex: 1;
}

.error { color: #e74c3c; margin-top: 10px; }

/* Status bar */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #16213e;
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 24px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.online { background: #2ecc71; box-shadow: 0 0 8px #2ecc71; }
.status-dot.offline { background: #e74c3c; box-shadow: 0 0 8px #e74c3c; }
.status-dot.checking { background: #f39c12; box-shadow: 0 0 8px #f39c12; }

.btn-icon {
  background: none;
  border: 1px solid #333;
  color: #aaa;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s;
}

.btn-icon:hover { border-color: #0f3460; color: #fff; background: #0f3460; }

/* Form */
.gen-form {
  background: #16213e;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #aaa;
  font-weight: 600;
}

.optional { font-weight: 400; color: #666; }

.value-display {
  font-weight: 400;
  color: #0f3460;
  background: #1a1a2e;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 13px;
}

textarea, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #333;
  border-radius: 8px;
  background: #1a1a2e;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
}

textarea:focus, select:focus, input:focus {
  outline: none;
  border-color: #0f3460;
}

select {
  cursor: pointer;
}

input[type="range"] {
  width: 100%;
  accent-color: #0f3460;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  background: #0f3460;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover { background: #1a5276; }

.btn-generate {
  width: 100%;
  padding: 14px;
  font-size: 17px;
  font-weight: 600;
  margin-top: 6px;
}

.btn-generate:disabled {
  background: #333;
  color: #666;
  cursor: not-allowed;
}

/* Output */
#output-area {
  background: #16213e;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  min-height: 100px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #333;
  border-top: 4px solid #0f3460;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto 16px;
}

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

#loading-text {
  color: #aaa;
  font-size: 15px;
}

#result-image {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* Footer */
.footer-link {
  text-align: center;
  margin-top: 30px;
}

.footer-link a {
  color: #aaa;
  text-decoration: none;
  font-size: 14px;
}

.footer-link a:hover { color: #fff; }

/* Tooltip button */
.btn-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #555;
  background: #1a1a2e;
  color: #aaa;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1;
  transition: all 0.2s;
}

.btn-tooltip:hover {
  border-color: #0f3460;
  color: #fff;
  background: #0f3460;
}

.tooltip-popup {
  position: absolute;
  z-index: 100;
  background: #0f3460;
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  pointer-events: none;
}

/* Mobile */
@media (max-width: 600px) {
  .container { padding: 20px 12px; }
  h1 { font-size: 22px; margin-bottom: 20px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .gen-form { padding: 16px; }
  #output-area { padding: 16px; }
}
