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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #e0ddd8;
  background: #0e0d0b;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: #181714;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  padding: 40px;
  margin-top: 40px;
  margin-bottom: 40px;
  border: 1px solid #252219;
}

h1 {
  color: #e8893a;
  margin-bottom: 10px;
  font-size: 2rem;
}

h2 {
  color: #c0b8a8;
  margin-bottom: 4px;
  font-size: 1.3rem;
}

.subtitle {
  color: #8a8070;
  margin-bottom: 30px;
}

.back-link {
  margin-top: 30px;
  text-align: center;
}

.back-link a {
  color: #e8893a;
  text-decoration: none;
  transition: color 0.2s;
}

.back-link a:hover {
  color: #f2a255;
}

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

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #a09888;
}

input[type="text"],
input[type="password"],
input[type="number"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #302a20;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  background: #12110e;
  color: #e0ddd8;
}

input:focus {
  outline: none;
  border-color: #e8893a;
  box-shadow: 0 0 0 3px rgba(232, 137, 58, 0.15);
}

input::placeholder {
  color: #554e42;
}

.btn {
  background: linear-gradient(135deg, #e8893a 0%, #c86a20 100%);
  color: #fff;
  padding: 12px 32px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(232, 137, 58, 0.3);
}

.btn:active {
  transform: translateY(0);
}

.alert {
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.alert-error {
  background: rgba(200, 50, 50, 0.12);
  color: #e06050;
  border: 1px solid rgba(200, 50, 50, 0.25);
}

/* Score card */
.score-card {
  margin-bottom: 24px;
}

.score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #252219;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid #302a20;
}

.user-name {
  margin: 0;
  font-size: 1.3rem;
}

.user-link {
  color: #8a8070;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.user-link:hover {
  color: #e8893a;
}

.score-display {
  text-align: center;
}

.score-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
}

.score-high {
  border: 3px solid #4ade80;
}
.score-mid {
  border: 3px solid #fbbf24;
}
.score-low {
  border: 3px solid #f87171;
}

.score-number {
  font-size: 1.8rem;
  font-weight: 700;
}

.score-high .score-number {
  color: #4ade80;
}
.score-mid .score-number {
  color: #fbbf24;
}
.score-low .score-number {
  color: #f87171;
}

.verdict {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.verdict-high {
  color: #4ade80;
}
.verdict-mid {
  color: #fbbf24;
}
.verdict-low {
  color: #f87171;
}

/* Categories */
.categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category {
  padding: 16px;
  background: #12110e;
  border: 1px solid #302a20;
  border-radius: 8px;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.category-icon {
  font-size: 1.1rem;
}

.category-name {
  flex: 1;
  font-weight: 500;
  color: #c0b8a8;
}

.category-score {
  font-weight: 600;
  font-family: monospace;
  font-size: 0.95rem;
  color: #a09888;
}

.progress-bar {
  height: 6px;
  background: #252219;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.progress-high {
  background: #4ade80;
}
.progress-mid {
  background: #fbbf24;
}
.progress-low {
  background: #f87171;
}

.category-details {
  padding-top: 4px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 0.82rem;
  color: #8a8070;
}

.detail-item:not(:last-child) {
  border-bottom: 1px solid #1e1c17;
}

.detail-score {
  font-family: monospace;
  color: #a09888;
  white-space: nowrap;
  margin-left: 12px;
}

/* HTMX indicator */
.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: inline-block;
}

.htmx-request button {
  opacity: 0.6;
  cursor: wait;
}

.spinner {
  width: 16px;
  height: 16px;
  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);
  }
}

footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #252219;
  color: #554e42;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .container {
    padding: 20px;
    margin-top: 20px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .score-header {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .user-info {
    flex-direction: column;
    text-align: center;
  }

  .score-circle {
    width: 70px;
    height: 70px;
  }

  .score-number {
    font-size: 1.5rem;
  }
}
