/* 团员评议系统自定义样式 - 红色主题 */

/* 全局样式 */
body {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    min-height: 100vh;
}

/* 自述列表容器 - 使用 CSS Grid 实现瀑布流效果 */
#reportsContainer {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    align-items: start;
}

#reportsContainer > div {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* 卡片样式 */
.report-card {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.1);
    margin-bottom: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    overflow: hidden;
    position: relative;
}

.report-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(231, 76, 60, 0.2);
}

/* 已评分卡片样式 */
.report-card.rated-card {
    border: 2px solid #e74c3c;
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.15);
}

.report-card.rated-card:hover {
    box-shadow: 0 12px 35px rgba(231, 76, 60, 0.25);
}

/* 已评分徽章 */
.rated-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    display: flex;
    align-items: center;
    gap: 5px;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.rated-score {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 5px;
}

/* 我的评分信息 */
.my-rating-info {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border-left: 4px solid #e74c3c;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 0.9rem;
    color: #c0392b;
    font-weight: 500;
}

.my-rating-info i {
    color: #e74c3c;
}

.report-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-header {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border-radius: 16px 16px 0 0 !important;
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}

.card-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    position: relative;
}

.card-subtitle {
    margin: 8px 0 0 0;
    font-size: 0.85rem;
    opacity: 0.9;
    position: relative;
}

/* 评分样式 */
.rating-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 15px 0;
    padding: 12px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border-radius: 10px;
}

.star-rating {
    display: flex;
    gap: 3px;
}

.star {
    font-size: 1.4rem;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.star:hover,
.star.active {
    color: #e74c3c;
    text-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

.star.editable:hover {
    color: #e74c3c;
    transform: scale(1.2);
}

.rating-info {
    font-size: 0.9rem;
    color: #6c757d;
}

.rating-info .badge {
    font-size: 0.8rem;
    margin-left: 5px;
    border-radius: 20px;
}

/* 内容区域 */
.card-body {
    padding: 20px;
}

.report-content {
    line-height: 1.8;
    margin-bottom: 15px;
    max-height: 120px;
    overflow: hidden;
    position: relative;
    color: #444;
    flex: 1;
}

.report-content.expanded {
    max-height: none;
}

.read-more {
    color: #e74c3c;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 10px;
    display: inline-block;
    font-weight: 500;
    transition: all 0.2s ease;
}

.read-more:hover {
    text-decoration: underline;
    color: #c0392b;
}

/* 操作按钮 */
.card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.btn-action {
    border-radius: 25px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 80px;
}

.btn-rate {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    border: none;
    color: white;
}

.btn-rate:hover {
    background: linear-gradient(45deg, #c0392b, #e74c3c);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    color: white;
}

.btn-rate.disabled,
.btn-rate:disabled {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-rate.disabled:hover,
.btn-rate:disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-edit {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    border: none;
    color: white;
}

.btn-edit:hover {
    background: linear-gradient(45deg, #e67e22, #f39c12);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
    color: white;
}

.btn-delete {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    border: none;
    color: white;
}

.btn-delete:hover {
    background: linear-gradient(45deg, #7f8c8d, #95a5a6);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.4);
    color: white;
}

/* 模态框样式 */
.modal-header {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border-radius: 0.375rem 0.375rem 0 0;
}

.modal-title {
    font-weight: 600;
}

.modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-footer {
    border-top: 1px solid #f0f0f0;
}

.modal-footer .btn-primary {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
}

.modal-footer .btn-primary:hover {
    background: linear-gradient(45deg, #c0392b, #e74c3c);
}

.modal-footer .btn-secondary {
    border-radius: 25px;
    padding: 10px 25px;
}

/* 表单样式 */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.form-control,
.form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.15);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #e74c3c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #6c757d;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.empty-state i {
    font-size: 5rem;
    margin-bottom: 25px;
    color: #e74c3c;
    opacity: 0.3;
}

.empty-state h3 {
    margin-bottom: 15px;
    color: #495057;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #reportsContainer {
        grid-template-columns: 1fr;
    }
    
    .card-header {
        padding: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    .btn-action {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .rating-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .filter-bar {
        padding: 15px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #reportsContainer {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    #reportsContainer {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1400px) {
    #reportsContainer {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 工具提示样式 */
.tooltip-inner {
    background-color: #333;
    color: white;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
}

/* 成功/错误消息样式 */
.alert {
    border-radius: 12px;
    border: none;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
}

.alert-danger {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

/* 导出按钮样式 */
.btn-export {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.btn-export:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    transform: translateY(-2px);
    color: white;
}

/* 发表按钮样式 */
.btn-publish {
    background: white;
    border: none;
    color: #e74c3c;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-publish:hover {
    background: #fff5f5;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    color: #c0392b;
}

/* 筛选栏样式 */
.filter-bar {
    background: white;
    padding: 20px 25px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.1);
}

.stats-info .badge {
    font-size: 0.9rem;
    padding: 10px 15px;
    font-weight: 500;
}

.search-box {
    position: relative;
}

.search-box .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #e74c3c;
    z-index: 1;
    opacity: 0.6;
}

.search-box .form-control {
    padding-left: 45px;
    border-radius: 25px;
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
    background: #fafafa;
}

.search-box .form-control:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.1);
    background: white;
}

#sortSelect {
    border-radius: 25px;
    border: 2px solid #f0f0f0;
    padding: 12px 20px;
    cursor: pointer;
    background: #fafafa;
}

#sortSelect:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.1);
    background: white;
}

/* 卡片入场动画 */
.report-item {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 为每个卡片添加延迟动画 */
.report-item:nth-child(1) { animation-delay: 0.05s; }
.report-item:nth-child(2) { animation-delay: 0.1s; }
.report-item:nth-child(3) { animation-delay: 0.15s; }
.report-item:nth-child(4) { animation-delay: 0.2s; }
.report-item:nth-child(5) { animation-delay: 0.25s; }
.report-item:nth-child(6) { animation-delay: 0.3s; }
.report-item:nth-child(7) { animation-delay: 0.35s; }
.report-item:nth-child(8) { animation-delay: 0.4s; }
.report-item:nth-child(9) { animation-delay: 0.45s; }
.report-item:nth-child(10) { animation-delay: 0.5s; }
.report-item:nth-child(n+11) { animation-delay: 0.55s; }

/* 页脚装饰 */
.container {
    padding-bottom: 40px;
}
