html,
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: black;
    overflow-x: hidden;
}

.starfield-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

header,
.hero,
.content {
    position: relative;
    z-index: 1;
}


/* 精选光影 - 横向滚动 */

.featured-photos-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 1100px;
    margin: 0 auto;
    scroll-behavior: smooth;
    width: 100%;
}

.photos-scroll-wrapper {
    --photos-cols: 5;
    --photos-col-gap: 12px;
    /* 在 400~900 之间平滑变化，避免断点附近行距跳变 */
    --photos-row-gap: clamp(36px, calc(36px + (100vw - 400px) * 0.12), 140px);
    --photos-padding: 16px;
    --photo-size: calc((100% - (var(--photos-padding) * 2) - (var(--photos-col-gap) * (var(--photos-cols) - 1))) / var(--photos-cols));
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: var(--photo-size);
    grid-template-rows: repeat(2, var(--photo-size));
    column-gap: var(--photos-col-gap);
    row-gap: var(--photos-row-gap);
    padding: var(--photos-padding);
    justify-content: center;
}

@media (max-width: 900px) {
    .photos-scroll-wrapper {
        --photos-cols: 4;
    }
}

@media (max-width: 700px) {
    .photos-scroll-wrapper {
        --photos-cols: 3;
    }
}

@media (max-width: 400px) {
    .photos-scroll-wrapper {
        --photos-cols: 2;
        --photos-padding: 12px;
        --photos-col-gap: 10px;
    }
}

.featured-photos-scroll::-webkit-scrollbar {
    height: 6px;
}

.featured-photos-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.featured-photos-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 165, 0, 0.4);
    border-radius: 3px;
}

.featured-photos-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 165, 0, 0.6);
}

.photo-item {
    width: 100%;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.photo-item:hover {
    border-color: rgba(255, 165, 0, 0.5);
    background: rgba(255, 165, 0, 0.05);
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 165, 0, 0.2);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.1);
}

.photo-comment {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
    padding: 12px 8px 8px;
    font-size: 11px;
    line-height: 1.3;
    max-height: 35px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.hero h1 {
    color: white;
    font-size: 48px;
}


/* 内容区 */

.content {
    padding: 100px;
    color: white;
}

.daily-record-container {
    max-width: 900px;
    margin: 80px auto 40px;
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-top: 25px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid #007bff;
}

.date-display {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-warning {
    background: #ffc107;
    color: black;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.input-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    min-height: 120px;
    resize: vertical;
    box-sizing: border-box;
}

.keywords-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.keyword-tag {
    background: #e7f3ff;
    border: 1px solid #007bff;
    color: #007bff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.keyword-tag button {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    padding: 0;
}

.todo-list {
    list-style: none;
    padding: 0;
}

.todo-item {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    margin-bottom: 10px;
    border-radius: 5px;
    align-items: center;
}

.todo-item.completed {
    opacity: 0.6;
    border-left-color: #28a745;
}

.todo-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.todo-item .todo-text {
    flex: 1;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.btn-remove:hover {
    background: #c82333;
}

.tomorrow-list {
    list-style: none;
    padding: 0;
}

.tomorrow-item {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: #f0f9ff;
    border-left: 4px solid #17a2b8;
    margin-bottom: 10px;
    border-radius: 5px;
    align-items: center;
}

.tomorrow-item .tomorrow-text {
    flex: 1;
}

.tomorrow-item .btn-remove {
    background: #dc3545;
}

.export-btn {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.stats-panel {
    background: #f0f9ff;
    border-left: 4px solid #17a2b8;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
}

.stat-item {
    font-size: 16px;
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
}

.stat-label {
    font-weight: bold;
    color: #333;
}

.stat-value {
    color: #17a2b8;
    font-weight: bold;
}

.ai-suggestions {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
    font-size: 14px;
}

.ai-suggestions h4 {
    margin: 0 0 10px 0;
    color: #856404;
}

.ai-suggestions-list {
    list-style: none;
    padding: 0;
}

.ai-suggestions-list li {
    padding: 8px 0;
    color: #856404;
}

.ai-suggestions-list li:before {
    content: "💡 ";
    margin-right: 8px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
}


/* 热图样式 */

.heatmap {
    display: flex;
    gap: 4px;
    justify-content: center;
    padding: 18px;
    overflow-x: auto;
}

.heat-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.heat-cell {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: #111;
}

.heat-cell.level-0 {
    background: #0b0b0b;
}

.heat-cell.level-1 {
    background: #2f8f45;
}

.heat-cell.level-2 {
    background: #2b6f35;
}

.heat-cell.level-3 {
    background: #1f4f25;
}

.heat-cell.level-4 {
    background: #113713;
}

.heat-legend {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    color: white;
}

.legend-blocks {
    display: flex;
    gap: 6px;
    align-items: center;
}

.legend-cell {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-cell.level-0 {
    background: #0b0b0b
}

.legend-cell.level-1 {
    background: #2f8f45
}

.legend-cell.level-2 {
    background: #2b6f35
}

.legend-cell.level-3 {
    background: #1f4f25
}

.legend-cell.level-4 {
    background: #113713
}


/* 妙笔生花 - 文章卡片网格 */

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.article-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.article-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.bili-preview-shell {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.8), rgba(30, 41, 59, 0.8));
}

.bili-preview-cover {
    position: absolute;
    inset: 0;
    opacity: 0;
    background-color: rgba(0, 0, 0, 0.35);
    background-size: cover;
    background-position: center;
    transition: opacity 0.25s ease, transform 0.3s ease;
}

.article-card.has-cover .bili-preview-cover {
    opacity: 1;
}

.bili-preview-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    text-align: center;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.bili-preview-title {
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    line-height: 1.35;
}

.bili-preview-hint {
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    letter-spacing: 0.2px;
}

.bili-preview-player {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.25s ease;
    background: #000;
}

.bili-preview-player iframe {
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

.article-card.is-previewing .bili-preview-placeholder {
    opacity: 0;
    transform: scale(1.03);
}

.article-card.is-previewing .bili-preview-cover {
    opacity: 0;
}

.article-card.is-previewing .bili-preview-player {
    opacity: 1;
}

.article-card:hover .bili-preview-cover {
    transform: scale(1.05);
}

.bili-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 4px 8px;
    font-size: 11px;
    line-height: 1;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.article-content {
    padding: 20px;
    color: white;
}

.article-content h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #fff;
    line-height: 1.3;
}

.article-content p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    min-height: 42px;
}

.article-comment {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 12px;
    margin-top: 12px;
}


/* 曲苑天地 - 常听歌表格 */

.music-board-wrap {
    max-width: 980px;
    margin: 0 auto;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
}

.music-board-desc {
    margin: 0 0 14px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.5;
}

.music-table-scroll {
    width: 100%;
    overflow-x: auto;
}

.music-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.music-table th,
.music-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 12px 10px;
    text-align: left;
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
}

.music-table th {
    color: rgba(255, 255, 255, 0.96);
    font-weight: 600;
}

.music-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.music-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 165, 0, 0.45);
    color: rgba(255, 165, 0, 0.95);
    text-decoration: none;
    font-size: 12px;
    transition: all 0.25s ease;
}

.music-link-btn:hover {
    background: rgba(255, 165, 0, 0.12);
    border-color: rgba(255, 165, 0, 0.75);
}

.music-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}


/* 更新日志 - 时间线样式 */

.changelog-timeline {
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.timeline {
    position: relative;
    padding: 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 165, 0, 0.8), rgba(255, 165, 0, 0.2));
}

.timeline-item {
    margin-bottom: 40px;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #ffa500, #ff8c00);
    border: 3px solid #000;
    border-radius: 50%;
    z-index: 10;
    top: 5px;
}

.timeline-content {
    width: calc(50% - 45px);
    background: rgba(255, 165, 0, 0.08);
    border: 1px solid rgba(255, 165, 0, 0.2);
    border-radius: 8px;
    padding: 20px;
    color: white;
}

.timeline-date {
    font-size: 14px;
    color: rgba(255, 165, 0, 0.8);
    font-weight: bold;
    margin-bottom: 8px;
}

.timeline-title {
    font-size: 16px;
    color: #fff;
    font-weight: bold;
    margin-bottom: 8px;
}

.timeline-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}


/* 响应式布局 */

@media (max-width: 768px) {
    .content {
        padding: 80px 16px 40px 16px;
    }
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 8px;
    }
    .article-content {
        padding: 12px;
    }
    .article-content h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    .article-content p {
        font-size: 12px;
        margin-bottom: 8px;
        min-height: 32px;
    }
    .article-comment {
        font-size: 10px;
        padding-top: 8px;
        margin-top: 8px;
    }
    .timeline::before {
        left: 8px;
    }
    .timeline-item,
    .timeline-item:nth-child(even) {
        flex-direction: column;
    }
    .timeline-marker {
        left: 8px;
    }
    .timeline-content {
        width: 100%;
        margin-left: 30px;
    }
    .music-board-wrap {
        padding: 10px;
        border-radius: 10px;
    }
    .music-board-desc {
        font-size: 12px;
        margin-bottom: 10px;
    }
    .music-table th,
    .music-table td {
        font-size: 12px;
        padding: 10px 8px;
    }
}
