/*
 * This is a manifest file that'll be compiled into application.css.
 */

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #f78166;
  --accent-hover: #ffa28b;
  --link: #58a6ff;
}

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

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

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Homepage */
.homepage {
  max-width: 800px;
  margin: 0 auto;
  padding: 120px 20px 40px;
  text-align: center;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.roast-form {
  margin-bottom: 3rem;
}

.input-group {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 1.1rem;
}

.input-prefix {
  padding: 12px 0 12px 16px;
  color: var(--text-muted);
  white-space: nowrap;
  user-select: none;
}

.input-group input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 12px 8px;
  font-size: inherit;
  outline: none;
  min-width: 0;
}

.input-group input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.input-group button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.input-group button:hover {
  background: var(--accent-hover);
}

.homepage-footer {
  margin-top: 5rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  opacity: 0.5;
}

.repo-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 600px) {
  .repo-lists {
    grid-template-columns: 1fr;
  }
}

.recent-roasts {
  text-align: left;
}

.recent-roasts h2 {
  font-size: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.recent-roasts ul {
  list-style: none;
}

.recent-roasts li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.recent-roasts li:last-child {
  border-bottom: none;
}

.view-count {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: right;
}

.rate-limit-error {
  text-align: center;
  color: var(--accent);
  padding: 40px 20px;
  font-size: 1.1rem;
}

/* Repo Roast Page */
.repo-roast {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 20px;
}

.repo-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.back-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: inline-block;
  margin-bottom: 0.5rem;
}

.repo-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.repo-link {
  margin-top: 0.5rem;
}

.repo-link a {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Roast content markdown styling */
.roast-content {
  font-size: 1.05rem;
  line-height: 1.75;
}

.roast-content h1,
.roast-content h2,
.roast-content h3 {
  color: var(--text);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.roast-content h1 { font-size: 1.75rem; }
.roast-content h2 { font-size: 1.4rem; }
.roast-content h3 { font-size: 1.15rem; }

.roast-content p {
  margin-bottom: 1em;
}

.roast-content ul,
.roast-content ol {
  margin-bottom: 1em;
  padding-left: 1.5em;
}

.roast-content li {
  margin-bottom: 0.25em;
}

.roast-content strong {
  color: var(--accent);
}

.roast-content em {
  color: var(--text-muted);
  font-style: italic;
}

.roast-content code {
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.roast-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 1em;
}

.roast-content pre code {
  background: transparent;
  padding: 0;
}

.roast-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1em;
  color: var(--text-muted);
  margin-bottom: 1em;
}

.roast-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

/* Loading screen */
.loading {
  text-align: center;
  padding: 80px 20px;
}

.loading-flame {
  font-size: 4rem;
  animation: pulse 1.2s ease-in-out infinite;
}

.loading-text {
  font-size: 1.5rem;
  color: var(--text);
  margin-top: 1.5rem;
}

.loading-subtext {
  color: var(--text-muted);
  margin-top: 0.5rem;
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

@keyframes dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

.loading-subtext::after {
  content: "";
  animation: dots 1.5s steps(4, end) infinite;
}
