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

:root {
    --bg-color: #f5f5f5;
    --text-color: #333333;
    --accent-color: #5c9eff;
}

body {
    min-height: 100vh;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Playfair Display', serif;
    overflow: hidden;
    transition: background-color 0.5s ease;
}

/* 主要内容区域 */
.main-content {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem;
    /* 修改为1rem */
    z-index: 1;
    /* 添加z-index确保内容在圆圈之上 */
}

.circle-mask {
    text-align: center;
    padding: 1rem;
    /* 修改为1rem */
    max-width: 90%;
    /* 添加最大宽度限制 */
    margin: 0 auto;
    /* 确保居中 */
}

.main-title {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-color);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    /* 调整为2rem */
    position: relative;
}

.main-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

/* 链接容器 */
.links-container {
    display: flex;
    flex-direction: column;
    gap: 0rem;
    margin-top: 2.5rem;
    letter-spacing: 3px;
}

/* 链接样式 */
.main-link {
    font-family: 'EB Garamond', serif;
    font-size: 1.2rem;
    color: var(--text-color);
    text-decoration: none;
    position: relative;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    will-change: transform, color;
}

.main-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--accent-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.main-link:hover::before {
    width: 60%;
    left: 50%;
}

.main-link:hover {
    letter-spacing: 2px;
    color: var(--accent-color);
}

/* 圆圈样式 */
.circles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    /* 调整为0 */
}

.circle {
    position: absolute;
    border-radius: 50%;
    background-color: transparent;
    border: 2px solid;
    opacity: 0.8;
    mix-blend-mode: normal;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    will-change: transform; /* 新增，提示浏览器优化 */
    transform: translate(-50%, -50%); /* 确保圆圈中心点对齐 */
    backface-visibility: hidden; /* 新增，优化渲染 */
    transform-style: preserve-3d; /* 新增，启用硬件加速 */
}

/* 其他CSS规则保持不变 */


/* 暗黑模式 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #ffffff;
    }

    body {
        color: #f5f5f5;
        background-color: #1a1a1a;
        transition: background-color 0.5s ease, color 0.5s ease;
    }

    .circle {
        opacity: 0.6;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
        transition: opacity 0.5s ease, box-shadow 0.5s ease;
    }

    .main-title {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    }
}

@media screen and (orientation: landscape) and (max-width: 768px) {
    .main-content {
        padding-top: 5vh;
    }

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

    .links-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.4rem;
    }

    .main-link {
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 768px) {
    * {
        transition: none !important;
    }

    .main-title {
        white-space: normal;
        word-break: break-word;
        padding: 1rem;
        margin: 0.5rem;
        font-size: 2rem;
    }

    .circle-mask {
        padding: 1rem;
    }

    .circle {
        opacity: 0.6;
        transition: opacity 0.3s ease;
        min-width: 50px;
        min-height: 50px;
    }

    .circles-container {
        overflow: hidden;
    }

    .main-link:hover {
        letter-spacing: 1px;
    }
    
    .links-container {
        gap: 0;
        margin-top: ;
    }
}