/* OnHyper SPA Styles - Clean & Minimal */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #059669;
  --error: #dc2626;
  --radius: 6px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* Nav */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

/* Main */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem;
}

/* Buttons */
button, .btn {
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.15s;
}

.btn-primary, button[type="submit"] {
  background: var(--primary);
  color: white;
}

.btn-primary:hover, button[type="submit"]:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-danger {
  background: transparent;
  border: 1px solid var(--error);
  color: var(--error);
}

.btn-danger:hover {
  background: var(--error);
  color: white;
}

/* Forms */
form {
  max-width: 400px;
  margin: 2rem auto;
}

.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

input, textarea, select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.15s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

/* Cards */
.app-card, .key-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.app-card h3 {
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

.app-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.app-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.app-actions button {
  font-size: 0.85rem;
  padding: 0.5rem 0.875rem;
}

.key-card {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.key-name {
  font-weight: 600;
  min-width: 140px;
}

.key-value {
  color: var(--text-muted);
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.85rem;
}

/* Hero */
.hero {
  text-align: center;
  padding: 4rem 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 1.5rem;
}

.hero .cta {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* Sections */
h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.feature {
  background: var(--bg-alt);
  padding: 1.5rem;
  border-radius: var(--radius);
}

.feature h3 {
  margin-bottom: 0.375rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.feature p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.stat {
  background: var(--bg-alt);
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
}

.stat span {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat::after {
  content: attr(data-label);
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* Error */
.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--error);
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: var(--success);
  padding: 1.25rem;
  border-radius: var(--radius);
  text-align: center;
}

.success code {
  display: block;
  margin-top: 0.75rem;
  padding: 0.5rem;
  background: white;
  border-radius: 4px;
  font-size: 0.85rem;
  word-break: break-all;
  color: var(--text);
}

/* Code blocks */
code {
  background: var(--bg-alt);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.85rem;
  color: var(--text);
}

/* Divider */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Links */
a {
  color: var(--primary);
}

a:hover {
  text-decoration: underline;
}

/* Info box */
.info-box {
  background: var(--bg-alt);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-top: 1.5rem;
}

.info-box h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.info-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.info-box code {
  margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .stats {
    grid-template-columns: 1fr;
  }
  
  nav {
    padding: 1rem;
  }
  
  .nav-links {
    gap: 1rem;
  }
  
  main {
    padding: 1rem;
  }
  
  .features {
    grid-template-columns: 1fr;
  }
}

/* Blog Styles */
.blog-main {
  padding: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.blog-main h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.blog-subtitle {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.blog-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.rss-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.15s;
}

.rss-link:hover {
  background: var(--bg-alt);
  text-decoration: none;
}

.rss-link svg {
  opacity: 0.8;
}

.blog-grid {
  display: grid;
  gap: 1.5rem;
}

.blog-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.15s;
}

.blog-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.blog-card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.blog-card .excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0.75rem 0;
}

/* Post Page */
.post-main {
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.back-link {
  display: inline-block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  transition: color 0.15s;
}

.back-link:hover {
  color: var(--primary);
}

#post-content h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}

/* Post Meta */
.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.post-meta .author::before {
  content: '·';
  margin-right: 1rem;
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  display: inline-block;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

/* Post Content Typography */
.post-body {
  margin-top: 2rem;
  line-height: 1.8;
  color: var(--text);
}

.post-body h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--text);
}

.post-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--text);
}

.post-body p {
  margin: 1rem 0;
}

.post-body ul,
.post-body ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.post-body li {
  margin: 0.5rem 0;
}

.post-body pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1rem 0;
  font-size: 0.875rem;
}

.post-body code {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

.post-body pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.post-body :not(pre) > code {
  background: var(--bg-alt);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--text);
}

.post-body blockquote {
  border-left: 4px solid var(--primary);
  margin: 1rem 0;
  padding: 0.5rem 0 0.5rem 1rem;
  color: var(--text-muted);
  font-style: italic;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.post-body a {
  color: var(--primary);
  text-decoration: underline;
}

.post-body a:hover {
  text-decoration: none;
}

.post-body strong {
  font-weight: 600;
}

.post-body em {
  font-style: italic;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1rem 0;
}

/* Loading state */
.loading {
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
}