/* forum-announcement.css - 论坛卡片和公告区域样式 */

/* 论坛卡片特殊样式 */
.forum-card {
    background: linear-gradient(135deg, #ffffff, #f0f8ff);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
}

.forum-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, transparent 50%, rgba(76, 163, 224, 0.1) 50%);
    border-radius: 0 0 0 100px;
    z-index: 0;
}

.forum-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(76, 163, 224, 0.2);
}

.forum-icon {
    background-color: rgba(76, 163, 224, 0.1);
    color: #0066cc;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.forum-icon i {
    font-size: 2rem;
}

.forum-card:hover .forum-icon {
    background-color: #0066cc;
    color: white;
    transform: scale(1.1);
}

.forum-card h3 {
    color: #003366;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.forum-card p {
    color: #5c7a99;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.forum-link {
    background-color: #4ca3e0;
    color: white;
    border-radius: 30px;
    padding: 10px 25px;
    font-weight: 500;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.forum-link:hover {
    background-color: #0066cc;
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
    transform: scale(1.05);
}

/* 公告区域样式 */
.announcement-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.announcement-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.announcement-container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 255, 0.95));
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(76, 163, 224, 0.15);
    border: 1px solid rgba(76, 163, 224, 0.2);
    overflow: hidden;
    position: relative;
}

.announcement-header {
    background: linear-gradient(135deg, #4ca3e0, #0066cc);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.announcement-title {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.announcement-title i {
    font-size: 1.3rem;
}

.announcement-date {
    font-size: 0.9rem;
    opacity: 0.9;
}

.announcement-content {
    padding: 1.5rem;
    color: #333;
    line-height: 1.8;
    font-size: 1rem;
}

.announcement-content.empty {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 2rem;
}

.admin-edit-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: none;
}

.admin-edit-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.admin-edit-btn.show {
    display: inline-block;
}

/* 公告编辑模态框样式 */
.announcement-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.announcement-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 600px;
    max-width: 90%;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.announcement-modal-header {
    background: linear-gradient(135deg, #4ca3e0, #0066cc);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.announcement-modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.announcement-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.8;
}

.announcement-close:hover {
    opacity: 1;
}

.announcement-modal-body {
    padding: 2rem;
}

.announcement-form-group {
    margin-bottom: 1.5rem;
}

.announcement-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.announcement-form-group input,
.announcement-form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.announcement-form-group input:focus,
.announcement-form-group textarea:focus {
    outline: none;
    border-color: #4ca3e0;
    box-shadow: 0 0 0 3px rgba(76, 163, 224, 0.1);
}

.announcement-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.announcement-form-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.announcement-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.announcement-btn-primary {
    background: #4ca3e0;
    color: white;
}

.announcement-btn-primary:hover {
    background: #0066cc;
    transform: translateY(-1px);
}

.announcement-btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.announcement-btn-secondary:hover {
    background: #e0e0e0;
}

/* 公告内容样式 */
.announcement-title-text {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
}

.announcement-content-text {
    white-space: pre-wrap;
}

.announcement-empty {
    text-align: center;
    color: #999;
    padding: 2rem;
}

.announcement-empty-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}