/* 扁平化样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 登录页面 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f5f5f5;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    margin-bottom: 30px;
    text-align: center;
    color: #333;
    font-size: 24px;
}

.login-box input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 15px;
}

.login-box .error {
    color: #f44336;
    margin-bottom: 15px;
    font-size: 14px;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.login-box button:hover {
    background: #1976D2;
}

/* 头部 */
.header {
    background: white;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 24px;
    color: #333;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* 按钮 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.btn-primary {
    background: #2196F3;
    color: white;
}

.btn-primary:hover {
    background: #1976D2;
}

.btn-secondary {
    background: #757575;
    color: white;
}

.btn-secondary:hover {
    background: #616161;
}

.btn-success {
    background: #4CAF50;
    color: white;
}

.btn-success:hover {
    background: #45a049;
}

.btn-warning {
    background: #FF9800;
    color: white;
}

.btn-warning:hover {
    background: #F57C00;
}

/* 筛选栏 */
.filter-bar {
    background: white;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #f5f5f5;
}

.filter-btn.active {
    background: #2196F3;
    color: white;
    border-color: #2196F3;
}

/* 问题列表 */
.issues-list {
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.issue-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.issue-item:hover {
    background: #f9f9f9;
}

.issue-item:last-child {
    border-bottom: none;
}

.issue-item.expanded {
    background: #f5f5f5;
}

.issue-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.issue-content {
    flex: 1;
}

.issue-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.issue-title a {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

.issue-title a:hover {
    color: #2196F3;
}

.issue-title-link {
    cursor: pointer;
}

.issue-meta {
    font-size: 14px;
    color: #666;
    display: flex;
    gap: 15px;
}

.issue-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background: #FF9800;
    color: white;
}

.status-resolved {
    background: #4CAF50;
    color: white;
}

.status-closed {
    background: #9E9E9E;
    color: white;
}

.category-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
}

.category-frontend {
    background: #2196F3;
    color: white;
}

.category-backend {
    background: #9C27B0;
    color: white;
}

/* 表单 */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

/* 图片上传 */
.image-upload-area {
    border: 2px dashed #ddd;
    border-radius: 4px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.image-upload-area:hover {
    border-color: #2196F3;
    background: #f9f9f9;
}

.image-upload-area.dragover {
    border-color: #2196F3;
    background: #e3f2fd;
}

.upload-placeholder {
    color: #999;
    font-size: 14px;
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.preview-item {
    position: relative;
    width: 150px;
    height: 150px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.remove-btn:hover {
    background: rgba(0,0,0,0.8);
}

/* 详情页 */
.detail-container {
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.detail-card {
    padding: 30px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.detail-header h2 {
    font-size: 24px;
    color: #333;
    flex: 1;
}

.detail-meta {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.detail-url {
    margin-bottom: 20px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
}

.detail-url a {
    color: #2196F3;
    text-decoration: none;
}

.detail-url a:hover {
    text-decoration: underline;
}

.detail-description {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    white-space: pre-wrap;
    line-height: 1.8;
}

.detail-images {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.detail-images img {
    max-width: 300px;
    max-height: 300px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.detail-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 通用 */
.loading {
    padding: 40px;
    text-align: center;
    color: #999;
}

.error {
    padding: 20px;
    background: #ffebee;
    color: #c62828;
    border-radius: 4px;
    margin: 20px 0;
}

.empty {
    padding: 40px;
    text-align: center;
    color: #999;
}

/* 展开的详情 */
.issue-detail {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.expanded-detail {
    padding: 15px;
    background: white;
    border-radius: 4px;
}

.expanded-meta-single {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    word-break: break-all;
}

.expanded-meta-single a {
    color: #2196F3;
    text-decoration: none;
}

.expanded-meta-single a:hover {
    text-decoration: underline;
}

.expanded-description {
    margin-bottom: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    white-space: pre-wrap;
    line-height: 1.8;
}

.expanded-detail .detail-images {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.expanded-detail .detail-images img {
    max-width: 200px;
    max-height: 200px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.expanded-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* 图片放大模态框 */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.image-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.image-modal-close:hover {
    background: white;
}

/* 自定义确认对话框 */
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.custom-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.custom-modal-content {
    position: relative;
    background: white;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    z-index: 10001;
    overflow: hidden;
}

.custom-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.custom-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.custom-modal-body {
    padding: 20px;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.custom-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 回复区域 */
.replies-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.replies-loading {
    text-align: center;
    color: #999;
    padding: 20px;
}

.replies-list {
    margin-top: 15px;
}

.reply-item {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 10px;
    border-left: 3px solid #2196F3;
}

.reply-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.reply-content {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
    margin-bottom: 10px;
}

.reply-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.reply-images img {
    max-width: 150px;
    max-height: 150px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

/* 回复表单 */
.reply-form {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.reply-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.reply-form-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.reply-form-close {
    width: 24px;
    height: 24px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reply-form-close:hover {
    background: #e0e0e0;
}

.reply-form-body {
    margin-top: 15px;
}

.reply-form-body textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.reply-form-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

