/* ============================================
   壮壮的小窝 - 主样式表
   设计主题：温馨、舒适、个人化
   ============================================ */

/* ---- CSS 变量 ---- */
:root {
    /* 主色调 - 暖橙色系 */
    --color-primary: #FF7B42;
    --color-primary-light: #FF9A56;
    --color-primary-dark: #E8692F;

    /* 辅助色 */
    --color-accent: #FF6B6B;
    --color-accent-light: #FF8E8E;

    /* 背景色 */
    --bg-warm: #FFF8F0;
    --bg-white: #FFFFFF;
    --bg-cream: #FFF5EC;
    --bg-gray: #F8F9FA;

    /* 文字色 */
    --text-dark: #2D3436;
    --text-medium: #636E72;
    --text-light: #B2BEC3;
    --text-white: #FFFFFF;

    /* 渐变 */
    --gradient-warm: linear-gradient(135deg, #FF9A56 0%, #FF6B6B 100%);
    --gradient-soft: linear-gradient(135deg, #FFECD2 0%, #FCB69F 100%);
    --gradient-sky: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
    --gradient-sunset: linear-gradient(135deg, #fa709a 0%, #fee140 100%);

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
    --shadow-warm: 0 4px 20px rgba(255,123,66,0.15);

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* 字体 */
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

    /* 间距 */
    --section-padding: 80px 0;
}

/* ---- 全局重置 ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--bg-warm);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* ---- 导航栏 ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    transition: color 0.3s;
}

.nav-logo:hover {
    color: var(--color-primary);
}

.logo-icon {
    font-size: 26px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 4px;
}

.nav-menu .nav-link {
    display: block;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-medium);
    transition: all 0.3s ease;
}

.nav-menu .nav-link:hover,
.nav-menu .nav-link.active {
    color: var(--color-primary);
    background: rgba(255, 123, 66, 0.08);
}

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

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---- 首页 Hero ---- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 24px 80px;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(255,154,86,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(255,107,107,0.06) 0%, transparent 50%),
        var(--bg-warm);
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 680px;
    z-index: 2;
    animation: fadeInUp 0.8s ease-out;
}

.hero-avatar {
    margin-bottom: 28px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-title {
    font-size: 40px;
    font-weight: 400;
    color: var(--text-medium);
    margin-bottom: 12px;
    line-height: 1.4;
}

.hero-title strong {
    color: var(--color-primary);
    font-weight: 700;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-medium);
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.hero-desc {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 36px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--gradient-warm);
    color: var(--text-white);
    box-shadow: var(--shadow-warm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(255,123,66,0.25);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary-light);
}

.btn-outline:hover {
    background: rgba(255,123,66,0.06);
    transform: translateY(-2px);
}

/* 浮动装饰 */
.hero-decoration .float-icon {
    position: absolute;
    font-size: 32px;
    opacity: 0.3;
    animation: floatAround 6s ease-in-out infinite;
}

.float-icon.i1 { top: 15%; left: 10%; animation-delay: 0s; }
.float-icon.i2 { top: 20%; right: 12%; animation-delay: 1.5s; }
.float-icon.i3 { bottom: 25%; left: 8%; animation-delay: 3s; }
.float-icon.i4 { bottom: 20%; right: 10%; animation-delay: 4.5s; }
.float-icon.i5 { top: 50%; right: 5%; animation-delay: 2s; }

@keyframes floatAround {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(10deg); }
    66% { transform: translateY(10px) rotate(-10deg); }
}

/* ---- 通用章节样式 ---- */
.section-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--section-padding);
    padding-left: 24px;
    padding-right: 24px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.title-icon {
    font-size: 34px;
}

.section-desc {
    text-align: center;
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 48px;
}

/* ---- 摄影作品 ---- */
.gallery-section {
    background: var(--bg-white);
}

.gallery-filter {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 24px;
    border-radius: 50px;
    border: 1.5px solid #E0E0E0;
    background: transparent;
    color: var(--text-medium);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
}

.filter-btn:hover {
    border-color: var(--color-primary-light);
    color: var(--color-primary);
}

.filter-btn.active {
    background: var(--gradient-warm);
    color: var(--text-white);
    border-color: transparent;
    box-shadow: var(--shadow-warm);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    animation: fadeInUp 0.6s ease-out;
}

.gallery-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-placeholder {
    font-size: 56px;
    transition: transform 0.4s ease;
}

.gallery-card:hover .card-placeholder {
    transform: scale(1.15);
}

.card-label {
    margin-top: 10px;
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.card-info {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.card-tag {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 50px;
    background: var(--bg-cream);
    color: var(--color-primary);
    font-weight: 500;
}

/* ---- 日记 ---- */
.diary-section {
    background: var(--bg-warm);
}

.diary-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.diary-item {
    display: flex;
    gap: 24px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

.diary-item:hover {
    transform: translateX(6px);
    box-shadow: var(--shadow-md);
}

.diary-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 60px;
    padding-top: 4px;
}

.date-day {
    font-size: 36px;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
}

.date-month {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
    white-space: nowrap;
}

.diary-content {
    flex: 1;
}

.diary-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.diary-excerpt {
    font-size: 15px;
    color: var(--text-medium);
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.diary-meta {
    display: flex;
    gap: 16px;
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-light);
}

/* ---- 关于我 ---- */
.about-section {
    background: var(--bg-white);
}

.about-content {
    max-width: 680px;
    margin: 0 auto;
}

.about-card {
    text-align: center;
    background: var(--bg-warm);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.8s ease-out;
}

.about-avatar {
    margin-bottom: 20px;
    display: inline-block;
}

.about-card h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.about-tagline {
    color: var(--color-primary);
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 24px;
}

.about-text {
    text-align: left;
    color: var(--text-medium);
    font-size: 15px;
    line-height: 2;
    margin-bottom: 28px;
}

.about-text p {
    margin-bottom: 12px;
}

.about-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.interest-tag {
    padding: 8px 18px;
    border-radius: 50px;
    background: var(--bg-white);
    font-size: 14px;
    color: var(--text-medium);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.interest-tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--color-primary);
}

/* ---- 页脚 ---- */
.footer {
    background: var(--text-dark);
    color: var(--text-white);
    padding: 48px 24px 32px;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.footer-logo {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.footer-brand p {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--color-primary-light);
}

.footer-copy {
    color: rgba(255,255,255,0.35);
    font-size: 13px;
    line-height: 1.8;
}

.footer-beian a {
    color: rgba(255,255,255,0.35);
    transition: color 0.3s;
}

.footer-beian a:hover {
    color: var(--color-primary-light);
}

/* ---- 动画 ---- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- 响应式 ---- */
@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 320px;
        height: 100vh;
        background: var(--bg-white);
        flex-direction: column;
        padding: 80px 32px 32px;
        gap: 8px;
        box-shadow: var(--shadow-lg);
        transition: right 0.4s ease;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu .nav-link {
        padding: 12px 20px;
        font-size: 17px;
    }

    .hero-title {
        font-size: 30px;
    }

    .hero-title strong {
        display: block;
    }

    .section-title {
        font-size: 26px;
    }

    .diary-item {
        flex-direction: column;
        gap: 12px;
    }

    .diary-date {
        flex-direction: row;
        align-items: baseline;
        gap: 8px;
    }

    .date-day {
        font-size: 24px;
    }

    .about-card {
        padding: 32px 24px;
    }
}

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-title {
        font-size: 26px;
    }

    .section-title {
        font-size: 22px;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
}
