/* 反馈页面样式 */

/* 页面容器 */
.feedback-container {
    min-height: 100vh;
    background: var(--bg-primary, #f8fafc);
    padding: 2rem 1rem;
}

/* 页头 */
.feedback-header {
    max-width: 640px;
    margin: 0 auto 2rem;
    text-align: center;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary, #64748b);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--primary-color, #3b82f6);
}

.feedback-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    margin: 0 0 0.5rem;
}

.feedback-subtitle {
    font-size: 1rem;
    color: var(--text-secondary, #64748b);
    margin: 0;
}

/* 主要内容 */
.feedback-main {
    max-width: 640px;
    margin: 0 auto;
}

/* 表单样式 */
.feedback-form {
    background: var(--card-bg, #ffffff);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color, #e2e8f0);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.label-text {
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    font-size: 0.95rem;
}

.label-required {
    color: #ef4444;
    font-weight: 500;
}

.label-optional {
    color: var(--text-muted, #94a3b8);
    font-size: 0.85rem;
    font-weight: 400;
}

/* 反馈类型选择 */
.feedback-type-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.type-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 1rem;
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-secondary, #f8fafc);
}

.type-card:hover {
    border-color: var(--primary-color, #3b82f6);
    background: rgba(59, 130, 246, 0.05);
}

.type-option input:checked + .type-card {
    border-color: var(--primary-color, #3b82f6);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.type-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

.type-icon svg {
    width: 24px;
    height: 24px;
}

.type-icon.bug {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.type-icon.feature {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.type-icon.other {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.type-name {
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.type-desc {
    font-size: 0.75rem;
    color: var(--text-muted, #94a3b8);
    text-align: center;
}

/* 输入框样式 */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--text-primary, #1e293b);
    background: var(--card-bg, #ffffff);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color, #3b82f6);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
    font-family: inherit;
}

.textarea-counter {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-muted, #94a3b8);
    margin-top: 0.5rem;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted, #94a3b8);
    margin: 0.5rem 0 0;
}

/* 提交按钮 */
.form-actions {
    margin-top: 2rem;
}

.submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.35);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 常见问题 */
.faq-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--card-bg, #ffffff);
    border-radius: 16px;
    border: 1px solid var(--border-color, #e2e8f0);
}

.faq-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin: 0 0 1rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    overflow: hidden;
}

.faq-question {
    padding: 1rem;
    font-weight: 500;
    color: var(--text-primary, #1e293b);
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary, #f8fafc);
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: var(--hover-bg, #f1f5f9);
}

.faq-question::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--text-muted, #94a3b8);
    transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 1rem;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary, #64748b);
    line-height: 1.6;
    border-top: 1px solid var(--border-color, #e2e8f0);
    background: var(--card-bg, #ffffff);
}

/* 成功弹窗 */
.success-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.success-modal.show {
    display: flex;
}

.success-content {
    background: var(--card-bg, #ffffff);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    max-width: 360px;
    width: 90%;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.success-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    margin: 0 0 0.5rem;
}

.success-message {
    font-size: 0.95rem;
    color: var(--text-secondary, #64748b);
    margin: 0 0 1.5rem;
}

.success-btn {
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.success-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

/* 反馈列表区域 */
.feedback-list-section {
    margin-top: 2rem;
    background: var(--card-bg, #ffffff);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color, #e2e8f0);
}

.feedback-list-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin: 0;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-secondary, #f1f5f9);
    padding: 4px;
    border-radius: 10px;
}

.filter-tab {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary, #64748b);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    color: var(--text-primary, #1e293b);
}

.filter-tab.active {
    background: var(--card-bg, #ffffff);
    color: var(--primary-color, #3b82f6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.feedback-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 200px;
}

.list-loading,
.list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--text-muted, #94a3b8);
    gap: 1rem;
}

.list-loading .spinner {
    width: 32px;
    height: 32px;
}

.list-empty svg {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

.list-empty p {
    margin: 0;
    font-size: 0.9rem;
}

/* 反馈项样式 */
.feedback-item {
    background: var(--bg-secondary, #f8fafc);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border-color, #e2e8f0);
    transition: all 0.2s ease;
}

.feedback-item:hover {
    border-color: var(--primary-color, #3b82f6);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.feedback-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feedback-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

.user-nickname {
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    font-size: 0.95rem;
}

.feedback-item-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.feedback-item-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.feedback-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.feedback-type-badge.bug {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.feedback-type-badge.feature {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.feedback-type-badge.other {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.feedback-type-badge svg {
    width: 12px;
    height: 12px;
}

.feedback-tool {
    font-size: 0.8rem;
    color: var(--text-muted, #94a3b8);
    background: var(--card-bg, #ffffff);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.feedback-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.feedback-status.pending {
    background: rgba(251, 191, 36, 0.1);
    color: #f59e0b;
}

.feedback-status.processing {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.feedback-status.resolved {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.feedback-status.closed {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

.feedback-item-content {
    font-size: 0.9rem;
    color: var(--text-primary, #1e293b);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feedback-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted, #94a3b8);
}

.feedback-time {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.feedback-time svg {
    width: 14px;
    height: 14px;
}

.feedback-reply {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--primary-color, #3b82f6);
}

.feedback-reply svg {
    width: 14px;
    height: 14px;
}

/* 官方回复样式 */
.feedback-official-reply {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.05);
    border-left: 3px solid var(--primary-color, #3b82f6);
    border-radius: 0 8px 8px 0;
}

.reply-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.reply-badge {
    background: var(--primary-color, #3b82f6);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.reply-time {
    font-size: 0.75rem;
    color: var(--text-muted, #94a3b8);
}

.reply-content {
    font-size: 0.85rem;
    color: var(--text-secondary, #64748b);
    line-height: 1.6;
}

/* 分页 */
.list-pagination {
    text-align: center;
    margin-top: 1.5rem;
}

.pagination-btn {
    padding: 0.75rem 2rem;
    background: var(--bg-secondary, #f1f5f9);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    color: var(--text-secondary, #64748b);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background: var(--primary-color, #3b82f6);
    border-color: var(--primary-color, #3b82f6);
    color: white;
}

/* 响应式布局 */
@media (max-width: 640px) {
    .feedback-container {
        padding: 1rem;
    }

    .feedback-form {
        padding: 1.5rem;
    }

    .feedback-title {
        font-size: 1.5rem;
    }

    .feedback-type-options {
        grid-template-columns: 1fr;
    }

    .type-card {
        flex-direction: row;
        gap: 1rem;
        padding: 1rem;
    }

    .type-icon {
        margin-bottom: 0;
    }

    .type-option input:checked + .type-card .type-name,
    .type-option input:checked + .type-card .type-desc {
        text-align: left;
    }
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
    .feedback-container {
        background: #000000;
    }

    .feedback-form,
    .feedback-list-section,
    .success-content {
        background: #1C1C1E;
        border-color: #38383A;
    }

    .feedback-title,
    .label-text,
    .type-name,
    .section-title,
    .success-title,
    .feedback-item-content,
    .user-nickname {
        color: #FFFFFF;
    }

    .feedback-subtitle,
    .back-link,
    .label-optional,
    .type-desc,
    .textarea-counter,
    .form-hint,
    .success-message,
    .list-loading,
    .list-empty,
    .feedback-time,
    .reply-time {
        color: #8E8E93;
    }

    .form-input,
    .form-select,
    .form-textarea {
        background: #2C2C2E;
        border-color: #38383A;
        color: #FFFFFF;
    }

    .form-input::placeholder,
    .form-textarea::placeholder {
        color: #8E8E93;
    }

    .type-card {
        background: #2C2C2E;
        border-color: #38383A;
    }

    .filter-tabs {
        background: #2C2C2E;
    }

    .filter-tab {
        color: #8E8E93;
    }

    .filter-tab.active {
        background: #3A3A3C;
        color: #3b82f6;
    }

    .feedback-item {
        background: #2C2C2E;
        border-color: #38383A;
    }

    .feedback-tool {
        background: #3A3A3C;
    }

    .feedback-official-reply {
        background: rgba(59, 130, 246, 0.1);
    }

    .reply-content {
        color: #8E8E93;
    }

    .pagination-btn {
        background: #2C2C2E;
        border-color: #38383A;
        color: #8E8E93;
    }
}
