:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --text-color: #333;
    --light-bg: #f9f9f9;
    --card-bg: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    padding: 15px;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 动态背景样式 */
.dynamic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(45deg, #ff9a9e, #fad0c4, #fad0c4, #a1c4fd);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    opacity: 0.8;
}

.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    animation: floatAnimation 20s infinite linear;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* 修复浮动动画 - 重命名避免冲突 */
@keyframes floatAnimation {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
    }
}



/* 头部样式修改：Logo + 站点名称 左右布局 */
header {
    margin-bottom: 20px;
    padding-top: 10px;
}

.header-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    flex-shrink: 0;
    /* 防止Logo被压缩 */
}

.logo:hover {
    transform: scale(1.05) rotate(5deg);
}

.site-header-info {
    flex: 1;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 2px;
    color: var(--primary-color);
    line-height: 1.2;
}

.site-info {
    color: #666;
    margin-bottom: 0;
    font-size: 0.85rem;
}

/* 导航Tab样式 */
.nav-tabs {
    display: flex;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 6px;
    box-shadow: var(--shadow);
    overflow-x: auto;
    scrollbar-width: none;
    /* 隐藏滚动条 */
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

.tab-item {
    flex: 1;
    min-width: 80px;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    white-space: nowrap;
}

.tab-item.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
}

.tab-item:hover:not(.active) {
    background-color: var(--light-bg);
}

/* Tab内容容器 */
.tab-content-container {
    margin-bottom: 20px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 开发中提示样式 */
.dev-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 40px 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.dev-tip {
    font-size: 1.2rem;
    color: #666;
    margin-top: 20px;
}

/* 主容器样式 */
.main-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .main-container {
        grid-template-columns: 2fr 1fr;
        grid-template-rows: auto auto;
        gap: 20px;
    }

    .desc-card {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .site-links-card {
        grid-column: 1;
        grid-row: 2;
    }

    .social-card {
        grid-column: 2;
        grid-row: 2;
    }
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card-title {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.card-title i {
    margin-right: 8px;
    font-size: 1.3rem;
}

.desc-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.desc-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.link-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--light-bg);
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-color);
}

.link-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(3px);
}

.link-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
    padding: 8px;
    border-radius: 8px;
    width: 70px;
    background: var(--light-bg);
}

.social-item:hover {
    background: var(--secondary-color);
    color: white;
    transform: scale(1.03);
}

.social-icon {
    width: 35px;
    height: 35px;
    margin-bottom: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
    font-weight: bold;
    font-size: 0.9rem;
}

/* 压缩版时间模块样式 */
.time-section {
    margin-top: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.time-module {
    flex: 1;
    min-width: 200px;
}

.current-date {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
    font-family: 'Arial', sans-serif;
    letter-spacing: 0.5px;
}

.current-time {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.countdown-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    padding: 6px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    min-width: 60px;
}

.countdown-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary-color);
    font-family: 'Courier New', monospace;
}

.countdown-label {
    font-size: 0.75rem;
    color: #666;
    margin-top: 2px;
}

/* 压缩版生命天数模块样式 */
.life-days-module {
    flex: 1;
    min-width: 200px;
    text-align: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.life-title {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    font-family: 'Arial', sans-serif;
}

.life-days {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
    font-family: 'Courier New', monospace;
}

.life-days::after {
    content: "天";
    font-size: 1.2rem;
    margin-left: 4px;
}

.birth-date {
    font-size: 0.9rem;
    color: #666;
    font-family: 'Arial', sans-serif;
}

footer {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    color: #888;
    font-size: 0.8rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* 移动端适配 */
@media (max-width: 767px) {
    .time-section {
        flex-direction: column;
        gap: 10px;
    }

    .main-container {
        grid-template-columns: 1fr;
    }



    /* 移动端导航Tab优化 */
    .nav-tabs {
        gap: 4px;
        padding: 4px;
    }

    .tab-item {
        padding: 6px 8px;
        min-width: 70px;
        font-size: 0.85rem;
    }

    /* 移动端时间模块进一步压缩 */
    .current-date {
        font-size: 1.1rem;
    }

    .current-time {
        font-size: 1.4rem;
    }

    .life-days {
        font-size: 1.8rem;
    }
}

/* Redesigned Homepage Layout */
.intro-section {
    text-align: left;
    margin-bottom: 25px;
    /* padding handled by .card class */
}

.intro-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.intro-header i {
    font-size: 1.5rem;
}

.intro-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: #333;
}

.intro-text {
    color: #555;
    margin-top: 10px;
    line-height: 1.6;
    font-size: 1rem;
}

.top-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .top-section-grid {
        grid-template-columns: 1fr;
    }
}

/* Profile Card (Left) */
.profile-card,
.time-card {
    padding: 12px;
    height: 100%;
    box-sizing: border-box;
}

.profile-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-row {
    display: flex;
    justify-content: flex-start;
    /* Left Align */
    align-items: center;
    border-bottom: 1px dashed #f0f0f0;
    padding-bottom: 5px;
    gap: 15px;
    /* Spacing between label and value */
}

.profile-row:last-child {
    border-bottom: none;
}

.profile-label {
    color: #666;
    font-weight: 500;
    font-size: 0.95rem;
    min-width: 60px;
    /* Optional: align values vertically */
}

.profile-value {
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    text-align: left;
    /* Ensure text aligns left */
}

/* Time Card (Right) */
.time-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    background: white;
}

.time-module {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Compact gap */
}

.time-row {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.current-date {
    font-size: 1rem;
    /* Smaller font */
    color: #555;
    font-weight: bold;
}

.current-time {
    font-size: 1.8rem;
    /* Compact font */
    font-weight: bold;
    color: var(--primary-color);
    font-family: monospace;
    letter-spacing: 1px;
}

.separator-line {
    height: 1px;
    background: #f5f5f5;
    width: 90%;
    margin: 4px auto;
    /* Compact margin */
}

/* Layout V3 Styles */
/* Layout V3/V4 Styles */
/* 统一间距 20px & 紧凑模式 */

.intro-card {
    /* Inherits .card styles */
    margin-bottom: 15px !important;
    /* Compact margin */
    padding: 15px !important;
}

.top-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
    /* 统一 15px */
}

/* 紧凑化 Time Block */
.time-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    /* 紧凑 Gap */
    margin-top: 5px;
    /* 紧凑 Margin */
    align-items: start;
}

@media (max-width: 768px) {
    .time-bottom-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }

    .top-section-grid {
        grid-template-columns: 1fr;
    }
}

/* 紧凑字体和间距 */
.current-time {
    font-size: 1.6rem;
    /* 减小字体 */
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2px;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.current-date {
    font-size: 1rem;
    color: #555;
    font-weight: bold;
    margin-bottom: 0;
}

.countdown-value {
    font-size: 1.2rem;
    /* 减小字体 */
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

.life-days {
    font-size: 1.6rem;
    /* 减小字体 */
    font-weight: 700;
    color: var(--secondary-color);
    margin: 2px 0;
    font-family: 'Courier New', monospace;
}

.life-title {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 2px;
}

/* Home Container */
.home-container {
    display: block !important;
    max-width: 100%;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .home-container {
        display: block !important;
        grid-template-columns: none !important;
        gap: 0 !important;
    }
}

/* Bottom Section */
.bottom-section-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 15px;
    /* 统一 15px */
}

@media (min-width: 768px) {
    .bottom-section-grid {
        grid-template-columns: 1fr auto;
        align-items: stretch;
    }

    .social-card {
        min-width: 280px;
        max-width: 350px;
        height: 100%;
    }

    .site-links-card {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .links-grid {
        flex: 1;
    }
}

/* Global Compact Padding */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    /* 紧凑 Padding 15px */
    box-shadow: var(--shadow);
    transition: var(--transition);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-title {
    margin-bottom: 8px;
    /* 紧凑 Margin */
}

.profile-row {
    padding-bottom: 4px;
    /* 紧凑 Row */
}

/* Life Days */
.life-days-module {
    margin-top: 5px;
    /* Reset outdated styles */
    background: none;
    box-shadow: none;
    padding: 0;
}

.life-title {
    font-size: 0.9rem;
    color: #666;
}

.life-days {
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin: 5px 0;
}

.life-days::after {
    content: "天";
    font-size: 1rem;
    margin-left: 2px;
    color: #888;
}

.birth-date {
    color: #aaa;
}

/* Force Mobile Stacking */
@media (max-width: 768px) {
    .top-section-grid {
        grid-template-columns: 1fr !important;
    }
}