/* bug.css - 用户端问题反馈页面样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    background-color: #f6f8fa;
    color: #1f2328;
    line-height: 1.5;
    padding: 32px 16px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
}

/* 头部 */
.header {
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
}

.new-issue-btn {
    background-color: #2cbe4e;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 5px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.new-issue-btn:hover {
    background-color: #22863a;
}

.back-link {
    color: #0969da;
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover {
    text-decoration: underline;
}

/* 选项卡 */
.tabs {
    border-bottom: 1px solid #d0d7de;
    margin-bottom: 16px;
    display: flex;
    gap: 16px;
}

.tab {
    background: none;
    border: none;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 500;
    color: #57606a;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.tab.active {
    color: #1f2328;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #fd8c73;
    border-radius: 2px;
}

/* 列表项 */
.issues-list {
    border: 1px solid #d0d7de;
    border-radius: 6px;
    background-color: #ffffff;
}

.issue-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #eaeef2;
    text-decoration: none;
    color: inherit;
    transition: background 0.1s;
}

.issue-item:last-child {
    border-bottom: none;
}

.issue-item:hover {
    background-color: #f6f8fa;
}

.issue-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.issue-icon-open {
    color: #1a7f37;
}

.issue-icon-closed {
    color: #8250df;
}

.issue-content {
    flex: 1;
}

.issue-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    word-break: break-word;
}

.issue-meta {
    font-size: 12px;
    color: #57606a;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.labels {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
}

.label {
    display: inline-block;
    padding: 0 7px;
    border-radius: 2em;
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
}

.issue-number {
    font-size: 12px;
    font-family: monospace;
    color: #57606a;
    flex-shrink: 0;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 5px 12px;
    border: 1px solid #d0d7de;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.1s;
}

.page-btn.active {
    background-color: #0969da;
    border-color: #0969da;
    color: white;
}

.page-btn:hover:not(.active):not(:disabled) {
    background-color: #eaeef2;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* 空状态 */
.no-issues {
    padding: 48px;
    text-align: center;
    color: #57606a;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: 0.2s;
    z-index: 1000;
}

.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

.modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #d0d7de;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #57606a;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* 附件区域 */
.attachment-area {
    margin-top: 8px;
    border: 2px dashed #d0d7de;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    background-color: #f6f8fa;
    cursor: pointer;
    transition: 0.1s;
}

.attachment-area.drag-over {
    background-color: #e6f4ea;
    border-color: #2cbe4e;
}

.attachment-info {
    font-size: 12px;
    color: #57606a;
    margin-top: 8px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #d0d7de;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn-primary {
    background-color: #2cbe4e;
    border: none;
    padding: 5px 16px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    cursor: pointer;
}

.btn-secondary {
    background-color: #f6f8fa;
    border: 1px solid #d0d7de;
    padding: 5px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-danger {
    background-color: #cf222e;
    border: none;
    padding: 5px 16px;
    border-radius: 6px;
    color: white;
    cursor: pointer;
}