/**
 * 反馈系统样式表
 * 包含背景蒙版、卡片样式、响应式布局等
 */

/* ==================== 基础样式重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 
                 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    min-height: 100vh;
    position: relative;
}

/* ==================== 背景图片层 ==================== */
/* 背景API配置位置: includes/config.php 中的 BACKGROUND_API_URL */
.background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-image: url('https://api.cyuan.cloud/api/ecyfj.php');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* ==================== 蒙版层 ==================== */
/* 蒙版强度配置位置: includes/config.php 中的 OVERLAY_OPACITY 和 OVERLAY_COLOR */
.overlay-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* 
     * 蒙版渐变配置说明:
     * 第一个 rgba 是顶部颜色，第二个是底部颜色
     * 最后一个数值是不透明度 (0-1)，越大越暗
     * 修改 includes/config.php 中的 OVERLAY_OPACITY 来调整
     */
    background: linear-gradient(
        rgba(0, 0, 0, 0.25),
        rgba(0, 0, 0, 0.30)
    );
}

/* ==================== 内容容器 ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* ==================== 头部样式 ==================== */
.header {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
}

/* ==================== 导航栏 ==================== */
.navbar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 12px 30px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 25px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.nav-btn.active {
    background: rgba(99, 102, 241, 0.8);
    border-color: rgba(99, 102, 241, 0.8);
}

/* ==================== 玻璃拟态卡片 ==================== */
.glass-card {
    background: rgba(30, 30, 40, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.card-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* ==================== 表单样式 ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

.form-label .required {
    color: #ff6b6b;
    margin-left: 4px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.8);
    background: rgba(0,0,0,0.4);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255,255,255,0.4);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* ==================== 按钮样式 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

.btn-danger:hover {
    box-shadow: 0 5px 20px rgba(239, 68, 68, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

.btn-success:hover {
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}

/* ==================== 反馈列表样式 ==================== */
.feedback-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feedback-item {
    background: rgba(40, 40, 50, 0.6);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.feedback-item:hover {
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
}

.feedback-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(0,0,0,0.2);
}

.feedback-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
    object-fit: cover;
}

.feedback-meta {
    flex: 1;
}

.feedback-author {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

.feedback-qq {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

.feedback-date {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

.feedback-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.status-processing {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.status-resolved {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status-rejected {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.feedback-content {
    padding: 20px;
}

.feedback-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
}

.feedback-body {
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
    white-space: pre-wrap;
}

.feedback-actions {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* ==================== 评论样式 ==================== */
.comments-section {
    padding: 20px;
    background: rgba(0,0,0,0.15);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.comments-title {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    margin-bottom: 15px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 15px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    margin-bottom: 10px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
}

.comment-content {
    flex: 1;
}

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

.comment-author {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}

.comment-badge {
    padding: 2px 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 4px;
    font-size: 0.7rem;
    color: #fff;
}

.comment-time {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}

.comment-text {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    line-height: 1.6;
}

.comment-form {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.comment-input {
    flex: 1;
    padding: 10px 15px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
}

.comment-input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.6);
}

/* ==================== 提示消息 ==================== */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

/* ==================== 统计卡片 ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(40, 40, 50, 0.6);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.08);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.stat-label {
    color: rgba(255,255,255,0.6);
    font-size: 0.95rem;
}

/* ==================== 表格样式 ==================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.data-table th {
    color: rgba(255,255,255,0.7);
    font-weight: 600;
    font-size: 0.9rem;
    background: rgba(0,0,0,0.2);
}

.data-table td {
    color: rgba(255,255,255,0.9);
}

.data-table tr:hover td {
    background: rgba(255,255,255,0.03);
}

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.page-btn {
    padding: 8px 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background: rgba(255,255,255,0.15);
}

.page-btn.active {
    background: rgba(99, 102, 241, 0.8);
    border-color: rgba(99, 102, 241, 0.8);
    color: #fff;
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-text {
    color: rgba(255,255,255,0.6);
    font-size: 1.1rem;
}

/* ==================== 登录表单 ==================== */
.login-container {
    max-width: 400px;
    margin: 100px auto;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo h1 {
    font-size: 2rem;
    color: #fff;
}

/* ==================== 响应式布局 ==================== */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .glass-card {
        padding: 20px;
    }
    
    .feedback-header {
        flex-wrap: wrap;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .navbar {
        gap: 10px;
    }
    
    .nav-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
}

/* ==================== 动画效果 ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* ==================== 加载动画 ==================== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
