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

:root {
    --bg-dark: #1a1a1a;
    --bg-card: #2a2a2a;
    --text-light: #e0e0e0;
    --text-muted: #999;
    --accent: #4a9eff;
    --accent-hover: #3a8eef;
    --error: #ff6b6b;
    --success: #51cf66;
    --border: #3a3a3a;
    --shadow: rgba(0, 0, 0, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

header h1 a {
    color: var(--text-light);
    text-decoration: none;
}

header ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

header a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

header a:hover {
    color: var(--accent);
}

main {
    flex: 1;
    padding: 2rem 0;
}

.card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px var(--shadow);
    margin-bottom: 2rem;
}

.card h1 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.flash {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.flash-error {
    background: rgba(255, 107, 107, 0.2);
    color: var(--error);
    border: 1px solid var(--error);
}

.flash-success {
    background: rgba(81, 207, 102, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.issue-list {
    list-style: none;
}

.issue-list li {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.issue-list li:last-child {
    border-bottom: none;
}

.issue-link {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    text-decoration: none;
    color: var(--text-light);
    transition: color 0.2s;
    gap: 1rem;
}

.issue-link:hover {
    color: var(--accent);
}

.issue-title {
    font-size: 1.125rem;
    font-weight: 500;
    flex: 1;
}

.issue-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 0;
}

.empty-state a {
    color: var(--accent);
    text-decoration: none;
}

.empty-state a:hover {
    text-decoration: underline;
}

.instructions {
    background: rgba(74, 158, 255, 0.1);
    border-left: 3px solid var(--accent);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 4px;
}

.instructions h3 {
    margin-bottom: 1rem;
    color: var(--accent);
}

.instructions h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.instructions ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.instructions li {
    margin-bottom: 0.5rem;
}

.instructions code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.upload-form {
    max-width: 600px;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.required {
    color: var(--error);
}

.form-group input[type="text"],
.form-group input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-light);
    font-size: 1rem;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

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

.issue-content {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px var(--shadow);
}

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

.issue-header h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.issue-header .issue-date {
    color: var(--text-muted);
}

.issue-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.issue-body p {
    margin-bottom: 1rem;
}

.issue-body h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.issue-body h3 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.issue-body ul,
.issue-body ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
}

.issue-body ul {
    list-style-type: disc;
}

.issue-body li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.issue-body li p {
    margin-bottom: 0.5rem;
}

/* Nested lists */
.issue-body ul ul,
.issue-body ol ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.issue-body ul ul {
    list-style-type: circle;
}

.issue-body a {
    color: var(--accent);
    text-decoration: none;
}

.issue-body a:hover {
    text-decoration: underline;
}

.callout {
    position: relative;
    color: var(--accent);
    cursor: help;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
    font-weight: 500;
}

.callout:hover {
    color: var(--accent-hover);
}

.callout-popover {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    max-width: 420px;
    min-width: 200px;
    width: max-content;
    font-size: 0.9rem;
    line-height: 1.5;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    border: 1px solid var(--border);
    font-weight: normal;
    text-decoration: none;
}

.callout-popover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--bg-dark);
}

.callout.open .callout-popover,
.callout:hover .callout-popover {
    opacity: 1;
}

@media (max-width: 768px) {
    .callout-popover {
        position: fixed;
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: calc(100vw - 40px);
        margin: 0;
    }
    
    .callout-popover::after {
        display: none;
    }
    
    .issue-header h1 {
        font-size: 1.75rem;
    }
    
    header nav {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .issue-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    margin-top: 3rem;
    text-align: center;
    color: var(--text-muted);
}
