/* 侘寂风格样式表 - Wabi-sabi Aesthetics */

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

body {
    font-family: 'Noto Serif SC', serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #ebe8e8 100%);
    color: #333;
    line-height: 1.8;
    font-weight: 400;
    min-height: 100vh;
    padding: 40px 20px;
    perspective: 1000px;
}

/* 新增：首页标题样式 */
.header {
    text-align: center;
    margin-bottom: 60px;
}

.main-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 42px;
    color: #333;
    font-weight: 300;
    letter-spacing: 3px;
    margin-bottom: 20px;
}

.subtitle {
    font-size: 16px;
    color: #888;
    letter-spacing: 2px;
    font-weight: 200;
}

/* 新增：9宫格布局 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

/* 新增：纸片卡片样式 */
.card {
    position: relative;
    width: 100%;
    height: 280px;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    cursor: pointer;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.05));
}

.card:hover {
    transform: rotateY(180deg);
    filter: drop-shadow(0 8px 25px rgba(0, 0, 0, 0.12));
}

.card.clicked {
    transform: scale(1.1) rotateY(180deg);
    z-index: 5;
    transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.card-front {
    background: linear-gradient(135deg, #fafafa 0%, #f2f2f2 100%);
    border: 1px solid rgba(210, 210, 210, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.card-back {
    background: linear-gradient(135deg, #f8f8f8 0%, #eeeeee 100%);
    border: 1px solid rgba(200, 200, 200, 0.3);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    color: #444;
    font-weight: 400;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 20px;
}

.card-description {
    font-size: 15px;
    color: #666;
    text-align: center;
    line-height: 1.8;
    letter-spacing: 0.8px;
    max-width: 200px;
}

/* 新增：详情弹窗样式 */
.detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(245, 245, 245, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.detail-overlay.active {
    opacity: 1;
    visibility: visible;
}

.detail-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 50px;
    transition: transform 0.5s ease;
}

.detail-overlay.active .detail-content {
    transform: translate(-50%, -50%) scale(1);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #333;
}

.detail-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 36px;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: 2px;
}

.content-section {
    margin-bottom: 30px;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    color: #444;
    margin-bottom: 15px;
    letter-spacing: 1px;
    border-bottom: 1px solid #e8e8e8;
    padding-bottom: 8px;
}

.content-item {
    font-size: 16px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 12px;
    padding-left: 20px;
    border-left: 2px solid #e8e8e8;
    letter-spacing: 0.5px;
}

/* 特殊卡片样式 - 灰白色调变化 */
.card:nth-child(1) .card-front { background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%); }
.card:nth-child(1) .card-back { background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%); }

.card:nth-child(2) .card-front { background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%); }
.card:nth-child(2) .card-back { background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%); }

.card:nth-child(3) .card-front { background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%); }
.card:nth-child(3) .card-back { background: linear-gradient(135deg, #eeeeee 0%, #e6e6e6 100%); }

.card:nth-child(4) .card-front { background: linear-gradient(135deg, #f8f8f8 0%, #f2f2f2 100%); }
.card:nth-child(4) .card-back { background: linear-gradient(135deg, #f2f2f2 0%, #eaeaea 100%); }

.card:nth-child(5) .card-front { background: linear-gradient(135deg, #fbfbfb 0%, #f4f4f4 100%); }
.card:nth-child(5) .card-back { background: linear-gradient(135deg, #f4f4f4 0%, #ececec 100%); }

.card:nth-child(6) .card-front { background: linear-gradient(135deg, #f2f2f2 0%, #e8e8e8 100%); }
.card:nth-child(6) .card-back { background: linear-gradient(135deg, #e8e8e8 0%, #e0e0e0 100%); }

.card:nth-child(7) .card-front { background: linear-gradient(135deg, #f9f9f9 0%, #f1f1f1 100%); }
.card:nth-child(7) .card-back { background: linear-gradient(135deg, #f1f1f1 0%, #e9e9e9 100%); }

.card:nth-child(8) .card-front { background: linear-gradient(135deg, #f6f6f6 0%, #ececec 100%); }
.card:nth-child(8) .card-back { background: linear-gradient(135deg, #ececec 0%, #e4e4e4 100%); }

.card:nth-child(9) .card-front { background: linear-gradient(135deg, #fcfcfc 0%, #f3f3f3 100%); }
.card:nth-child(9) .card-back { background: linear-gradient(135deg, #f3f3f3 0%, #ebebeb 100%); }

/* 导航栏 */
#navbar {
    padding: 60px 0 40px;
    text-align: center;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 60px;
}

#navbar span {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 400;
    color: #888;
    cursor: pointer;
    margin: 0 30px;
    display: inline-block;
    transition: color 400ms ease;
    letter-spacing: 0.5px;
}

#navbar span:hover {
    color: #555;
}

#navbar span.active {
    color: #222;
}

/* 内容容器 */
#content {
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: 100px;
    transition: opacity 300ms ease;
}

/* 咔滋页面 */
/* 咔滋页面 - 纯文字版本 */
.kazhi-container.text-only {
    text-align: center;
    position: relative;
    margin: 0;
    padding: 60px 0;
}

.weibo-date {
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px;
    color: #999;
    letter-spacing: 1px;
    margin-bottom: 40px;
}

.kazhi-text {
    font-size: 22px;
    color: #222;
    font-weight: 400;
    letter-spacing: 1.5px;
    line-height: 2;
    margin: 0 auto;
    max-width: 800px;
    padding: 0 40px;
}

/* 咔言咔语页面 */
.say-container {
    padding: 20px 0;
}

.category-section {
    margin-bottom: 40px;
}

.category-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 400;
    color: #333;
    cursor: pointer;
    padding: 15px 0;
    transition: color 300ms ease;
    position: relative;
    letter-spacing: 1px;
}

.category-title:hover {
    color: #333;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 1px;
    background-color: #ccc;
    transition: width 400ms ease;
}

.category-title:hover::after {
    width: 60px;
}

.category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 500ms ease;
}

.category-content.open {
    max-height: 2000px;
    padding: 20px 0;
}

.say-item {
    font-size: 17px;
    color: #444;
    padding: 12px 0;
    margin-left: 20px;
    border-left: 1px solid #e8e8e8;
    padding-left: 30px;
    margin-bottom: 15px;
    line-height: 1.9;
}

/* Deep Cooking页面 */
.cooking-container {
    padding: 20px 0;
}

.philosophy {
    font-size: 19px;
    color: #444;
    line-height: 2;
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e8e8e8;
    font-style: italic;
    letter-spacing: 0.5px;
}

.recipe-category {
    margin-bottom: 50px;
}

.recipe-category-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 400;
    color: #444;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.recipe-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.recipe-item {
    display: flex;
    align-items: center;
    gap: 30px;
}

.recipe-item img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    opacity: 0.9;
}

.recipe-title {
    font-size: 17px;
    color: #444;
    letter-spacing: 0.5px;
}

/* Deep Listening页面 */
.listening-container {
    padding: 20px 0;
}

.playlist-section {
    margin-bottom: 40px;
}

.playlist-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 400;
    color: #333;
    cursor: pointer;
    padding: 15px 0;
    transition: color 300ms ease;
    position: relative;
    letter-spacing: 1px;
}

.playlist-title:hover {
    color: #333;
}

.playlist-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 1px;
    background-color: #ccc;
    transition: width 400ms ease;
}

.playlist-title:hover::after {
    width: 60px;
}

.playlist-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 500ms ease;
}

.playlist-content.open {
    max-height: 2000px;
    padding: 20px 0;
}

.song-list {
    list-style: none;
}

.song-item {
    padding: 25px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    transition: padding-left 400ms ease;
}

.song-item:hover {
    padding-left: 10px;
}

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

.song-title {
    font-size: 18px;
    color: #444;
    letter-spacing: 0.5px;
}

.song-artist {
    font-family: 'Cormorant Garamond', serif;
    font-size: 16px;
    color: #888;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 10px;
    }
    
    .card {
        height: 200px;
    }
    
    .card-face {
        padding: 20px;
    }
    
    .card-title {
        font-size: 22px;
        margin-bottom: 15px;
    }
    
    .card-description {
        font-size: 13px;
    }
    
    .detail-content {
        padding: 30px;
        margin: 20px;
        max-height: 85vh;
    }
    
    .main-title {
        font-size: 28px;
    }

    #navbar {
        padding: 40px 0 30px;
    }
    
    #navbar span {
        font-size: 16px;
        margin: 0 15px;
    }
    
    .kazhi-text {
        font-size: 18px;
    }
    
    .category-title {
        font-size: 20px;
    }
    
    .say-item {
        font-size: 16px;
        margin-left: 10px;
        padding-left: 20px;
    }
    
    .philosophy {
        font-size: 17px;
    }
    
    .recipe-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .recipe-item img {
        width: 100%;
        height: 200px;
    }
    
    .song-item {
        flex-direction: column;
        gap: 8px;
    }
    
    .song-title {
        font-size: 17px;
    }
    
    .song-artist {
        font-size: 15px;
    }
}

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

/* 加载和错误状态 */
.loading {
    text-align: center;
    color: #999;
    font-size: 16px;
    padding: 50px 0;
}

.error {
    text-align: center;
    color: #999;
    font-size: 16px;
    padding: 50px 0;
}