/**
 * 系统反馈弹窗样式模块
 * 包含：系统反馈弹窗、系统反馈成功弹窗样式
 * 符合规范：CSS样式独立性，使用命名空间避免冲突
 */

/* ==================== 系统反馈弹窗样式 ==================== */

/* 系统反馈模态框背景模糊效果 - 与邀请码窗口一致 */
.modal#systemFeedbackModal,
#systemFeedbackModal.modal {
    background-color: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

/* 系统反馈提交成功窗口背景模糊效果 - 与邀请码窗口一致 */
.modal#systemFeedbackSuccessModal,
#systemFeedbackSuccessModal.modal {
    background-color: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

.system-feedback-modal {
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.system-feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-primary);
    flex-shrink: 0;
}

.system-feedback-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
}

.system-feedback-close {
    font-size: 28px;
    font-weight: 300;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.system-feedback-close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
    transform: rotate(90deg);
}

.system-feedback-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.system-feedback-body::-webkit-scrollbar {
    width: 6px;
}

.system-feedback-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

.feedback-tip {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
}

.feedback-tip p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
}

.system-feedback-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.system-feedback-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.system-feedback-form label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
}

.system-feedback-form .required {
    color: #f44336;
    margin-left: 2px;
}

.system-feedback-form textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    resize: vertical;
    min-height: 120px;
    outline: none;
    transition: all 0.3s ease;
}

.system-feedback-form textarea:focus {
    border-color: var(--border-accent);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.system-feedback-form textarea::placeholder {
    color: var(--text-muted);
}

.char-count-container {
    display: flex;
    justify-content: flex-end;
}

.system-feedback-form .char-count {
    font-size: 12px;
    color: var(--text-muted);
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
}

.system-feedback-form .media-upload-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.system-feedback-form .media-upload-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.system-feedback-form .media-upload-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.system-feedback-form .media-upload-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-secondary);
    transform: translateY(-1px);
}

/* 确保系统反馈按钮始终显示 */
#addSystemFeedbackImageBtn,
#addSystemFeedbackVideoBtn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 系统反馈提交进度条（单行显示，不影响按钮） */
.system-feedback-submit-progress {
    width: 100%;
    margin-bottom: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(102, 126, 234, 0.1);
    backdrop-filter: blur(5px);
}

.system-feedback-progress-content {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    font-size: 12px;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
    white-space: nowrap;
    overflow: hidden;
}

.system-feedback-progress-bar-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.system-feedback-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid rgba(102, 126, 234, 0.08);
}

.system-feedback-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.6), rgba(90, 111, 216, 0.7));
    border-radius: 2px;
    transition: width 0.2s ease-out;
    width: 0%;
    box-shadow: 0 0 4px rgba(102, 126, 234, 0.3);
}

.system-feedback-progress-percent {
    color: var(--text-accent);
    font-weight: 500;
    flex-shrink: 0;
    min-width: 40px;
    text-align: right;
}

.system-feedback-progress-size {
    color: var(--text-muted);
    font-size: 11px;
    flex-shrink: 0;
    min-width: 90px;
    text-align: right;
}

.system-feedback-progress-speed {
    color: var(--text-muted);
    font-size: 11px;
    flex-shrink: 0;
    min-width: 70px;
    text-align: right;
}

.system-feedback-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.system-feedback-preview-item {
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    overflow: hidden;
}

.system-feedback-preview-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.preview-thumbnail-container {
    width: 100%;
    aspect-ratio: 1;
    position: relative;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.preview-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-image-placeholder,
.thumbnail-video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: var(--bg-tertiary);
}

.preview-file-info {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
    flex: 1;
}

.preview-file-name {
    font-size: 12px;
    color: var(--text-primary);
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.preview-file-size {
    font-size: 11px;
    color: var(--text-muted);
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
}

.preview-item-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
    line-height: 1;
}

.preview-item-remove:hover {
    background: rgba(244, 67, 54, 0.9);
    transform: scale(1.1);
}

.upload-hint {
    margin-top: 8px;
}

.upload-hint .hint-text {
    font-size: 12px;
    color: var(--text-muted);
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
    line-height: 1.5;
}

.system-feedback-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-primary);
    flex-shrink: 0;
}

/* 系统反馈底部按钮固定大小，防止提交时改变 */
.system-feedback-footer .btn {
    min-height: 38px;
    height: 38px;
    min-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

/* 确保"提交反馈"和"提交中"按钮宽度一致 */
#submitSystemFeedbackBtn {
    min-width: 100px;
    width: auto;
}

/* ==================== 系统反馈成功弹窗样式 ==================== */

.system-feedback-success-modal {
    z-index: 10001;
}

.system-feedback-success-content {
    max-width: 450px;
    width: 90%;
    padding: 40px;
    text-align: center;
    opacity: 0;
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9) translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 350px;
    height: 350px;
    margin: 0;
}

.system-feedback-success-content.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) translateY(0);
}

.success-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.success-icon-container {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(102, 126, 234, 0.2));
    border-radius: 50%;
    animation: successPulse 0.6s ease-out;
    flex-shrink: 0;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-icon {
    width: 40px;
    height: 40px;
    color: #4caf50;
    animation: successCheck 0.6s ease-out 0.2s both;
}

@keyframes successCheck {
    0% {
        stroke-dasharray: 0, 100;
        opacity: 0;
    }
    100% {
        stroke-dasharray: 100, 0;
        opacity: 1;
    }
}

.success-animation h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
    animation: fadeInUp 0.4s ease-out 0.3s both;
}

.success-message {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
    animation: fadeInUp 0.4s ease-out 0.4s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-animation .btn {
    margin-top: 12px;
    animation: fadeInUp 0.4s ease-out 0.5s both;
    padding: 10px 24px;
}

