/* CSS变量定义 - 昴日 Rooster Time 配色方案 */
:root {
    /* 主色系 - 温暖橙色系（象征日出） */
    --primary-color: #ff6b35;
    --primary-light: #ff8c5a;
    --primary-dark: #e55a2b;
    --primary-soft: #fff5f0;

    /* 辅助色系 - 清新蓝色系（象征清晨） */
    --secondary-color: #4a90e2;
    --secondary-light: #6ba3f5;
    --secondary-dark: #357abd;
    --secondary-soft: #f0f7ff;

    /* 文字颜色 */
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --text-muted: #95a5a6;

    /* 背景颜色 */
    --background-light: #ffffff;
    --background-dark: #1a1a1a;
    --background-warm: #fff9f6;

    /* 卡片颜色 */
    --card-light: #f8f9fa;
    --card-dark: #2d2d2d;
    --card-warm: #fff5f0;

    /* 边框颜色 */
    --border-light: #e9ecef;
    --border-dark: #404040;
    --border-warm: #ffe4d6;

    /* 阴影 */
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 20px rgba(255, 107, 53, 0.15);
    --shadow-warm: 0 4px 15px rgba(255, 107, 53, 0.1);

    /* 字体和间距 */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 16px;
    --max-width: 1200px;

    /* 功能色系 */
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    --info-color: #3498db;
}

/* 深色模式变量 - 保持温暖色调 */
[data-theme="dark"] {
    /* 主色系在深色模式下更加温暖 */
    --primary-color: #ff8c5a;
    --primary-light: #ffaa7a;
    --primary-dark: #ff6b35;
    --primary-soft: #3d2418;

    /* 辅助色系在深色模式下柔和化 */
    --secondary-color: #6ba3f5;
    --secondary-light: #8bb5f7;
    --secondary-dark: #4a90e2;
    --secondary-soft: #1e2a3a;

    /* 文字颜色适配深色模式 */
    --text-dark: #ecf0f1;
    --text-light: #bdc3c7;
    --text-muted: #95a5a6;

    /* 背景颜色 - 深色但温暖 */
    --background-light: #1a1a1a;
    --background-dark: #0d0d0d;
    --background-warm: #2d1810;

    /* 卡片颜色 */
    --card-light: #2d2d2d;
    --card-dark: #1f1f1f;
    --card-warm: #3d2418;

    /* 边框颜色 */
    --border-light: #404040;
    --border-dark: #555555;
    --border-warm: #5c3d2e;

    /* 阴影在深色模式下更明显 */
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 12px 30px rgba(255, 107, 53, 0.2);
    --shadow-warm: 0 6px 20px rgba(255, 107, 53, 0.15);
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.6;
    transition: var(--transition);
    overflow-x: hidden;
}

/* 容器 */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: var(--transition);
}

[data-theme="dark"] .navbar {
    background: rgba(26, 26, 26, 0.95);
    border-bottom-color: var(--border-dark);
}

/* 黑暗模式下的按钮样式 */
[data-theme="dark"] .lang-toggle {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    backdrop-filter: blur(8px);
}

[data-theme="dark"] .lang-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.3);
}

[data-theme="dark"] .theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
}

[data-theme="dark"] .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.2);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-image {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.footer-logo-image {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
    text-decoration: none;
}

.footer-logo:hover {
    text-decoration: none;
}

.nav-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

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

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.lang-toggle, .theme-toggle {
    background: none;
    border: 2px solid var(--border-light);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.lang-toggle:hover, .theme-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* 主页部分 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 2rem 2rem;
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8d6 100%);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #2d1810 0%, #3d2418 100%);
}

.hero-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-name-cn {
    display: block;
    font-size: 2.5rem;
    opacity: 0.8;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.sun-animation {
    position: relative;
    width: 200px;
    height: 200px;
    animation: float 6s ease-in-out infinite;
}

.sun {
    font-size: 6rem;
    animation: pulse 3s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(255, 193, 7, 0.6));
}

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* 功能特色部分 */
.features {
    padding: 6rem 2rem;
    background: var(--background-light);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 4rem;
    color: var(--text-dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-light);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-description {
    color: var(--text-light);
    line-height: 1.7;
}

/* 应用截图部分 */
.screenshots {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

[data-theme="dark"] .screenshots {
    background: linear-gradient(135deg, #2d2d2d 0%, #1f1f1f 100%);
}

[data-theme="dark"] .screenshot-image {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    /* Safari兼容性修复 */
    -webkit-box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .screenshot-card:hover .screenshot-image {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
    -webkit-box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.screenshot-card {
    perspective: 1000px;
}

.screenshot-image {
    width: 100%;
    max-width: 220px;
    height: 478px; /* 固定高度，保持9:19.5比例 (220 * 19.5 / 9) */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    -webkit-box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    -webkit-transition: -webkit-transform 0.3s ease, box-shadow 0.3s ease;
    background: #000;
    position: relative;
    margin: 0 auto;
}

.screenshot-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 20px;
    transition: transform 0.3s ease;
    /* 兼容性修复 */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* 防止图片在Safari中的渲染问题 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    /* Safari图片渲染优化 */
    -webkit-font-smoothing: antialiased;
    image-rendering: -webkit-optimize-contrast;
    /* 强制Safari应用尺寸 */
    min-height: 478px;
    max-height: 478px;
}

.screenshot-card:hover .screenshot-image {
    -webkit-transform: translateY(-3px) scale(1.02);
    -moz-transform: translateY(-3px) scale(1.02);
    -ms-transform: translateY(-3px) scale(1.02);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.screenshot-card:hover .screenshot-image img {
    -webkit-transform: scale(1.02);
    -moz-transform: scale(1.02);
    -ms-transform: scale(1.02);
    transform: scale(1.02);
}


/* 工作日功能部分 */
.workday-feature {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #fff9f5 0%, #fff0e6 100%);
    border-top: 1px solid rgba(255, 107, 53, 0.1);
}

[data-theme="dark"] .workday-feature {
    background: linear-gradient(135deg, #2d1810 0%, #3d2418 100%);
    border-top: 1px solid rgba(255, 107, 53, 0.2);
}

.workday-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.workday-text h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.workday-text h3:first-child {
    margin-top: 0;
}

.workday-text p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .workday-text p {
    color: var(--text-dark);
}

.workday-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.workday-features li {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 107, 53, 0.1);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-light);
}

[data-theme="dark"] .workday-features li {
    border-bottom: 1px solid rgba(255, 107, 53, 0.2);
    color: var(--text-dark);
}

.workday-features li:last-child {
    border-bottom: none;
}

.supported-calendars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.calendar-region {
    background: var(--card-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.calendar-region:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.calendar-region h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin: 0 0 0.5rem;
    font-weight: 600;
}

.calendar-region p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

[data-theme="dark"] .calendar-region p {
    color: var(--text-dark);
}

.calendar-languages {
    font-size: 0.85rem !important;
    color: var(--primary-color) !important;
    margin-top: 0.5rem !important;
    font-style: italic;
}

[data-theme="dark"] .calendar-languages {
    color: var(--primary-color) !important;
}

.beta-notice {
    background: rgba(255, 193, 7, 0.08);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin: 2rem 0 0;
}

[data-theme="dark"] .beta-notice {
    background: rgba(255, 193, 7, 0.04);
    border-color: rgba(255, 193, 7, 0.15);
}

.beta-notice p {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    color: var(--text-light) !important;
    margin: 0 !important;
}

[data-theme="dark"] .beta-notice p {
    color: var(--text-dark) !important;
}

.beta-notice strong {
    color: #ff6b35 !important;
    font-weight: 600;
}

.workday-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: var(--card-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: sticky;
    top: 2rem;
}

.calendar-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.visual-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.4;
}

/* 响应式设计 - 工作日功能部分 */
@media (max-width: 768px) {
    .workday-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .workday-visual {
        position: static;
        order: -1;
    }

    .supported-calendars {
        grid-template-columns: 1fr;
    }

    .workday-text h3 {
        font-size: 1.2rem;
    }

    .beta-notice {
        padding: 1rem;
    }

    .beta-notice p {
        font-size: 0.85rem !important;
    }
}

/* 下载部分 */
.download {
    padding: 6rem 2rem;
    background: var(--background-light);
    text-align: center;
}

.download-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.download-buttons {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

.download-btn.app-store {
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.app-store-badge {
    width: auto;
    height: 60px;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.download-btn.app-store:hover .app-store-badge {
    transform: translateY(-2px);
    filter: drop-shadow(0 8px 25px rgba(0, 0, 0, 0.3));
}


/* 关于部分 */
.about {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8d6 100%);
}

[data-theme="dark"] .about {
    background: linear-gradient(135deg, #2d1810 0%, #3d2418 100%);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.rooster-mascot {
    font-size: 6rem;
    animation: bounce 2s ease-in-out infinite;
}

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

/* 页脚 */
.footer {
    background: var(--card-dark);
    padding: 3rem 2rem;
    border-top: 1px solid var(--border-light);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    align-items: center;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.footer-link {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-copyright {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 响应式设计 - 平板端 */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-content {
        gap: 3rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .app-name-cn {
        font-size: 2.2rem;
    }

    .nav-container {
        padding: 1rem 1.5rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* 响应式设计 - 手机端 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--background-light);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: var(--shadow);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .app-name-cn {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .btn {
        width: 200px;
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }

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

    .container {
        padding: 0 1rem;
    }

    .features, .screenshots, .download, .about {
        padding: 4rem 1rem;
    }

    .features-grid, .screenshots-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .screenshot-image {
        max-width: 280px;
        height: 608px; /* 280 * 19.5 / 9 */
    }

    .section-title {
        font-size: 2rem;
    }

    .feature-card {
        padding: 2rem;
    }

    .sun-animation {
        width: 150px;
        height: 150px;
    }

    .sun {
        font-size: 4rem;
    }
}

/* 响应式设计 - 小屏手机 */
@media (max-width: 480px) {
    .hero {
        padding: 5rem 1rem 2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .app-name-cn {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

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

    .btn {
        width: 180px;
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .sun-animation {
        width: 120px;
        height: 120px;
    }

    .sun {
        font-size: 3rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .feature-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .feature-title {
        font-size: 1.3rem;
    }

    .feature-description {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .download-buttons {
        padding: 0.5rem 0;
    }

    .app-store-badge {
        height: 50px;
    }

    .download-btn.app-store {
        max-width: 280px;
        margin: 0 auto;
    }

    .rooster-mascot {
        font-size: 4rem;
    }

    .about-description {
        font-size: 1rem;
    }

    .nav-container {
        padding: 0.8rem 1rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .lang-toggle, .theme-toggle {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* 超小屏设备 */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .app-name-cn {
        font-size: 1.6rem;
    }

    .btn {
        width: 160px;
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }

    .feature-card {
        padding: 1.2rem;
    }

    .feature-icon {
        font-size: 2rem;
    }

    .feature-title {
        font-size: 1.2rem;
    }

    .app-store-badge {
        height: 45px;
    }

    .download-btn.app-store {
        max-width: 260px;
    }
}

/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 4rem 2rem 2rem;
    }

    .hero-content {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .app-name-cn {
        font-size: 1.8rem;
    }

    .sun-animation {
        width: 100px;
        height: 100px;
    }

    .sun {
        font-size: 2.5rem;
    }
}

/* 大屏设备优化 */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }

    .hero-title {
        font-size: 4rem;
    }

    .app-name-cn {
        font-size: 3rem;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }

    .screenshots-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        max-width: 900px;
        margin: 0 auto;
    }

    .screenshot-image {
        max-width: 240px;
        height: 520px; /* 240 * 19.5 / 9 */
    }
}

/* Safari专用hack */
_::-webkit-full-page-media, _:future, :root .screenshot-image {
    height: 478px !important;
    max-width: 220px !important;
}

/* Safari 10.1+ */
@media not all and (min-resolution:.001dpcm) {
    @media {
        .screenshot-image {
            height: 478px !important;
            max-width: 220px !important;
        }
    }
}

/* Safari 10.0 */
@supports (-webkit-appearance:none) and (stroke-color:transparent) {
    .screenshot-image {
        height: 478px !important;
        max-width: 220px !important;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
    }
}

/* 隐私政策页面样式 */
.policy-page {
    background: var(--background-light);
    color: var(--text-light);
    min-height: 100vh;
}

[data-theme="dark"] .policy-page {
    background: var(--background-dark);
    color: var(--text-dark);
}

.policy-content {
    padding: 8rem 2rem 4rem;
    max-width: 800px;
    margin: 0 auto;
}

.policy-header {
    text-align: center;
    margin-bottom: 3rem;
}

.policy-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.version-info {
    font-size: 1rem;
    color: var(--text-light);
    opacity: 0.8;
}

.policy-section {
    background: var(--card-light);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

[data-theme="dark"] .policy-section {
    background: var(--card-dark);
    border-left-color: var(--primary-color);
}

.policy-section h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.policy-section p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    color: var(--text-light);
}

[data-theme="dark"] .policy-section p {
    color: var(--text-dark);
}

.policy-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.policy-section ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-light);
}

[data-theme="dark"] .policy-section ul li {
    color: var(--text-dark);
}

.policy-section ul li:before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.policy-footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 107, 53, 0.1);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
}

.back-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.footer-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* 隐私政策页面的响应式设计 */
@media (max-width: 768px) {
    .policy-content {
        padding: 6rem 1rem 3rem;
    }

    .policy-header h1 {
        font-size: 2rem;
    }

    .policy-section {
        padding: 1.5rem;
    }

    .policy-section h2 {
        font-size: 1.2rem;
    }
}

/* 触摸设备优化 */
@media (hover: none) {
    .feature-card:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    .download-btn:hover {
        transform: none;
    }

    .fab:hover {
        transform: none;
    }

    /* 增大点击区域 */
    .nav-link {
        padding: 0.5rem 1rem;
    }

    .lang-toggle, .theme-toggle {
        min-height: 44px;
        min-width: 44px;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    :root {
        --border-light: #000000;
        --border-dark: #ffffff;
        --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }

    .btn-primary {
        border: 2px solid var(--text-dark);
    }

    .btn-secondary {
        border: 3px solid var(--primary-color);
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .sun-animation,
    .rooster-mascot,
    .alarm-status-demo,
    .region-demo,
    .sync-status-demo {
        animation: none !important;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* 选择文本样式 */
::selection {
    background: var(--primary-color);
    color: white;
}

/* Rooster Time 专用样式 */
/* 闹钟状态指示器 */
.alarm-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.alarm-status-active {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.alarm-status-paused {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(243, 156, 18, 0.2);
}

.alarm-status-expired {
    background: rgba(231, 76, 60, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(231, 76, 60, 0.2);
}

/* 节假日标识 */
.holiday-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: var(--secondary-soft);
    color: var(--secondary-color);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

[data-theme="dark"] .holiday-badge {
    background: var(--secondary-dark);
    color: var(--secondary-light);
}

/* 地区标识 */
.region-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    background: var(--card-warm);
    border: 1px solid var(--border-warm);
    border-radius: 8px;
    font-size: 0.7rem;
    color: var(--primary-color);
    font-weight: 500;
}

[data-theme="dark"] .region-tag {
    background: var(--card-warm);
    border-color: var(--border-warm);
}

/* iCloud 同步状态 */
.sync-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sync-status.syncing {
    color: var(--info-color);
    animation: pulse 2s ease-in-out infinite;
}

.sync-status.synced {
    color: var(--success-color);
}

/* 功能卡片增强样式 */
.feature-card.holiday-feature {
    background: var(--secondary-soft);
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.feature-card.holiday-feature:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.15);
}

.feature-card.icloud-feature {
    background: var(--primary-soft);
    border: 1px solid rgba(255, 107, 53, 0.2);
}

.feature-card.icloud-feature:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.15);
}

/* 工作日模式指示器 */
.work-mode-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--card-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-light);
}

.work-mode-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.work-mode-day.active {
    background: var(--primary-color);
    color: white;
}

.work-mode-day.rest {
    background: var(--card-dark);
    color: var(--text-muted);
}

/* 进度指示器 */
.progress-indicator {
    width: 100%;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* 浮动操作按钮 */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
    z-index: 1000;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 30px rgba(255, 107, 53, 0.3);
}

/* 数据同步动画 */
@keyframes sync {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.sync-icon {
    animation: sync 2s linear infinite;
}

/* 呼吸效果 */
@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.breathing {
    animation: breathe 3s ease-in-out infinite;
}

/* 焦点样式 */
button:focus, a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 跳过链接 - 提升键盘导航体验 */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

/* 图片和图标的无障碍访问 */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 色彩对比度优化 */
.text-contrast {
    color: var(--text-dark);
    background: var(--background-light);
}

[data-theme="dark"] .text-contrast {
    color: var(--text-dark);
    background: var(--background-light);
}

/* 加载状态优化 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-light);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 错误状态样式 */
.error-message {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
    color: var(--error-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
}

.success-message {
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid rgba(39, 174, 96, 0.2);
    color: var(--success-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
}

/* 性能优化：减少重绘和重排 */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* 字体加载优化 */
@font-face {
    font-family: 'Inter';
    font-display: swap;
    src: url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
}

/* 内容适配 */
.content-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 加载动画 */
.loading {
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* 平滑滚动增强 */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* 高对比度支持 */
@media (prefers-contrast: high) {
    :root {
        --border-light: #000000;
        --border-dark: #ffffff;
    }
}


.features-decoration {
    position: absolute;
    top: -40px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 3rem;
    pointer-events: none;
    z-index: 2;
}

.decoration-logo {
    opacity: 0.6;
    animation: decorationBounce 6s ease-in-out infinite;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px;
    backdrop-filter: blur(4px);
}

.decoration-logo.alarm-icon {
    width: 64px;
    height: 64px;
    animation-delay: 0s;
}

.decoration-logo.clock-icon {
    width: 32px;
    height: 32px;
    animation-delay: 2s;
}

.decoration-logo.calendar-icon {
    width: 48px;
    height: 48px;
    animation-delay: 4s;
}

@keyframes decorationBounce {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(-5deg);
    }
    75% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.about-decorations {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 150px;
    height: 150px;
    pointer-events: none;
    z-index: 1;
}

.decoration-logo.decoration-rooster {
    position: absolute;
    opacity: 0.5;
    animation: roosterPeck 10s ease-in-out infinite;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    backdrop-filter: blur(4px);
}

.decoration-logo.decoration-rooster-1 {
    width: 128px;
    height: 128px;
    top: 20px;
    left: 20px;
    animation-delay: 0s;
}

.decoration-logo.decoration-rooster-2 {
    width: 64px;
    height: 64px;
    top: 60px;
    right: 10px;
    animation-delay: 3s;
}

.decoration-logo.decoration-rooster-3 {
    width: 96px;
    height: 96px;
    bottom: 10px;
    left: 50px;
    animation-delay: 6s;
}

.main-logo {
    width: 256px;
    height: 256px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    padding: 16px;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

@keyframes roosterPeck {
    0%, 90%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    95% {
        transform: translateY(-5px) rotate(-10deg);
    }
}

/* 深色主题下的装饰元素 */
[data-theme="dark"] .decoration-logo,
[data-theme="dark"] .main-logo {
    opacity: 0.6;
}

[data-theme="dark"] .main-logo {
    background: rgba(255, 255, 255, 0.05);
}

/* 服务器配置页面样式 */
.config-block {
    background: var(--card-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1rem 0;
    border: 1px solid var(--border-light);
    overflow-x: auto;
}

[data-theme="dark"] .config-block {
    background: var(--card-dark);
    border-color: var(--border-light);
}

.config-block pre {
    margin: 0;
    padding: 0;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
}

.config-block code {
    display: block;
    tab-size: 4;
}

/* 移动端适配装饰元素 */
@media (max-width: 768px) {

    .features-decoration {
        gap: 2rem;
        top: -30px;
    }

    .decoration-logo.alarm-icon {
        width: 48px;
        height: 48px;
    }

    .decoration-logo.clock-icon {
        width: 24px;
        height: 24px;
    }

    .decoration-logo.calendar-icon {
        width: 36px;
        height: 36px;
    }

    .about-decorations {
        width: 100px;
        height: 100px;
    }

    .decoration-logo.decoration-rooster-1 {
        width: 96px;
        height: 96px;
    }

    .decoration-logo.decoration-rooster-2 {
        width: 48px;
        height: 48px;
    }

    .decoration-logo.decoration-rooster-3 {
        width: 72px;
        height: 72px;
    }

    .main-logo {
        width: 180px;
        height: 180px;
    }
}

/* 区域图标样式 */
.region-flag {
    display: inline-block;
    font-size: 1.2em;
    margin-right: 8px;
    transition: var(--transition);
    line-height: 1;
    text-align: center;
}

/* 替代图标样式 */
.region-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    /* 确保图标内部为空，不显示任何文字 */
    color: transparent;
    font-size: 0;
}

/* 祥云图标 */
.icon-cloud {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff6b35'%3E%3Cpath d='M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z'/%3E%3C/svg%3E");
}

/* 梅花图标 - 五瓣梅花 */
.icon-plum {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23ff6b35'%3E%3Ccircle cx='12' cy='7' r='2'/%3E%3Ccircle cx='7' cy='10' r='2'/%3E%3Ccircle cx='17' cy='10' r='2'/%3E%3Ccircle cx='9' cy='16' r='2'/%3E%3Ccircle cx='15' cy='16' r='2'/%3E%3Ccircle cx='12' cy='12' r='1.5' fill='%23fff'/%3E%3C/g%3E%3C/svg%3E");
}