/* 自定义样式 (莫奈绿主题) */
body {
    font-family: 'Inter', 'Noto Sans SC', sans-serif;
    background-color: #F8FBF8; 
    background-image: radial-gradient(circle at 1px 1px, #EAF2EA 1px, transparent 0);
    background-size: 25px 25px;
    transition: background-color 0.5s ease;
    margin: 0;
    padding: 0;
}

.card {
    background-color: rgba(240, 245, 238, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(219, 234, 213, 0.6);
    position: relative;
    animation: fadeInUp 0.8s ease-out;
}

h1 {
    color: #333D32;
}

p {
    color: #5C6B5B;
}

h2 {
    border-left: 4px solid #A3C1AD;
    padding-left: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: #333D32;
}

/* 特别为"如何找到我"板块调整间距 */
section:last-of-type h2 {
    margin-bottom: 1.25rem;
}

/* 确保社交按钮容器有适当的上边距 */
section:last-of-type .flex {
    margin-top: 0.5rem;
}

.passionate-green {
    color: #4A7856;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(74, 120, 86, 0.3);
    animation: pulse-green 3s infinite ease-in-out;
}

.sad-text {
    color: #8A9A89;
    font-style: italic;
}

/* --- 社交图标新样式 --- */
.social-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: #EAF2EA;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.social-button:hover::before {
    left: 100%;
}

.social-button svg {
    width: 24px;
    height: 24px;
    color: #4A7856;
    z-index: 1;
}

.qq-icon-fix svg {
    width: 34px;
    height: 34px;
}

.email-icon-fix svg {
     width: 40px;
     height: 40px;
}

.social-button:hover {
    background-color: #DCE7DA;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* --- 信息图标和弹窗样式 --- */
.info-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(219, 234, 213, 0.7);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.info-button:hover {
    background-color: #A3C1AD;
    transform: scale(1.1) rotate(15deg);
}

.info-button svg {
    width: 20px;
    height: 20px;
    color: #4A7856;
}

.modal {
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-content {
    transition: transform 0.3s ease;
    transform: scale(0.9);
}

.modal:not(.opacity-0) .modal-content {
    transform: scale(1);
}

#profile-pic {
    cursor: pointer;
    object-fit: cover;
    transition: all 0.3s ease;
    position: relative;
}

#profile-pic:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#profile-pic:active {
    transform: scale(0.95) rotate(-2deg);
    transition: transform 0.1s ease;
}

/* --- 点击反馈动画 --- */
@keyframes clickPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(74, 120, 86, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(74, 120, 86, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(74, 120, 86, 0);
    }
}

.click-pulse {
    animation: clickPulse 0.6s ease-out;
}

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

@keyframes pulse-green {
    0% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.03); opacity: 1; }
    100% { transform: scale(1); opacity: 0.9; }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- 页面切换动画 --- */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100px);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- 页面切换过渡类 --- */
.page-transition-out {
    animation: fadeOut 0.3s ease-in-out forwards;
}

.page-transition-in {
    animation: fadeInScale 0.4s ease-out forwards;
}

.page-slide-out {
    animation: slideOutLeft 0.3s ease-in-out forwards;
}

.page-slide-in {
    animation: slideInRight 0.4s ease-out forwards;
}

.page-slide-out-right {
    animation: slideOutRight 0.3s ease-in forwards;
}

.page-slide-in-left {
    animation: slideInLeft 0.4s ease-out forwards;
}

.page-slide-prepare-left {
    opacity: 0;
    transform: translateX(-100px);
}

/* --- 动态感叹号样式 --- */
#dynamic-exclamations {
    word-break: break-all;
    overflow-wrap: break-word;
}

/* --- 响应式优化 --- */
@media (max-width: 640px) {
    .card {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .social-button {
        width: 44px;
        height: 44px;
    }
    
    .info-button {
        width: 28px;
        height: 28px;
        top: 0.5rem;
        right: 0.5rem;
    }
    
    /* 移动端文本优化 */
    p {
        word-break: break-word;
        overflow-wrap: break-word;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .card {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}

/* --- 深色模式支持 --- */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1f1a;
        background-image: radial-gradient(circle at 1px 1px, #2a3a2a 1px, transparent 0);
    }
    
    .card {
        background-color: rgba(30, 40, 30, 0.85);
        border: 1px solid rgba(60, 80, 60, 0.6);
    }
    
    h1, h2 {
        color: #e0f0e0;
    }
    
    p {
        color: #b0c0b0;
    }
}

/* --- 彩蛋页面样式 --- */
.ads-page {
    background: linear-gradient(135deg, #f0f8f0 0%, #e8f5e8 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ads-content {
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

.back-button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 120, 86, 0.3);
}

.back-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.back-button:hover::before {
    left: 100%;
}

/* --- 加载动画 --- */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4A7856;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- 页面隐藏样式 --- */
.hidden {
    display: none;
}

/* --- 防止页面闪现 --- */
#qq-page, #email-page {
    opacity: 0;
    transition: opacity 0.1s ease;
}

#qq-page:not(.hidden), #email-page:not(.hidden) {
    opacity: 1;
}