/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}

:root {
    --primary-color: #333;
    --accent-color: #000000;
    --bg-color: #ffffff;
    --text-color: #333;
    --secondary-text: #666;
    --light-text: #999;
    --transition: all 0.3s ease;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --card-border: 1px solid #f0f0f0;
    --section-spacing: 30px;
    --element-spacing: 15px;
    --border-radius: 12px;
    --small-radius: 8px;
}

html, body {
    background-color: #f8f9fa;
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 10px 15px;
}

/* 卡片动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes cardPopIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes cardPopOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

/* 头部样式 */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    position: relative;
    text-align: center;
    margin-bottom: var(--section-spacing);
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    width: 100%;
    animation: fadeIn 0.5s ease-out forwards;
}

/* 移动端优化的顶部控制栏 */
.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 15px 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #f5f5f5;
}

.language-switch {
    position: relative;
    font-size: 13px;
    z-index: 10;
}

.weather-section {
    font-size: 12px;
    color: var(--light-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.weather {
    display: flex;
    align-items: center;
}

.weather-icon {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    flex-shrink: 0;
}

.info-button {
    background-color: #f5f5f5;
    border: none;
    color: var(--secondary-text);
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    z-index: 1;
}

.info-button span {
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.info-button:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: 0;
    pointer-events: none;
}

.info-button:hover {
    background-color: #eee;
    color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.info-button:active {
    transform: scale(0.96);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.info-button:active:before {
    width: 150px;
    height: 150px;
    opacity: 1;
    transition: width 0.6s ease, height 0.6s ease;
}

/* 添加图标到按钮 */
.info-button::after {
    content: "\f05a";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-left: 5px;
    font-size: 11px;
    opacity: 0.6;
}

.temperature {
    font-weight: bold;
    color: var(--text-color);
}

.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 20px;
    position: relative;
    margin-top: -40px;
    z-index: 2;
}

.profile-image {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: var(--element-spacing);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 3px solid white;
    position: relative;
    z-index: 3;
    background-color: white;
}

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

.name-wrapper {
    position: relative;
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
}

.name {
    font-size: 24px;
    font-weight: bold;
    display: inline-block;
    margin: 0;
    position: relative;
    text-align: center;
}

.info-pill {
    display: none;
}

.exclamation-icon {
    display: none;
}

.info-pill:hover {
    background-color: #eaeaea;
    color: var(--accent-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: var(--element-spacing);
}

.tag {
    background-color: #f5f5f5;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    color: var(--secondary-text);
    transition: var(--transition);
}

.tag:hover {
    background-color: #e8e8e8;
}

.personal-metrics {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 10px 0;
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.metric-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--accent-color);
    line-height: 1.2;
}

.metric-unit {
    font-size: 12px;
    color: var(--secondary-text);
    font-weight: normal;
    margin-left: 1px;
}

.metric-label {
    font-size: 12px;
    color: var(--secondary-text);
    margin-top: 2px;
}

.months-age {
    font-size: 10px;
    color: var(--light-text);
    margin-left: 2px;
}

.contact-info {
    margin: 5px 0;
    font-size: 12px;
    color: var(--secondary-text);
    padding: 3px 0;
    display: inline-block;
    position: relative;
}

.contact-info p {
    margin: 0;
    display: inline-block;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 2px;
}

/* 内容部分 */
.content-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--section-spacing);
    max-width: 100%;
    margin: 0 auto;
}

/* 社交媒体部分 */
.social-media {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 20px;
    margin-bottom: var(--element-spacing);
    width: 100%;
    animation: fadeIn 0.5s ease-out forwards;
}

.social-media h2 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    text-align: center;
    padding-bottom: 10px;
}

.social-media h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.social-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    animation: fadeIn 0.5s ease-out forwards 0.2s;
}

.social-card {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: var(--small-radius);
    background-color: #f9f9f9;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    animation: fadeIn 0.5s ease-out forwards;
}

.social-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    background-color: white;
}

.social-card i {
    font-size: 18px;
    margin-right: 10px;
    color: var(--accent-color);
}

.social-info h3 {
    font-size: 14px;
    margin-bottom: 2px;
}

.social-info p {
    color: var(--secondary-text);
    font-size: 12px;
}

/* 相册部分 */
.gallery {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 20px;
    margin-bottom: var(--element-spacing);
    width: 100%;
    animation: fadeIn 0.5s ease-out forwards;
}

.gallery h2 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    text-align: center;
    padding-bottom: 10px;
}

.gallery h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.moment-stats {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: var(--secondary-text);
}

.moments-container {
    animation: fadeIn 0.6s ease-out forwards;
}

/* 我的故事部分 */
.my-story {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 20px;
    margin-bottom: var(--section-spacing);
    width: 100%;
    animation: fadeIn 0.5s ease-out forwards;
}

.my-story h2 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    text-align: center;
    padding-bottom: 10px;
}

.my-story h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    gap: 8px;
    flex-wrap: wrap;
}

.tab {
    padding: 6px 12px;
    cursor: pointer;
    background-color: transparent;
    border: none;
    border-radius: 15px;
    font-size: 13px;
    transition: var(--transition);
    color: var(--secondary-text);
}

.tab:hover {
    color: var(--accent-color);
    background-color: #f5f5f5;
}

.tab.active {
    color: white;
    background-color: var(--accent-color);
    font-weight: 500;
}

.tab-content {
    display: none;
    padding: 10px 0;
    max-width: 100%;
    margin: 0 auto;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.story-header {
    margin-bottom: 10px;
    text-align: center;
}

.story-header h3 {
    font-size: 16px;
    color: var(--text-color);
}

.story-content {
    line-height: 1.6;
    color: var(--secondary-text);
    font-size: 14px;
    text-align: center;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 20px 0;
    color: var(--light-text);
    font-size: 12px;
    margin-top: auto;
    border-top: 1px solid #f0f0f0;
    width: 100%;
    background-color: #fff;
}

/* 个人资料背景图 */
.profile-background {
    width: 100%;
    margin-bottom: 15px;
    padding: 0 15px;
}

.background-image-container {
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* 保持4:3的宽高比 */
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.5s ease;
}

.background-image:hover {
    transform: scale(1.02);
}

.image-credit {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: white;
    font-size: 12px;
    padding: 3px 8px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    z-index: 5;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.image-credit a {
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
}

.image-credit a:hover {
    text-decoration: underline;
    opacity: 0.9;
}

/* 刷新按钮相关样式已移除 */

/* 刷新按钮动画相关样式已移除 */

.beian {
    margin-top: 10px;
    font-size: 12px;
}

.beian a {
    color: var(--light-text);
    text-decoration: none;
    transition: var(--transition);
}

.beian a:hover {
    color: var(--accent-color);
}

.split {
    margin: 0 5px;
    color: #e0e0e0;
}

.beian a.police-beian {
    display: inline-flex;
    align-items: center;
}

.beian a.police-beian:before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url('../images/police-icon.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 2px;
    vertical-align: -3px;
}

/* 每日一句样式 */
.daily-quote {
    width: 85%;
    margin: 12px auto 5px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    text-align: center;
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    transform: perspective(1px) translateZ(0);
    animation: slideDown 0.5s ease-out forwards;
}

.daily-quote:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.daily-quote:hover {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.quote-header {
    display: none;
}

.quote-title {
    display: none;
}

.quote-content {
    padding: 10px 15px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quote-content:after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 30%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.05), transparent);
    transform: translateX(-50%);
}

.daily-quote p {
    margin: 0;
    padding: 0;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.75);
    font-style: italic;
    letter-spacing: 0.2px;
    font-weight: 400;
}

.quote-icon {
    color: var(--accent-color);
    opacity: 0.4;
    font-size: 12px;
    position: relative;
}

.fa-quote-left {
    margin-right: 5px;
}

.fa-quote-right {
    margin-left: 5px;
}

/* 信息卡片 */
.info-card {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-color: white;
    border-radius: var(--small-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 20px;
    width: 280px;
    max-width: 90%;
    z-index: 100;
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.info-card.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    animation: cardPopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.info-card.closing {
    animation: cardPopOut 0.25s ease forwards;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 15px;
    padding-bottom: 10px;
}

.info-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-color);
}

.info-close {
    font-size: 18px;
    color: var(--light-text);
    cursor: pointer;
    transition: var(--transition);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-close:hover {
    color: var(--accent-color);
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #f5f5f5;
}

.info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

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

.info-value {
    font-size: 13px;
    font-weight: 500;
}

/* 增强的响应式设计 */
/* 中等屏幕 */
@media (min-width: 768px) {
    .social-container {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .container {
        padding: 20px;
    }
    
    .profile-image {
        width: 100px;
        height: 100px;
    }
    
    .name {
        font-size: 28px;
    }
    
    .profile-background {
        padding: 0 20px;
    }
    
    .background-image-container {
        border-radius: 12px;
    }
    
    .profile-section {
        margin-top: -50px;
    }
    
    .daily-quote {
        width: 75%;
        max-width: 500px;
    }
    
    .quote-header {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .quote-content {
        padding: 12px 20px;
    }
    
    .daily-quote p {
        font-size: 14px;
    }
    
    .quote-icon {
        font-size: 13px;
    }
}

/* 小屏幕手机 */
@media (max-width: 480px) {
    :root {
        --section-spacing: 20px;
        --element-spacing: 10px;
    }
    
    .container {
        padding: 10px;
    }
    
    header {
        padding: 15px 0;
        margin-bottom: 20px;
    }
    
    .profile-image {
        width: 80px;
        height: 80px;
    }
    
    .profile-background {
        padding: 0 10px;
        margin-bottom: 10px;
    }
    
    .background-image-container {
        border-radius: 8px;
    }
    
    .profile-section {
        margin-top: -35px;
        padding: 0 15px;
    }
    
    .daily-quote {
        width: 90%;
        margin: 10px auto 5px;
        border-radius: 15px;
    }
    
    .quote-header {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .quote-content {
        padding: 8px 12px;
    }
    
    .quote-content:after {
        width: 40%;
        bottom: 1px;
    }
    
    .daily-quote p {
        font-size: 12px;
        letter-spacing: 0.1px;
    }
    
    .quote-icon {
        font-size: 11px;
    }
    
    .name {
        font-size: 22px;
    }
    
    .social-container {
        gap: 8px;
    }
    
    .social-card {
        padding: 10px;
    }
    
    .social-info h3 {
        font-size: 13px;
    }
    
    .social-info p {
        font-size: 11px;
    }
    
    .tab {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .tabs {
        gap: 6px;
    }
    
    .my-story h2, .social-media h2, .gallery h2 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .story-content {
        font-size: 13px;
    }
    
    .social-media, .gallery, .my-story {
        padding: 15px;
    }
}

/* 超小屏幕 */
@media (max-width: 320px) {
    .profile-image {
        width: 70px;
        height: 70px;
    }
    
    .name {
        font-size: 20px;
    }
    
    .tag {
        padding: 3px 8px;
        font-size: 11px;
    }
    
    .social-container {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        flex-direction: column;
        gap: 5px;
        align-items: center;
    }
    
    .tab {
        width: 100%;
        max-width: 200px;
    }
}
/* 底部导航栏样式 */
.bottom-navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    padding: 8px 0 5px;
    animation: slideDown 0.5s ease-out forwards;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--secondary-text);
    font-size: 12px;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 5px 0;
    width: 33.33%;
    position: relative;
}

.nav-item.active {
    color: var(--accent-color);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 3px 3px 0 0;
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
    position: relative;
    transition: transform 0.2s ease;
}

.nav-text {
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* 点击效果 */
.nav-item:active .nav-icon {
    transform: scale(0.9);
}

.nav-item:hover .nav-icon {
    transform: translateY(-2px);
}

/* 增加页面底部边距，避免内容被导航栏遮挡 */
body {
    padding-bottom: 70px;
}

/* 覆盖底部页脚的位置 */
footer {
    margin-bottom: 70px;
}

.notification-toast {
    border-radius: var(--border-radius);
    padding: 14px 16px;
    margin-bottom: 20px;
    font-weight: 500;
    position: relative;
    background-color: var(--card-bg);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease-out forwards;
}

/* 添加轻微的过渡动画 */
.info-button,
.current-language {
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}