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

:root {
    --primary: #238636;
    --primary-dark: #1a7f37;
    --bg: #0d1117;
    --card-bg: #161b22;
    --text: #e6edf3;
    --text-light: #8b949e;
    --border: #30363d;
    --success: #3fb950;
    --link: #58a6ff;
}

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

.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2.5rem;
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.credit {
    font-size: 0.875rem;
    color: var(--text-light);
}

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

.credit a:hover {
    text-decoration: underline;
}

/* URL Input */
.url-input-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.url-input-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.url-input-wrapper {
    display: flex;
    gap: 0.75rem;
}

.url-input-wrapper input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 1rem;
}

.url-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(35, 134, 54, 0.2);
}

.btn-fetch {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.btn-fetch:hover {
    background: var(--primary-dark);
}

.btn-fetch:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Token section */
.token-section {
    margin-top: 1rem;
    font-size: 0.875rem;
}

.token-section summary {
    cursor: pointer;
    color: var(--text-light);
}

.token-section summary:hover {
    color: var(--link);
}

.token-hint {
    margin: 0.5rem 0;
    color: var(--text-light);
    font-size: 0.8125rem;
}

.token-hint a {
    color: var(--link);
}

.token-section input {
    margin-top: 0.5rem;
    margin-right: 0.5rem;
    width: calc(100% - 100px);
    display: inline-block;
}

.token-section button {
    padding: 0.5rem 1rem;
    background: var(--border);
    border: none;
    border-radius: 4px;
    color: var(--text);
    cursor: pointer;
}

.token-section button:hover {
    background: #3d444d;
}

/* Repo Info */
.repo-info {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.repo-info h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.repo-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-weight: 600;
    font-size: 1rem;
}

.repo-desc {
    font-size: 0.875rem;
    color: var(--text-light);
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

/* Form */
form {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

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

label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

input, select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 1rem;
}

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

.btn-generate {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
}

.btn-generate:hover {
    background: var(--primary-dark);
}

/* Results */
.results {
    margin-top: 2rem;
}

.results h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.issue-card {
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.issue-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.issue-label {
    font-weight: 600;
    color: var(--success);
    font-size: 0.875rem;
}

.issue-title-wrapper, .issue-body-wrapper {
    margin-bottom: 1rem;
}

.issue-title-wrapper label, .issue-body-wrapper label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.issue-title {
    font-weight: 600;
    font-size: 1.125rem;
    padding: 0.5rem;
    background: var(--bg);
    border-radius: 4px;
    margin-top: 0.25rem;
}

.issue-body {
    white-space: pre-wrap;
    font-size: 0.9375rem;
    line-height: 1.7;
    padding: 0.75rem;
    background: var(--bg);
    border-radius: 4px;
    margin-top: 0.25rem;
    max-height: 300px;
    overflow-y: auto;
}

.btn-copy {
    padding: 0.5rem 1rem;
    background: var(--border);
    border: none;
    border-radius: 6px;
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
}

.btn-copy:hover {
    background: #3d444d;
}

.btn-copy.copied {
    background: var(--success);
    color: white;
}

/* Tips */
.tips-box {
    background: rgba(56, 139, 253, 0.1);
    border: 1px solid rgba(56, 139, 253, 0.4);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.tips-box h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--link);
}

.tips-box ul {
    list-style: none;
    font-size: 0.875rem;
}

.tips-box li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.tips-box li:before {
    content: "→ ";
    color: var(--link);
}

/* Restart */
.btn-restart {
    width: 100%;
    padding: 0.875rem;
    background: transparent;
    color: var(--text-light);
    border: 1px dashed var(--border);
    border-radius: 6px;
    font-size: 0.9375rem;
    cursor: pointer;
    margin-top: 1.5rem;
}

.btn-restart:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 0.875rem;
}

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

footer a:hover {
    text-decoration: underline;
}

.footer-note {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: #6e7681;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.875rem;
    z-index: 100;
}

.toast.hidden {
    opacity: 0;
    pointer-events: none;
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 1.5rem 1rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .url-input-wrapper {
        flex-direction: column;
    }
    
    .repo-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* SEO Content */
.seo-content {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.seo-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--success);
}

.seo-content h3 {
    font-size: 1.125rem;
    margin: 1.5rem 0 0.75rem;
}

.seo-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.seo-content ul {
    list-style: none;
    margin-left: 0;
}

.seo-content li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.seo-content strong {
    color: var(--text);
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 1.5rem;
}
.cta-box p { font-size: 1.1rem; margin-bottom: 1rem; font-weight: 500; }
.cta-box .btn { margin: 0.25rem; display: inline-flex; align-items: center; padding: 0.75rem 1.5rem; border-radius: 8px; text-decoration: none; font-weight: 500; }
.cta-box .btn-primary { background: white; color: #2563eb; }
.cta-box .btn-outline { border: 2px solid white; color: white; background: transparent; }
