* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #0a0a0a;
  color: #e8e8e8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* single-screen centered layout, used by index.html */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  padding: 1.5rem;
}

.hero img {
  max-width: 80%;
  max-height: 200px;
}

.hero h1 {
  font-size: 2rem;
  margin: 0;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}

.hero ul {
  text-align: left;
  display: inline-block;
}

a {
  color: #e8e8e8;
  text-decoration-color: rgba(232, 232, 232, 0.35);
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

a:hover {
  text-decoration-color: #e8e8e8;
}

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.05rem;
  color: #cfcfcf;
}

p {
  font-size: 1.05rem;
  line-height: 1.3;
  color: #a8a8a8;
  margin: 0 0 0.7rem;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.site-nav {
  display: flex;
  gap: 1.3rem;
  padding: 0.8rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  background: rgba(10, 10, 10, 0.85);
  z-index: 10;
}

.site-nav a {
  text-decoration: none;
  color: #888;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.15s ease;
}

.site-nav a:hover,
.site-nav .active {
  color: #f2f2f2;
}

.user-bar {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 1.5rem;
}

.user-bar a {
  color: #888;
}

.user-bar a:hover {
  color: #f2f2f2;
}

section {
  margin: 2.2rem 0;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

section:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.btn {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: transparent;
  color: #f2f2f2;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background: #f2f2f2;
  color: #0a0a0a;
  border-color: #f2f2f2;
}

.btn.btn-solid {
  background: #f2f2f2;
  color: #0a0a0a;
}

.btn.btn-solid:hover {
  background: transparent;
  color: #f2f2f2;
}

ul, ol {
  color: #a8a8a8;
  line-height: 1.6;
  padding-left: 1.3rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1rem;
  background: #111214;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.card h3 {
  margin-bottom: 0.3rem;
}

.card p {
  margin: 0;
  font-size: 0.88rem;
}

.solved {
  color: #7fd97f;
  font-weight: 600;
}

.difficulty-easy { color: #7fd97f; }
.difficulty-medium { color: #e0c46a; }
.difficulty-hard { color: #e08a8a; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

th {
  color: #888;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

tbody tr {
  transition: background 0.15s ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-width: 420px;
}

label {
  font-size: 0.78rem;
  color: #888;
  letter-spacing: 0.03em;
  margin-bottom: 0.3rem;
  display: block;
}

input, textarea, select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  background: #111214;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #f2f2f2;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s ease;
}

input::placeholder, textarea::placeholder {
  color: #5a5a5a;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
}

button {
  font-family: inherit;
}

blockquote {
  margin: 0;
  padding-left: 1rem;
  border-left: 2px solid rgba(255, 255, 255, 0.25);
  color: #999;
  font-style: italic;
}

code, pre {
  background: #111214;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  font-size: 0.85em;
  color: #e8e8e8;
}

pre.puzzle-text {
  display: block;
  padding: 1rem;
  white-space: pre-wrap;
}

img.puzzle-img {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 1.3rem 0;
}

.message {
  margin-top: 0.6rem;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

.message.success {
  border-color: rgba(127, 217, 127, 0.4);
  color: #7fd97f;
}

.message.error {
  border-color: rgba(224, 138, 138, 0.4);
  color: #e08a8a;
}

.site-footer {
  text-align: center;
  padding: 1.6rem 1rem;
  color: #555;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
