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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a0f14;
  color: #e8ecf1;
  line-height: 1.5;
  padding: 24px;
}

.container {
  max-width: 720px;
  margin: 0 auto;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 28px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 4px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #7ab8ff;
  color: #0a0f14;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.header h1 {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.subtitle {
  color: #8896a8;
  font-size: 0.95rem;
}

/* Cards */
.card {
  background: #111820;
  border: 1px solid #1e2a38;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.hidden {
  display: none !important;
}

/* Upload */
.upload-zone {
  display: block;
  border: 2px dashed #2a3a4d;
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: #7ab8ff;
  background: rgba(122, 184, 255, 0.05);
}

.upload-icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 12px;
  color: #7ab8ff;
}

.upload-text {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.upload-hint {
  font-size: 0.85rem;
  color: #5a6b7d;
}

/* Preview */
.preview-area {
  margin-top: 16px;
  text-align: center;
}

.preview-area img {
  max-width: 100%;
  max-height: 240px;
  border-radius: 10px;
  border: 1px solid #1e2a38;
}

.text-btn {
  display: inline-block;
  margin-top: 8px;
  background: none;
  border: none;
  color: #ff7a7a;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.text-btn:hover {
  color: #ff9999;
}

/* Fields */
.field {
  display: block;
  margin-bottom: 14px;
}

.field-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: #c2cdd8;
}

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

textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #1e2a38;
  background: #0d131a;
  color: #e8ecf1;
  font-size: 0.95rem;
  resize: vertical;
  font-family: inherit;
}

textarea:focus {
  outline: none;
  border-color: #7ab8ff;
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: none;
  background: #7ab8ff;
  color: #0a0f14;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.9;
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid #2a3a4d;
  background: #1a2330;
  color: #c2cdd8;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: #7ab8ff;
  color: #7ab8ff;
}

/* Status */
.status {
  margin-top: 12px;
  font-size: 0.9rem;
  text-align: center;
  color: #5a6b7d;
}

.status.running {
  color: #f5c76b;
}

.status.success {
  color: #7ae7a0;
}

.status.error {
  color: #ff7a7a;
}

/* Results */
.result-viewer {
  background: #0d131a;
  border-radius: 12px;
  border: 1px solid #1e2a38;
  padding: 8px;
  margin-bottom: 16px;
  text-align: center;
}

.result-viewer img {
  max-width: 100%;
  max-height: 480px;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

/* Strength Tabs */
.strength-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.tab {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #1e2a38;
  background: #0d131a;
  color: #8896a8;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.tab:hover {
  border-color: #3a4f66;
  color: #c2cdd8;
}

.tab.active {
  background: #7ab8ff;
  border-color: #7ab8ff;
  color: #0a0f14;
}

/* Mobile */
@media (max-width: 480px) {
  body {
    padding: 16px;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }
  .header h1 {
    font-size: 1.3rem;
  }
}
