/* 幸福四合院 - 温馨可爱风格 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --warm-orange: #FF9A56;
    --soft-pink: #FFB6C1;
    --cream: #FFF8E7;
    --warm-yellow: #FFD93D;
    --soft-green: #A8D5BA;
    --warm-brown: #8B6F5C;
    --light-cream: #FFFBF0;
    --coral: #FF7F6B;
    --lavender: #D4B5E0;
    --text-dark: #5C4033;
    --text-light: #8B7355;
    --shadow-warm: rgba(255, 154, 86, 0.15);
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    background: var(--light-cream);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== 登录页样式 ===== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FFE4C4 0%, #FFDAB9 50%, #FFE4E1 100%);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: "🏠";
    position: absolute;
    font-size: 200px;
    opacity: 0.05;
    top: 10%;
    left: 10%;
    animation: float 6s ease-in-out infinite;
}

.login-wrapper::after {
    content: "💕";
    position: absolute;
    font-size: 150px;
    opacity: 0.05;
    bottom: 15%;
    right: 10%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 50px 45px;
    box-shadow: 0 20px 60px var(--shadow-warm), 0 0 0 1px rgba(255, 154, 86, 0.1);
    text-align: center;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-card .logo {
    font-size: 64px;
    margin-bottom: 10px;
    animation: bounce 2s ease-in-out infinite;
}

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

.login-card h1 {
    font-size: 32px;
    color: var(--warm-brown);
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 2px;
}

.login-card .subtitle {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 35px;
    letter-spacing: 1px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid #FFE4C4;
    border-radius: 16px;
    font-size: 15px;
    background: var(--cream);
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
}

.input-group input:focus {
    border-color: var(--warm-orange);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 154, 86, 0.1);
}

.input-group .icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--warm-orange), var(--coral));
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 4px;
    box-shadow: 0 6px 20px rgba(255, 127, 107, 0.35);
    margin-top: 10px;
    font-family: inherit;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 127, 107, 0.45);
}

.login-btn:active {
    transform: translateY(0);
}

.error-msg {
    color: var(--coral);
    font-size: 13px;
    margin-top: 12px;
    min-height: 18px;
    transition: opacity 0.3s;
}

.login-tip {
    margin-top: 25px;
    font-size: 12px;
    color: var(--text-light);
    opacity: 0.7;
}

/* ===== 通用导航栏 ===== */
.navbar {
    background: linear-gradient(135deg, var(--warm-orange), var(--coral));
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px var(--shadow-warm);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    text-decoration: none;
}

.nav-logo .logo-icon {
    font-size: 28px;
}

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

.nav-menu a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.nav-user .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
    font-family: inherit;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* ===== 主内容区 ===== */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 24px 60px;
}

/* ===== 页面标题 ===== */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #FFF5E6 0%, #FFE4E1 100%);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 217, 61, 0.2) 0%, transparent 70%);
    top: -50px;
    right: -50px;
    border-radius: 50%;
}

.page-header h2 {
    font-size: 28px;
    color: var(--warm-brown);
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.page-header p {
    color: var(--text-light);
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.page-header .header-icon {
    font-size: 48px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

/* ===== 首页横幅 ===== */
.hero-banner {
    background: linear-gradient(135deg, #FFE4C4 0%, #FFDAB9 50%, #FFE4E1 100%);
    border-radius: 24px;
    padding: 50px 40px;
    margin-bottom: 35px;
    position: relative;
    overflow: hidden;
}

.hero-banner .hero-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
}

.hero-banner h1 {
    font-size: 36px;
    color: var(--warm-brown);
    margin-bottom: 12px;
    font-weight: 600;
}

.hero-banner .greeting {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.hero-banner .date-info {
    font-size: 14px;
    color: var(--coral);
    background: rgba(255, 255, 255, 0.6);
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.hero-banner .hero-desc {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 15px;
}

.hero-banner .decoration {
    position: absolute;
    font-size: 120px;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.15;
    z-index: 1;
}

/* ===== 卡片网格 ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.feature-card {
    background: white;
    border-radius: 20px;
    padding: 30px 24px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-warm);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(255, 154, 86, 0.25);
    border-color: var(--warm-orange);
}

.feature-card .card-icon {
    font-size: 56px;
    margin-bottom: 16px;
    display: block;
}

.feature-card h3 {
    font-size: 18px;
    color: var(--warm-brown);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== 时光轴 ===== */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--warm-orange), var(--soft-pink));
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 15px var(--shadow-warm);
    transition: all 0.3s;
}

.timeline-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(255, 154, 86, 0.2);
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -32px;
    top: 28px;
    width: 14px;
    height: 14px;
    background: var(--warm-orange);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--warm-orange);
}

.timeline-date {
    font-size: 13px;
    color: var(--coral);
    font-weight: 600;
    margin-bottom: 8px;
}

.timeline-title {
    font-size: 17px;
    color: var(--warm-brown);
    margin-bottom: 8px;
}

.timeline-content {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
}

.timeline-tag {
    display: inline-block;
    background: var(--cream);
    color: var(--warm-orange);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    margin-top: 10px;
    margin-right: 6px;
}

/* ===== 照片墙 ===== */
.photo-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.photo-item {
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
}

.photo-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.photo-item .photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    color: white;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.3s;
}

.photo-item:hover .photo-caption {
    opacity: 1;
}

/* 不同颜色的照片占位 */
.photo-1 { background: linear-gradient(135deg, #FFE4E1, #FFB6C1); }
.photo-2 { background: linear-gradient(135deg, #E8F5E9, #A8D5BA); }
.photo-3 { background: linear-gradient(135deg, #FFF8E1, #FFD93D); }
.photo-4 { background: linear-gradient(135deg, #E3F2FD, #90CAF9); }
.photo-5 { background: linear-gradient(135deg, #F3E5F5, #D4B5E0); }
.photo-6 { background: linear-gradient(135deg, #FFE0B2, #FF9A56); }
.photo-7 { background: linear-gradient(135deg, #FCE4EC, #F48FB1); }
.photo-8 { background: linear-gradient(135deg, #E0F7FA, #80DEEA); }

/* ===== 留言板 ===== */
.message-form {
    background: white;
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px var(--shadow-warm);
}

.message-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 14px 16px;
    border: 2px solid #FFE4C4;
    border-radius: 12px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    background: var(--cream);
    transition: all 0.3s;
    outline: none;
}

.message-form textarea:focus {
    border-color: var(--warm-orange);
    background: white;
}

.message-form .form-row {
    display: flex;
    gap: 16px;
    margin-top: 14px;
    align-items: center;
}

.message-form select {
    padding: 10px 14px;
    border: 2px solid #FFE4C4;
    border-radius: 10px;
    background: var(--cream);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-dark);
    outline: none;
    cursor: pointer;
}

.submit-btn {
    background: linear-gradient(135deg, var(--warm-orange), var(--coral));
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    margin-left: auto;
    font-family: inherit;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 127, 107, 0.4);
}

.message-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message-card {
    background: white;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 4px 15px var(--shadow-warm);
    display: flex;
    gap: 16px;
    transition: all 0.3s;
}

.message-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 154, 86, 0.2);
}

.message-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.avatar-dad { background: #E3F2FD; }
.avatar-mom { background: #FCE4EC; }
.avatar-brother { background: #E8F5E9; }
.avatar-sister { background: #FFF3E0; }

.message-body {
    flex: 1;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.message-author {
    font-weight: 600;
    color: var(--warm-brown);
    font-size: 15px;
}

.message-time {
    font-size: 12px;
    color: var(--text-light);
}

.message-text {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
}

/* ===== 美食卡片 ===== */
.food-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow-warm);
    transition: all 0.3s;
}

.food-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 154, 86, 0.2);
}

.food-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 70px;
}

.food-info {
    padding: 20px;
}

.food-name {
    font-size: 17px;
    color: var(--warm-brown);
    margin-bottom: 6px;
    font-weight: 600;
}

.food-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.food-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.food-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== 旅行卡片 ===== */
.travel-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow-warm);
    transition: all 0.3s;
}

.travel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 154, 86, 0.2);
}

.travel-banner {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    position: relative;
}

.travel-banner .travel-date-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--warm-brown);
    font-weight: 600;
}

.travel-info {
    padding: 20px;
}

.travel-title {
    font-size: 17px;
    color: var(--warm-brown);
    margin-bottom: 8px;
    font-weight: 600;
}

.travel-location {
    font-size: 13px;
    color: var(--coral);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.travel-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== 节日卡片 ===== */
.festival-card {
    background: white;
    border-radius: 20px;
    padding: 28px;
    text-align: center;
    box-shadow: 0 4px 15px var(--shadow-warm);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.festival-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 154, 86, 0.2);
}

.festival-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 217, 61, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.festival-card:hover::before {
    opacity: 1;
}

.festival-icon {
    font-size: 56px;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.festival-name {
    font-size: 18px;
    color: var(--warm-brown);
    margin-bottom: 6px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.festival-date {
    font-size: 13px;
    color: var(--coral);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.festival-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* ===== 统计卡片 ===== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 35px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 22px;
    text-align: center;
    box-shadow: 0 4px 15px var(--shadow-warm);
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--warm-orange), var(--coral));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-light);
}

/* ===== 底部 ===== */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-light);
    font-size: 13px;
    opacity: 0.7;
}

.footer .heart {
    color: var(--coral);
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        padding: 8px 12px;
        gap: 6px;
    }

    .nav-logo {
        font-size: 16px;
    }

    .nav-menu {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 4px;
    }

    .nav-menu a {
        padding: 4px 8px;
        font-size: 11px;
    }

    .nav-user {
        margin-left: auto;
    }

    .nav-user .avatar {
        display: none;
    }

    .logout-btn {
        padding: 4px 10px;
        font-size: 11px;
    }

    .hero-banner {
        padding: 35px 24px;
    }

    .hero-banner h1 {
        font-size: 26px;
    }

    .hero-banner .decoration {
        font-size: 80px;
        right: 20px;
    }

    .page-header h2 {
        font-size: 22px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .photo-wall {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-container {
        padding: 20px 16px 40px;
    }

    .login-card {
        padding: 35px 25px;
        margin: 20px;
    }
}

/* ===== 加载动画 ===== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
