
/* ===== 全局重置 & 基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'ZCOOL KuaiLe', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #f7f3ff;
    background-image: radial-gradient(circle at 10% 20%, rgba(255, 236, 210, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(210, 230, 255, 0.4) 0%, transparent 50%);
    min-height: 100vh;
    padding: 0 0 80px 0;
    color: #2d2a3e;
    -webkit-font-smoothing: antialiased;
}

/* ===== Header ===== */
.header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid #e8deff;
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
}
.logo-icon {
    font-size: 28px;
    line-height: 1;
}
.logo-text {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #7c4dff, #b388ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lab-name {
    font-size: 15px;
    color: #5a4e7a;
    background: rgba(124, 77, 255, 0.08);
    padding: 4px 14px;
    border-radius: 40px;
    white-space: nowrap;
    border: 1px solid #d5c6ff;
    display: flex;
    align-items: center;
    gap: 4px;
}
.code-tag {
    opacity: 0.6;
    font-weight: 300;
}

.nav {
    display: flex;
    gap: 12px 20px;
    flex-wrap: wrap;
}
.nav-link {
    text-decoration: none;
    color: #3d3566;
    font-size: 15px;
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
    white-space: nowrap;
}
.nav-link:hover {
    border-bottom-color: #7c4dff;
    color: #7c4dff;
}

.btn-primary {
    background: linear-gradient(145deg, #7c4dff, #651fff);
    border: none;
    padding: 8px 20px;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(124, 77, 255, 0.3);
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    white-space: nowrap;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 77, 255, 0.4);
}
.btn-primary:active {
    transform: scale(0.96);
}

/* ===== Main Layout ===== */
.main {
    max-width: 1280px;
    margin: 20px auto 0;
    padding: 0 16px 40px;
}

.layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

/* ===== Sidebar 时间线 ===== */
.sidebar {
    flex: 0 0 280px;
    position: sticky;
    top: 100px;
}

.timeline-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 32px;
    padding: 24px 18px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 20px;
    margin-bottom: 6px;
}
.timeline-header h2 {
    font-size: 20px;
    background: linear-gradient(135deg, #7c4dff, #b388ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.star {
    color: #ffd54f;
}

.timeline-subtitle {
    text-align: center;
    font-size: 14px;
    color: #6d6390;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.timeline-item {
    display: flex;
    gap: 14px;
    padding-left: 8px;
    position: relative;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 24px;
    bottom: -10px;
    width: 2px;
    background: #d5c6ff;
    opacity: 0.4;
}
.timeline-item:last-child::before {
    display: none;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(124, 77, 255, 0.2);
    background: #b388ff;
}
.timeline-item.timeline-important .timeline-dot {
    background: #ff6f00;
    box-shadow: 0 2px 12px rgba(255, 111, 0, 0.4);
}
.timeline-item.timeline-activity .timeline-dot {
    background: #00c853;
    box-shadow: 0 2px 12px rgba(0, 200, 83, 0.3);
}
.timeline-item.timeline-default .timeline-dot {
    background: #7c4dff;
}

.timeline-content {
    flex: 1;
}
.timeline-date {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.date-main {
    font-weight: 700;
    font-size: 16px;
    color: #1f1a2e;
}
.date-weekday {
    font-size: 12px;
    color: #8c81aa;
    background: #f0ebff;
    padding: 0 10px;
    border-radius: 20px;
    line-height: 20px;
}
.timeline-time {
    font-size: 13px;
    color: #7c6fa0;
    margin: 2px 0 4px;
}
.timeline-title {
    font-size: 15px;
    font-weight: 500;
    color: #2d2a3e;
    line-height: 1.4;
}

.timeline-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed #ddd0ff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: #5a4e7a;
    flex-wrap: wrap;
}
.bell, .heart {
    font-size: 18px;
}

/* ===== Content ===== */
.content {
    flex: 1;
    min-width: 0;
}

.hero-banner {
    background: linear-gradient(145deg, #f5f0ff, #ede7ff);
    padding: 18px 24px;
    border-radius: 60px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    box-shadow: 0 4px 16px rgba(124, 77, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.6);
    flex-wrap: wrap;
}
.hero-banner h1 {
    font-size: 24px;
    font-weight: 700;
    color: #3d3566;
    margin: 0;
}
.sparkle {
    font-size: 26px;
}

/* ===== QA Grid ===== */
.qa-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.qa-card {
    background: white;
    border-radius: 28px;
    padding: 20px 22px 18px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.04);
    border-left: 6px solid #b388ff;
    transition: 0.25s;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.qa-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(124, 77, 255, 0.08);
}
.qa-card:active {
    transform: scale(0.98);
}

.card-purple { border-left-color: #b388ff; }
.card-blue { border-left-color: #82b1ff; }
.card-green { border-left-color: #69db7c; }
.card-orange { border-left-color: #ffb74d; }
.card-pink { border-left-color: #ff8a80; }

.question-sticky {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pin {
    font-size: 18px;
    margin-bottom: 2px;
}
.question-text {
    font-size: 18px;
    font-weight: 700;
    color: #1f1a2e;
    line-height: 1.3;
}
.question-author {
    font-size: 14px;
    color: #7c6fa0;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}
.msg-icon {
    font-size: 16px;
}

.answer-card {
    background: #f8f6ff;
    border-radius: 18px;
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid #ede7ff;
}
.answer-pin {
    font-size: 16px;
    margin-top: 2px;
}
.answer-label {
    font-weight: 700;
    color: #7c4dff;
    font-size: 15px;
}
.answer-text {
    font-size: 15px;
    color: #2d2a3e;
    line-height: 1.6;
}

/* ===== Feature Sections ===== */
.feature-sections {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0 28px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 24px;
    padding: 18px 20px 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}
.feature-title {
    font-size: 17px;
    font-weight: 700;
    color: #3d3566;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.feature-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.feature-list li {
    font-size: 15px;
    color: #3d3566;
    padding: 4px 0;
    border-bottom: 1px solid rgba(124, 77, 255, 0.06);
}
.feature-list li:last-child {
    border-bottom: none;
}

.decoration-row {
    display: flex;
    justify-content: center;
    gap: 24px;
    font-size: 28px;
    opacity: 0.6;
    margin-top: 12px;
    flex-wrap: wrap;
}

/* ===== FAB ===== */
.fab {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: linear-gradient(145deg, #7c4dff, #651fff);
    border: none;
    border-radius: 60px;
    padding: 14px 24px;
    color: white;
    font-weight: 700;
    font-size: 16px;
    font-family: inherit;
    box-shadow: 0 8px 32px rgba(124, 77, 255, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 90;
    transition: 0.2s;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.fab:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(124, 77, 255, 0.5);
}
.fab:active {
    transform: scale(0.94);
}
.fab-icon {
    font-size: 26px;
    font-weight: 300;
    line-height: 1;
}
.fab-text {
    letter-spacing: 0.5px;
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 20, 50, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.modal-content {
    background: white;
    border-radius: 40px;
    padding: 32px 28px 28px;
    max-width: 460px;
    width: 100%;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
    animation: modalPop 0.25s ease;
}
@keyframes modalPop {
    0% { transform: scale(0.92) translateY(20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-content h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #1f1a2e;
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-content input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e8deff;
    border-radius: 30px;
    font-size: 16px;
    font-family: inherit;
    margin-bottom: 16px;
    transition: 0.2s;
    background: #faf8ff;
    outline: none;
}
.modal-content input:focus {
    border-color: #7c4dff;
    background: white;
    box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.12);
}
.btn-submit {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 17px;
}

/* ============================================================ */
/* ===== 移动端适配 ===== */
/* ============================================================ */

@media (max-width: 1024px) {
    .sidebar {
        flex: 0 0 240px;
    }
    .qa-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 820px) {
    .layout {
        flex-direction: column;
        gap: 24px;
    }
    .sidebar {
        flex: 1 1 auto;
        width: 100%;
        position: static;
        order: 2;
    }
    .content {
        order: 1;
        width: 100%;
    }
    .qa-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .feature-sections {
        grid-template-columns: 1fr 1fr;
    }
    .header-inner {
        padding: 0 12px;
    }
    .lab-name {
        font-size: 13px;
        padding: 2px 12px;
    }
    .logo-text {
        font-size: 19px;
    }
    .hero-banner h1 {
        font-size: 20px;
    }
}

@media (max-width: 640px) {
    body {
        padding-bottom: 100px;
    }

    .header {
        padding: 8px 0;
    }
    .header-inner {
        gap: 6px 10px;
        padding: 0 10px;
    }
    .logo-text {
        font-size: 17px;
    }
    .logo-icon {
        font-size: 22px;
    }

    .lab-name {
        display: none;
    }

    .nav {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 8px 16px;
        padding-top: 4px;
        border-top: 1px solid #ede7ff;
    }
    .nav-link {
        font-size: 13px;
        padding: 4px 2px;
    }

    .btn-primary {
        padding: 6px 14px;
        font-size: 13px;
    }

    .main {
        padding: 0 10px 30px;
        margin-top: 8px;
    }

    .qa-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .qa-card {
        padding: 16px 16px 14px;
        border-radius: 22px;
    }
    .question-text {
        font-size: 16px;
    }
    .answer-text {
        font-size: 14px;
    }

    .feature-sections {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .feature-card {
        padding: 14px 16px;
    }

    .hero-banner {
        padding: 12px 18px;
        border-radius: 40px;
        display: flex;
        justify-content: center;
        width: 100%;
    }
    .hero-banner h1 {
        font-size: 18px;
    }
    .sparkle {
        font-size: 20px;
    }

    .timeline-card {
        padding: 18px 14px;
        border-radius: 24px;
    }
    .timeline-header h2 {
        font-size: 17px;
    }
    .timeline-item {
        gap: 10px;
        padding-left: 4px;
    }
    .date-main {
        font-size: 14px;
    }
    .timeline-title {
        font-size: 14px;
    }

    .fab {
        bottom: 20px;
        right: 16px;
        padding: 10px 16px;
        border-radius: 40px;
        font-size: 14px;
        gap: 6px;
    }
    .fab-icon {
        font-size: 22px;
    }
    .fab-text {
        font-size: 13px;
    }

    .modal-content {
        padding: 24px 18px 20px;
        border-radius: 30px;
    }
    .modal-content h3 {
        font-size: 20px;
    }
    .modal-content input {
        font-size: 16px;
        padding: 12px 16px;
    }

    .decoration-row {
        font-size: 22px;
        gap: 14px;
    }

    button,
    .nav-link,
    .btn-primary,
    .fab,
    .qa-card {
        min-height: 44px;
        min-width: 44px;
    }
    .nav-link {
        min-height: 36px;
        display: inline-flex;
        align-items: center;
    }
    .btn-primary {
        min-height: 40px;
    }
}

@media (max-width: 400px) {
    .logo-text {
        font-size: 15px;
    }
    .logo-icon {
        font-size: 20px;
    }
    .nav-link {
        font-size: 12px;
    }
    .hero-banner h1 {
        font-size: 16px;
    }
    .question-text {
        font-size: 15px;
    }
    .btn-primary {
        font-size: 12px;
        padding: 4px 12px;
    }
    .fab {
        padding: 8px 12px;
        font-size: 12px;
        bottom: 16px;
        right: 12px;
    }
    .fab-icon {
        font-size: 18px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .header {
        padding: 4px 0;
    }
    .hero-banner {
        padding: 8px 16px;
        margin-bottom: 16px;
    }
    .hero-banner h1 {
        font-size: 17px;
    }
    .qa-grid {
        grid-template-columns: 1fr 1fr;
    }
    .sidebar {
        order: 2;
    }
}
