/* ============================================================
   毕业同学录 - 前台样式（玻璃磨砂质感 · 毕业季主题）
   配色：暖金 + 深棕 + 奶油白，无紫色无蓝色
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: #1a0f0a;
    color: #3d2317;
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* 毕业季背景 - 暖色渐变 + 细微纹理 */
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(196, 148, 62, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(212, 168, 75, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(181, 84, 0, 0.1) 0%, transparent 50%),
        repeating-linear-gradient(
            45deg,
            transparent 0px,
            transparent 2px,
            rgba(255, 255, 255, 0.02) 2px,
            rgba(255, 255, 255, 0.02) 4px
        );
    background-attachment: fixed;
}

a {
    color: #b55400;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #d35400;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}
::-webkit-scrollbar-thumb {
    background: rgba(196, 148, 62, 0.4);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(196, 148, 62, 0.6);
}

/* ==========================================
   公告弹窗
   ========================================== */
.announcement-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(26, 15, 10, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.announcement-box {
    max-width: 520px;
    width: 100%;
    background: rgba(250, 243, 224, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(196, 148, 62, 0.3);
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(135deg, #3d2317, #2c1810);
    color: #f5e6cc;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
}

.announcement-close {
    background: linear-gradient(135deg, #c8943e, #d4a84b);
    color: #2c1810;
    border: none;
    padding: 6px 20px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 700;
    transition: opacity 0.3s;
}

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

.announcement-body {
    padding: 24px;
    font-size: 14px;
    color: #3d2317;
    line-height: 1.8;
    max-height: 400px;
    overflow-y: auto;
}

/* ==========================================
   顶部导航
   ========================================== */
.site-header {
    background: rgba(44, 24, 16, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(196, 148, 62, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.site-logo {
    display: flex;
    align-items: center;
}

.site-logo img {
    max-height: 44px;
    max-width: 180px;
}

.site-name {
    font-size: 20px;
    font-weight: 700;
    color: #f5e6cc;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #f5e6cc, #d4a84b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- 桌面导航 ---------- */
.site-nav {
    display: flex;
    gap: 4px;
}

.nav-link {
    display: block;
    padding: 8px 22px;
    color: rgba(245, 230, 204, 0.7);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    border: 1px solid transparent;
    transition: all 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: #f5e6cc;
    background: rgba(196, 148, 62, 0.2);
    border-color: rgba(196, 148, 62, 0.3);
}

/* ---------- 移动端汉堡菜单 ---------- */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #f5e6cc;
    transition: all 0.3s;
}

/* ==========================================
   Hero 区域
   ========================================== */
.hero-section {
    position: relative;
    padding: 60px 20px 50px;
    text-align: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(212, 168, 75, 0.08) 0%, transparent 70%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(5%, 5%); }
}

.hero-title {
    position: relative;
    z-index: 1;
    font-size: 36px;
    font-weight: 800;
    color: #f5e6cc;
    letter-spacing: 4px;
    margin-bottom: 10px;
    text-shadow: 0 2px 20px rgba(196, 148, 62, 0.3);
}

.hero-subtitle {
    position: relative;
    z-index: 1;
    font-size: 15px;
    color: rgba(245, 230, 204, 0.6);
    letter-spacing: 6px;
    font-weight: 300;
}

/* ---------- 毕业装饰元素 ---------- */
.hero-decoration {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.hero-decoration .dot {
    width: 6px;
    height: 6px;
    background: #d4a84b;
    opacity: 0.5;
}

.hero-decoration .line-deco {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d4a84b, transparent);
    margin-top: 2.5px;
}

/* ==========================================
   容器
   ========================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    flex: 1;
    width: 100%;
}

/* ==========================================
   Tab 切换
   ========================================== */
.tab-bar {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(196, 148, 62, 0.2);
    justify-content: center;
}

.tab-btn {
    padding: 12px 40px;
    border: none;
    background: none;
    font-size: 15px;
    font-weight: 600;
    color: rgba(245, 230, 204, 0.5);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.3s;
    letter-spacing: 2px;
}

.tab-btn.active {
    color: #f5e6cc;
    border-bottom-color: #d4a84b;
}

.tab-btn:hover {
    color: #f5e6cc;
}

/* ==========================================
   成员卡片网格（玻璃磨砂）
   ========================================== */
.member-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .member-grid {
        grid-template-columns: 1fr;
    }
}

.member-card {
    display: flex;
    background: rgba(250, 243, 224, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(196, 148, 62, 0.15);
    padding: 24px;
    gap: 18px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.member-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(250, 243, 224, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.member-card:hover {
    background: rgba(250, 243, 224, 0.15);
    border-color: rgba(196, 148, 62, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.member-avatar {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
    background: rgba(196, 148, 62, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-text {
    font-size: 28px;
    font-weight: 700;
    color: #d4a84b;
}

.member-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.member-name {
    font-size: 18px;
    font-weight: 700;
    color: #f5e6cc;
    margin-bottom: 4px;
}

.member-nickname {
    font-size: 13px;
    color: rgba(212, 168, 75, 0.7);
    margin-bottom: 6px;
}

.member-intro {
    font-size: 13px;
    color: rgba(245, 230, 204, 0.6);
    line-height: 1.6;
    margin-bottom: 12px;
}

.member-link {
    display: inline-block;
    padding: 6px 18px;
    background: linear-gradient(135deg, #c8943e, #d4a84b);
    color: #2c1810;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s;
}

.member-link:hover {
    opacity: 0.85;
    color: #2c1810;
    box-shadow: 0 4px 20px rgba(196, 148, 62, 0.3);
}

/* ---------- 空状态 ---------- */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: rgba(245, 230, 204, 0.4);
    font-size: 15px;
    background: rgba(250, 243, 224, 0.05);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(196, 148, 62, 0.1);
}

/* ==========================================
   详情页
   ========================================== */
.detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-top: 24px;
}

.back-link {
    padding: 8px 20px;
    background: rgba(245, 230, 204, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(196, 148, 62, 0.2);
    color: #f5e6cc;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}

.back-link:hover {
    background: rgba(196, 148, 62, 0.2);
    color: #f5e6cc;
}

.detail-type {
    font-size: 14px;
    color: rgba(245, 230, 204, 0.5);
    letter-spacing: 1px;
}

.detail-card {
    background: rgba(250, 243, 224, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(196, 148, 62, 0.15);
    padding: 40px;
    margin-bottom: 24px;
}

.detail-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    overflow: hidden;
    background: rgba(196, 148, 62, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(196, 148, 62, 0.3);
}

.detail-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-text-lg {
    font-size: 42px;
    font-weight: 700;
    color: #d4a84b;
}

.detail-name {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #f5e6cc;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.detail-nickname {
    font-size: 18px;
    font-weight: 400;
    color: rgba(212, 168, 75, 0.7);
}

.detail-intro {
    text-align: center;
    color: rgba(245, 230, 204, 0.7);
    font-size: 15px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(196, 148, 62, 0.15);
}

.detail-content {
    margin-bottom: 28px;
}

.detail-content h3,
.detail-images h3 {
    font-size: 16px;
    font-weight: 700;
    color: #f5e6cc;
    margin-bottom: 14px;
    padding-left: 12px;
    border-left: 3px solid #d4a84b;
    letter-spacing: 1px;
}

.content-text {
    color: rgba(245, 230, 204, 0.8);
    line-height: 1.9;
    white-space: pre-wrap;
}

/* ---------- 图片集 ---------- */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.gallery-item {
    border: 1px solid rgba(196, 148, 62, 0.15);
    overflow: hidden;
    aspect-ratio: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ==========================================
   评论区
   ========================================== */
.comment-section {
    background: rgba(250, 243, 224, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(196, 148, 62, 0.15);
    padding: 30px;
    margin-bottom: 30px;
}

.comment-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: #f5e6cc;
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 3px solid #d4a84b;
    letter-spacing: 1px;
}

.comment-form {
    margin-bottom: 16px;
}

.comment-form textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(196, 148, 62, 0.2);
    background: rgba(245, 230, 204, 0.08);
    font-size: 14px;
    color: #f5e6cc;
    outline: none;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.comment-form textarea::placeholder {
    color: rgba(245, 230, 204, 0.35);
}

.comment-form textarea:focus {
    border-color: rgba(196, 148, 62, 0.5);
    background: rgba(245, 230, 204, 0.12);
}

.btn-comment {
    margin-top: 12px;
    padding: 10px 28px;
    background: linear-gradient(135deg, #c8943e, #d4a84b);
    color: #2c1810;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.btn-comment:hover {
    opacity: 0.85;
    box-shadow: 0 4px 20px rgba(196, 148, 62, 0.3);
}

.btn-comment:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.comment-msg {
    padding: 8px 14px;
    margin-bottom: 12px;
    font-size: 13px;
}

.comment-msg.error {
    border: 1px solid rgba(192, 57, 43, 0.5);
    background: rgba(192, 57, 43, 0.15);
    color: #e74c3c;
}

.comment-msg.success {
    border: 1px solid rgba(39, 174, 96, 0.5);
    background: rgba(39, 174, 96, 0.15);
    color: #2ecc71;
}

.comment-item {
    padding: 16px 0;
    border-bottom: 1px solid rgba(196, 148, 62, 0.1);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-body {
    font-size: 14px;
    color: rgba(245, 230, 204, 0.8);
    line-height: 1.7;
}

.comment-time {
    font-size: 12px;
    color: rgba(245, 230, 204, 0.35);
    margin-top: 6px;
}

.comment-empty {
    text-align: center;
    color: rgba(245, 230, 204, 0.35);
    padding: 30px 0;
    font-size: 14px;
}

/* ==========================================
   底部（始终靠底）
   ========================================== */
.site-footer {
    margin-top: auto;
    background: rgba(44, 24, 16, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(196, 148, 62, 0.15);
    padding: 20px;
    text-align: center;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.site-footer p {
    color: rgba(245, 230, 204, 0.4);
    font-size: 13px;
    letter-spacing: 1px;
}

/* ==========================================
   移动端适配
   ========================================== */
@media (max-width: 768px) {
    .site-header-inner {
        height: 56px;
    }

    .hero-title {
        font-size: 24px;
        letter-spacing: 2px;
    }

    .hero-subtitle {
        font-size: 13px;
        letter-spacing: 3px;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: rgba(44, 24, 16, 0.95);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 8px 0;
        border-bottom: 1px solid rgba(196, 148, 62, 0.2);
    }

    .site-nav.open {
        display: flex;
    }

    .nav-link {
        padding: 12px 24px;
        border: none;
        border-left: 3px solid transparent;
    }

    .nav-link:hover,
    .nav-link.active {
        border-left-color: #d4a84b;
        background: rgba(196, 148, 62, 0.1);
    }

    .mobile-toggle {
        display: flex;
    }

    .detail-card {
        padding: 24px 20px;
    }

    .detail-avatar {
        width: 90px;
        height: 90px;
    }

    .detail-name {
        font-size: 22px;
    }

    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .comment-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 20px;
    }

    .member-card {
        padding: 16px;
        gap: 12px;
    }

    .member-avatar {
        width: 60px;
        height: 60px;
    }

    .avatar-text {
        font-size: 22px;
    }

    .member-name {
        font-size: 16px;
    }

    .tab-btn {
        padding: 10px 24px;
        font-size: 14px;
    }
}
