/* Detail page styles */
.detail-header {
    position: absolute;
    top: 20px;
    left: 20px;
    font-family: 'Manrope', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.detail-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: white;
}

.detail-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: white;
}

.detail-description {
    font-family: 'Manrope', sans-serif;
    font-size: 1.2rem;
    font-weight: 300;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

.detail-actions {
    position: absolute;
    top: 20px;
    right: 20px;
}

.detail-download {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    color: white;
}

.detail-download a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.detail-download a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Navigation bar styles - completely custom */
.nav-bar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    width: 100%;
    padding: 16px 40px 16px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.nav-link {
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    transition: all 0.2s ease;
    background: rgba(15, 23, 42, 0.04);
    color: var(--ink);
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.nav-link--primary {
    background: rgba(31, 157, 85, 0.1);
    color: var(--accent);
}

.nav-link--primary:hover {
    background: var(--accent);
    color: #fff;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    gap: 20px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Hero image styles */
.hero-content {
    position: absolute;
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 44px 52px;
    border-radius: 24px;
    background: rgba(12, 18, 28, 0.32);
    box-shadow: 0 28px 60px rgba(10, 16, 26, 0.45);
    backdrop-filter: blur(6px);
    max-width: 1040px;
    color: #fff;
}

.hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: "Playfair Display", serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.hero-title__main {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-title__month {
    font-size: 1.5rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.hero-desc {
    max-width: 860px;
    margin: 0 auto 24px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
}

.hero-brand {
    font-family: "Playfair Display", serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    margin: 0;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .nav-bar {
        padding: 16px 15px;
    }
    
    .nav-content {
        max-width: 100%;
        gap: 10px;
    }
    
    .nav-links {
        gap: 4px;
    }
    
    .nav-link {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .brand-mark {
        font-size: 1.2rem;
    }
    
    .brand-mark__subtitle {
        font-size: 0.65rem;
    }
    
    .nav-links {
        gap: 3px;
    }
    
    .hero-content {
        padding: 24px 20px;
        max-width: 90%;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-title__month {
        font-size: 1.2rem;
    }
    
    .hero-desc {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-actions {
        gap: 4px;
    }
    
    .nav-link {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    /* Hero responsive */
    .hero-content {
        padding: 20px 16px;
        max-width: 95%;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-title__month {
        font-size: 1rem;
    }
    
    .hero-desc {
        font-size: 0.9rem;
    }
    
    .hero-brand {
        font-size: 1.2rem;
    }
}

.brand-mark {
    font-family: "Playfair Display", serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--ink);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    margin-right: 20px;
}

.brand-mark:hover {
    color: var(--accent);
}

.brand-mark__subtitle {
    font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
}

.nav-links a,
.nav-actions a {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-links a {
    background: rgba(15, 23, 42, 0.04);
    color: var(--ink);
}

.nav-links a:hover {
    background: rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.nav-links a.active {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-links a.active:hover {
    background: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.nav-actions a {
    background: rgba(31, 157, 85, 0.1);
    color: var(--accent);
}

.nav-actions a:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-1px);
}

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* Hero image styles */
.bgimg-header .w3-display-middle {
    max-width: 1040px;
    text-align: center;
    padding: 44px 52px;
    border-radius: 24px;
    background: rgba(12, 18, 28, 0.32);
    box-shadow: 0 28px 60px rgba(10, 16, 26, 0.45);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.bgimg-header h1,
.bgimg-header h5 {
    font-family: "Playfair Display", serif;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.bgimg-header h1 {
    font-size: 3.35rem;
    line-height: 1.1;
}

.hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hero-title__main {
    font-size: 3.25rem;
    line-height: 1.05;
}

.hero-title__sub {
    font-size: 1.5rem;
    font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
    letter-spacing: 0.4px;
    color: #d6e2ef;
}

.hero-title__month {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(229, 237, 244, 0.72);
}

.hero-desc {
    text-align: center;
    line-height: 1.55;
}

.hero-desc p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* W3 CSS replacements - essential styles only */
.w3-bar-item {
    padding: 8px 16px;
    float: none !important;
    width: auto;
    border: none;
    display: inline-block;
    outline: 0;
}

.w3-button {
    border: none;
    display: inline-block;
    padding: 8px 16px;
    vertical-align: middle;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background-color: inherit;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
}

.w3-hover-green:hover {
    background-color: #4CAF50 !important;
    color: #fff !important;
}

.w3-hide-small {
    display: none !important;
}

.w3-display-middle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    max-width: 1040px;
    text-align: center;
    padding: 44px 52px;
    border-radius: 24px;
    background: rgba(12, 18, 28, 0.32);
    box-shadow: 0 28px 60px rgba(10, 16, 26, 0.45);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.w3-padding-large {
    padding: 12px 24px !important;
}

.w3-wide {
    letter-spacing: 4px;
}

.w3-text-light-grey {
    color: #f1f1f1 !important;
}

.w3-hide-medium {
    display: none !important;
}

.w3-hide-large {
    display: none !important;
}

.w3-sidebar {
    height: 100%;
    width: 200px;
    background-color: #fff;
    position: fixed !important;
    z-index: 1;
    overflow: auto;
}

.w3-bar-block {
    width: 100%;
}

.w3-card {
    box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16), 0 2px 10px 0 rgba(0,0,0,0.12);
}

.w3-top {
    top: 0;
}

.w3-xlarge {
    font-size: 24px !important;
}

.w3-animate-left {
    position: relative;
    animation: animateleft 0.4s;
}

@keyframes animateleft {
    from {
        left: -300px;
        opacity: 0;
    }
    to {
        left: 0;
        opacity: 1;
    }
}

.w3-margin {
    margin: 16px !important;
}

.w3-container {
    padding: 0.01em 16px;
}

.w3-center {
    text-align: center !important;
}

.w3-padding-48 {
    padding: 48px !important;
}

.w3-large {
    font-size: 18px !important;
}

/* Hero title styles */
.hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hero-title__main {
    font-size: 3.25rem;
    line-height: 1.05;
}

.hero-title__sub {
    font-size: 1.5rem;
    font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
    letter-spacing: 0.4px;
    color: #d6e2ef;
}

.hero-title__month {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(229, 237, 244, 0.72);
}

.hero-desc {
    text-align: center;
    line-height: 1.55;
}

.hero-desc p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Gallery styles */
.main-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.gallery-wrapper {
    background: transparent;
    border-radius: 24px;
    padding: 24px 12px;
    margin: 0 auto 48px;
    max-width: 1200px;
    width: 99%;
    box-sizing: border-box;
}

#img_list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    justify-items: stretch;
    align-items: start;
    width: 100%;
}

.img-card {
    background: transparent;
    padding: 0;
    box-shadow: none;
    border-radius: 24px;
    width: 100%;
    display: block;
    position: relative;
    overflow: visible;
}

.img-card__media {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 26px 42px rgba(12, 20, 36, 0.22);
    background: #0c1524;
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
}

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

.img-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 2px 0;
    font-weight: 600;
    color: #0b1a2a;
}

.img-card__date {
    font-size: 0.8rem;
    line-height: 1.1;
    display: inline-block;
    margin-right: 12px;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.img-card__download {
    font-size: 0.85rem;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #1f9d55;
    text-decoration: none;
    background: #ffffff;
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
    padding: 12px 16px;
    border-radius: 999px;
}

.img-card__download:hover {
    text-decoration: underline;
}

.img-card__description {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    height: auto; /* 自动高度 */
    max-height: 7rem; /* 增加到最大高度约5行 */
    overflow: hidden;
    transition: all 0.3s ease; /* 平滑过渡 */
    position: absolute;
    bottom: 48px; /* 微调位置，让底部与图片底部完美贴合 */
    left: 0;
    right: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.4) 0%,    /* 降低透明度，更透明 */
        rgba(0, 0, 0, 0.35) 30%,   /* 更透明 */
        rgba(0, 0, 0, 0.3) 70%,    /* 更透明 */
        rgba(0, 0, 0, 0.25) 100%   /* 顶部最透明 */
    ); /* 更透明的渐变背景 */
    backdrop-filter: blur(8px); /* 减少模糊，让图片更清晰 */
    opacity: 0;
    transform: translateY(100%); /* 默认完全隐藏在下方 */
    border-radius: 20px; /* 四周都是圆角，与图片完全一致 */
    z-index: 3; /* 在图片之上，但在控制按钮之下 */
    box-shadow: 
        0 -2px 10px rgba(0, 0, 0, 0.2), /* 减少阴影强度 */
        inset 0 1px 0 rgba(255, 255, 255, 0.08); /* 减少内部高光 */
}

.img-card__desc-text {
    font-family: 'Manrope', sans-serif;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #ffffff; /* 白色文字在半透明背景上更清晰 */
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 5; /* 显示5行文字，增加信息量 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease; /* 平滑过渡 */
}

.img-card:hover .img-card__description {
    opacity: 1;
    transform: translateY(0); /* 悬浮时从底部滑入 */
}

/* Responsive */
@media (max-width: 1200px) {
    #img_list {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Dark mode - Simple and clean */
.dark-mode body,
.dark-mode html {
    background: radial-gradient(circle at 12% 12%, #1e293b 0%, #0f172a 40%, #1a1f2e 100%) !important;
    color: #e2e8f0 !important;
}

.dark-mode .gallery-wrapper {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.dark-mode .img-card__meta {
    color: #e2e8f0;
}

.dark-mode .img-card__date {
    opacity: 0.9;
    color: #cbd5e1;
    font-weight: 600;
}

.dark-mode .img-card__download {
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.2);
}

.dark-mode .img-card__description {
    background: rgba(0, 0, 0, 0.8); /* 暗黑模式下更深的背景 */
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.dark-mode .img-card__desc-text {
    color: #ffffff; /* 白色文字 */
    font-weight: 400; /* 稍微加粗提高可读性 */
}

/* Footer styles */
footer {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #0b1a2a !important;
}

footer h4 {
    color: #0b1a2a !important;
}

footer p {
    color: #58708a !important;
}

footer a {
    color: #1f9d55 !important;
}

/* Month panel styles */
.month-title {
    font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #ffffff !important;
    margin: 0 auto 20px;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
    position: relative;
    z-index: 2;
    letter-spacing: 0.4px;
}

.month-panel {
    background: var(--surface);
    border-radius: 24px;
    padding: 24px 12px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    margin: 0 auto 48px;
    position: relative;
    overflow: hidden;
    width: 99%;
    max-width: 1200px;
}

.month-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    font-size: 4.5rem;
    font-weight: 900;
    color: #1f9d55;
    opacity: 0.2;
    z-index: 3;
    pointer-events: none;
    white-space: nowrap;
    letter-spacing: 0.2em;
    text-shadow: none !important;
    width: 100%;
    text-align: center;
}

.month-panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 2;
    box-sizing: border-box;
}

.month-content {
    position: relative;
    z-index: 3;
}

.month-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
    padding: 0;
}

.year-group {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 50px;
    box-sizing: border-box;
}

.year-group:last-child {
    border-bottom: none;
}

.year-header {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    text-align: right !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
    flex-shrink: 0 !important;
    padding-top: 8px !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    display: block !important;
}

.months-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
    align-content: flex-start;
    box-sizing: border-box;
}

.month-link {
    display: inline-block;
    padding: 8px 16px !important;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid transparent;
    color: white !important;
    white-space: nowrap;
    flex-shrink: 0;
    height: 36px !important;
    line-height: 20px !important;
    box-sizing: border-box;
    min-width: 60px !important;
    text-align: center !important;
}

.month-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: #1f9d55 !important;
    background-color: #1f9d55 !important;
}

.month-placeholder {
    opacity: 0.7;
    border: 2px dashed rgba(255, 255, 255, 0.4) !important;
    background: #666666 !important;
    color: #ffffff !important;
    min-width: 60px !important;
    text-align: center !important;
    height: 36px !important;
    line-height: 20px !important;
    padding: 8px 16px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
}

.month-placeholder:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.4) !important;
    opacity: 0.8;
}

/* Dark mode month panel */
.dark-mode .month-title {
    color: #f8fafc !important;
}

.dark-mode .month-panel {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.dark-mode .month-panel-overlay {
    background: rgba(0, 0, 0, 0.6);
}

.dark-mode .year-header {
    color: #f8fafc !important;
}

.dark-mode .month-link:hover {
    border-color: rgba(255, 255, 255, 0.4);
}
.dark-mode footer {
    background: rgba(15, 23, 42, 0.98) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: #f8fafc !important;
}

.dark-mode footer h4 {
    color: #f8fafc !important;
}

.dark-mode footer p {
    color: #cbd5e1 !important;
}

.dark-mode footer a {
    color: #86efac !important;
}
.dark-mode .nav-bar {
    background: rgba(15, 23, 42, 0.98) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.dark-mode .nav-link {
    background: rgba(148, 163, 184, 0.15) !important;
    color: #f8fafc !important;
    font-weight: 600 !important;
}

.dark-mode .nav-link:hover {
    background: rgba(148, 163, 184, 0.25) !important;
    color: #ffffff !important;
}

.dark-mode .nav-link--primary {
    background: rgba(34, 197, 94, 0.25) !important;
    color: #86efac !important;
    font-weight: 600 !important;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.dark-mode .nav-link--primary:hover {
    background: rgba(34, 197, 94, 0.4) !important;
    color: #ffffff !important;
    border: 1px solid rgba(34, 197, 94, 0.5);
}

.dark-mode .nav-links a.active {
    background: rgba(99, 102, 241, 0.8) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    border: 1px solid rgba(99, 102, 241, 0.6);
}

.dark-mode .nav-links a.active:hover {
    background: rgba(99, 102, 241, 0.9) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
}

.dark-mode .brand-mark {
    color: #f8fafc !important;
    font-weight: 700 !important;
}

.dark-mode .brand-mark__subtitle {
    color: #cbd5e1 !important;
    font-weight: 600 !important;
}
