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

body {
  background: #1e1f22;
  color: #dbdee1;
  font-family: 'gg sans', 'Noto Sans', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.container {
  width: 100%;
  max-width: 480px;
}

h1 {
  font-size: 22px;
  font-weight: 700;
  color: #f2f3f5;
  margin-bottom: 20px;
}

.field { margin-bottom: 12px; }

label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #b5bac1;
  margin-bottom: 6px;
}

input {
  width: 100%;
  background: #2b2d31;
  border: 1px solid #3b3d43;
  border-radius: 4px;
  padding: 10px 12px;
  color: #dbdee1;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
}

input:focus { border-color: #5865f2; }

button.main-btn {
  width: 100%;
  background: #5865f2;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 11px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 8px;
}

button.main-btn:hover    { background: #4752c4; }
button.main-btn:disabled { background: #3c3f8f; cursor: not-allowed; }

.error {
  background: #3d1c1e;
  border: 1px solid #f23f43;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 14px;
  color: #f23f43;
  margin-top: 12px;
  display: none;
}

.cooldown {
  font-size: 12px;
  color: #b5bac1;
  margin-top: 6px;
  display: none;
  text-align: center;
}

.result { margin-top: 20px; display: none; }

.preview-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #b5bac1;
  margin-bottom: 8px;
}

.canvas-container {
  width: 100%;
  background: #111214;
  border-radius: 8px;
  border: 1px solid #3b3d43;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

canvas {
  border-radius: 10px;
  width: 100%;
  max-width: 256px;
  height: auto;
  display: block;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.actions button {
  background: #2b2d31;
  color: #dbdee1;
  border: 1px solid #3b3d43;
  border-radius: 4px;
  padding: 10px 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.actions button:hover { background: #35373c; }

.cached-badge {
  display: inline-block;
  font-size: 11px;
  background: #2b2d31;
  color: #b5bac1;
  border-radius: 4px;
  padding: 2px 8px;
  margin-left: 8px;
  vertical-align: middle;
}
