/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #24292f;
    background-color: #ffffff;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Typography */
h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Header Styles */
.landing-header {
    text-align: center;
    padding: 48px 16px;
    border-bottom: 1px solid #d0d7de;
}

.landing-header h1 {
    font-size: 48px;
    margin-bottom: 8px;
}

.tagline {
    font-size: 18px;
    color: #656d76;
}

.page-header {
    padding: 32px 0;
    border-bottom: 1px solid #d0d7de;
    margin-bottom: 32px;
}

.page-header h1 {
    margin-bottom: 4px;
}

.subtitle {
    color: #656d76;
    font-size: 16px;
}

/* PR Header */
.pr-header {
    padding: 24px 0;
    border-bottom: 1px solid #d0d7de;
    margin-bottom: 24px;
    background-color: #ffffff;
}

.repo-breadcrumb {
    font-size: 14px;
    color: #656d76;
    margin-bottom: 8px;
}

.repo-breadcrumb a {
    color: #0969da;
    text-decoration: none;
}

.repo-breadcrumb a:hover {
    text-decoration: underline;
}

.separator {
    margin: 0 4px;
}

.pr-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.pr-title-section h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    color: #24292f;
    line-height: 1.25;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-changes_requested {
    background-color: #fff8c5;
    color: #7d4e00;
}

.status-approved {
    background-color: #dafbe1;
    color: #1a7f37;
}

.status-draft {
    background-color: #f6f8fa;
    color: #656d76;
}

.blocking-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    background-color: #ffebe9;
    color: #cf222e;
    font-size: 11px;
    font-weight: 500;
    margin-left: 8px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #d0d7de;
    margin-bottom: 32px;
    background-color: #ffffff;
}

.tab {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #656d76;
    margin-bottom: -1px;
    transition: all 0.2s;
    position: relative;
}

.tab:hover {
    color: #24292f;
    background-color: #f6f8fa;
}

.tab.active {
    color: #24292f;
    border-bottom-color: #fd8c73;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Comments */
.comment-file-section {
    margin-bottom: 40px;
    padding: 24px;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #d0d7de;
}

.comment-file-header {
    font-size: 13px;
    font-weight: 600;
    color: #24292f;
    margin-bottom: 20px;
    padding: 12px 0;
    border-bottom: 2px solid #d0d7de;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

.comment {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 0;
    border-bottom: 1px solid #d0d7de;
    position: relative;
}

.comment:last-child {
    border-bottom: none;
}

.comment:has(.comment-replies) {
    padding-bottom: 0;
}

.comment-blocking {
    background-color: #fff8c5;
    padding: 16px;
    border-radius: 6px;
    margin: 8px 0;
}

.comment-avatar {
    flex-shrink: 0;
}

.comment-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #d0d7de;
}

.comment-body {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 600;
    color: #24292f;
}

.comment-bio {
    font-size: 12px;
    color: #656d76;
}

.comment-time {
    font-size: 12px;
    color: #656d76;
    margin-left: auto;
}

.comment-text {
    color: #24292f;
    margin-bottom: 8px;
    white-space: pre-wrap;
    line-height: 1.6;
    font-size: 14px;
}

.comment-context {
    font-size: 12px;
    color: #656d76;
}

.comment-file-ref {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* Comment Replies */
.comment-replies {
    margin-top: 16px;
    margin-left: 52px;
    padding-left: 16px;
    padding-top: 16px;
    border-left: 2px solid #d0d7de;
    position: relative;
    margin-bottom: 16px;
}

.comment-reply {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 0;
    position: relative;
}

.comment-reply:first-child {
    margin-top: 0;
    padding-top: 0;
}

.comment-reply:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
}

.comment-reply:not(:last-child) {
    border-bottom: 1px solid #f6f8fa;
    padding-bottom: 16px;
    margin-bottom: 0;
}

.comment-reply .comment-avatar {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.comment-reply .comment-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #d0d7de;
    background-color: #ffffff;
}

.comment-reply .comment-body {
    flex: 1;
    font-size: 13px;
    padding-left: 0;
}

.comment-reply .comment-header {
    margin-bottom: 6px;
}

.comment-reply .comment-author {
    font-size: 13px;
    font-weight: 600;
}

.comment-reply .comment-bio {
    font-size: 11px;
}

.comment-reply .comment-time {
    font-size: 11px;
}

.comment-reply .comment-text {
    font-size: 13px;
    line-height: 1.5;
    color: #24292f;
}

/* Inline Comments */
.diff-inline-comment {
    background-color: #f6f8fa;
}

.inline-comment {
    display: flex;
    gap: 12px;
    padding: 12px;
    margin: 4px 0;
}

.inline-comment-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #d0d7de;
}

.inline-comment-body {
    flex: 1;
}

.inline-comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.inline-comment-author {
    font-weight: 600;
    font-size: 13px;
    color: #24292f;
}

.inline-comment-time {
    font-size: 11px;
    color: #656d76;
}

.inline-comment-text {
    font-size: 13px;
    color: #24292f;
    white-space: pre-wrap;
}

/* Files */
.file-section {
    border: 1px solid #d0d7de;
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #f6f8fa;
    border-bottom: 1px solid #d0d7de;
}

.file-path {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    font-weight: 600;
}

.file-stats {
    display: flex;
    gap: 8px;
    font-size: 12px;
}

.file-additions {
    color: #1a7f37;
    font-weight: 500;
}

.file-deletions {
    color: #cf222e;
    font-weight: 500;
}

/* Diff */
.diff-container {
    overflow-x: auto;
}

.diff-table {
    width: 100%;
    border-collapse: collapse;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
}

.diff-table tr {
    border: none;
}

.diff-line-num {
    padding: 0 8px;
    text-align: right;
    color: #656d76;
    background-color: #f6f8fa;
    user-select: none;
    width: 1%;
    white-space: nowrap;
}

.diff-line-type {
    padding: 0 4px;
    text-align: center;
    user-select: none;
    width: 1%;
    white-space: nowrap;
}

.diff-line-content {
    padding: 0 8px;
    white-space: pre;
}

.diff-add {
    background-color: #dafbe1;
}

.diff-add.diff-line-content {
    color: #1a7f37;
}

.diff-del {
    background-color: #ffebe9;
}

.diff-del.diff-line-content {
    color: #cf222e;
}

.diff-context {
    background-color: #ffffff;
}

.diff-line-with-comment {
    background-color: #fff8c5;
}

/* Forms */
.simulate-form {
    max-width: 900px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 48px;
    padding: 32px;
    background-color: #f6f8fa;
    border-radius: 8px;
    border: 1px solid #d0d7de;
}

.form-section:last-of-type {
    margin-bottom: 32px;
}

.form-section h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 24px;
    color: #24292f;
}

.section-description {
    margin-top: 0;
    margin-bottom: 24px;
    color: #656d76;
    font-size: 14px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.checkbox-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 16px;
    border: 2px solid #d0d7de;
    border-radius: 8px;
    background-color: #ffffff;
    transition: all 0.2s;
    position: relative;
}

.checkbox-label:hover {
    background-color: #f6f8fa;
    border-color: #0969da;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

.checkbox-label input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: #0969da;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-description {
    color: #24292f;
}

.checkbox-label > span:first-of-type {
    font-weight: 500;
    font-size: 15px;
    color: #24292f;
    padding-right: 32px;
}

.checkbox-description {
    font-size: 13px;
    color: #656d76;
    line-height: 1.4;
    margin-left: 0;
}

.form-group {
    margin-bottom: 32px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #24292f;
    font-size: 15px;
}

.form-group input[type="range"] {
    width: 100%;
    margin-bottom: 8px;
    height: 6px;
    border-radius: 3px;
    background: #d0d7de;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0969da;
    cursor: pointer;
}

.form-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0969da;
    cursor: pointer;
    border: none;
}

.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #d0d7de;
    border-radius: 6px;
    font-size: 14px;
    background-color: #ffffff;
    color: #24292f;
    cursor: pointer;
    transition: border-color 0.2s;
}

.form-group select:hover {
    border-color: #0969da;
}

.form-group select:focus {
    outline: none;
    border-color: #0969da;
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #656d76;
    margin-bottom: 4px;
}

.range-value {
    display: inline-block;
    margin-top: 8px;
    font-weight: 600;
    color: #0969da;
    font-size: 16px;
    padding: 4px 12px;
    background-color: #ddf4ff;
    border-radius: 4px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #d0d7de;
    justify-content: flex-end;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: 1px solid;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #2da44e;
    border-color: #2da44e;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #2c974b;
    border-color: #2c974b;
}

.btn-secondary {
    background-color: #ffffff;
    border-color: #d0d7de;
    color: #24292f;
}

.btn-secondary:hover {
    background-color: #f6f8fa;
}

.btn-large {
    padding: 12px 24px;
    font-size: 16px;
}

/* Landing Page */
.landing-content {
    padding: 48px 16px;
}

.intro-section {
    text-align: center;
    margin-bottom: 48px;
}

.intro-text {
    font-size: 18px;
    color: #656d76;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.actions-section {
    text-align: center;
    margin-bottom: 64px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.features-section {
    max-width: 700px;
    margin: 0 auto;
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 12px 0;
    border-bottom: 1px solid #d0d7de;
    color: #656d76;
}

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

.features-list li::before {
    content: "•";
    color: #0969da;
    font-weight: bold;
    margin-right: 8px;
}

/* Footer */
.site-footer {
    margin-top: 64px;
    padding: 32px 0;
    border-top: 1px solid #d0d7de;
    text-align: center;
    color: #656d76;
    font-size: 12px;
}

.site-footer p {
    margin: 8px 0;
}

.site-footer a {
    color: #0969da;
    text-decoration: none;
}

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

/* Empty States */
.empty-state {
    text-align: center;
    padding: 48px;
    color: #656d76;
}

.placeholder-content {
    padding: 48px;
    text-align: center;
    color: #656d76;
}

/* Commits */
.commits-list {
    padding: 16px 0;
}

.commit-item {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #d0d7de;
}

.commit-item:last-child {
    border-bottom: none;
}

.commit-sha {
    flex-shrink: 0;
}

.commit-link {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    color: #0969da;
    text-decoration: none;
}

.commit-link:hover {
    text-decoration: underline;
}

.commit-details {
    flex: 1;
}

.commit-message {
    font-weight: 500;
    color: #24292f;
    margin-bottom: 4px;
}

.commit-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #656d76;
    flex-wrap: wrap;
}

.commit-author {
    font-weight: 500;
}

.commit-time {
    color: #656d76;
}

.commit-files {
    color: #656d76;
}

/* PR List */
.page-nav {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.nav-link {
    color: #0969da;
    text-decoration: none;
    font-size: 14px;
}

.nav-link:hover {
    text-decoration: underline;
}

.prs-list {
    padding: 24px 0;
}

.pr-list-item {
    padding: 16px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    margin-bottom: 16px;
    background-color: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pr-list-item:hover {
    border-color: #0969da;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pr-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 16px;
}

.pr-list-title-section {
    flex: 1;
}

.pr-list-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.pr-list-title a {
    color: #0969da;
    text-decoration: none;
}

.pr-list-title a:hover {
    text-decoration: underline;
}

.pr-list-repo {
    font-size: 14px;
    color: #656d76;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

.pr-list-status {
    flex-shrink: 0;
}

.pr-list-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
}

.pr-list-reviewers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pr-list-reviewer-avatars {
    display: flex;
    align-items: center;
    gap: -4px;
}

.reviewer-avatar-small {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #d0d7de;
    margin-left: -4px;
}

.reviewer-avatar-small:first-child {
    margin-left: 0;
}

.reviewer-count {
    margin-left: 4px;
    color: #656d76;
    font-size: 12px;
}

.pr-list-meta-text {
    color: #656d76;
}

.pr-list-stats {
    color: #656d76;
}

.pr-list-time {
    margin-left: auto;
    color: #656d76;
}

.loading {
    text-align: center;
    padding: 48px;
    color: #656d76;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    .landing-header h1 {
        font-size: 36px;
    }

    .pr-title-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .comment-time {
        margin-left: 0;
    }

    .actions-section {
        flex-direction: column;
    }

    .btn-large {
        width: 100%;
    }

    .pr-list-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .pr-list-status {
        align-self: flex-start;
    }

    .pr-list-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .pr-list-time {
        margin-left: 0;
    }
}
