:root {
    --color-light: #fff;
    --color-dark: #000;
    --color-gray: #888;
    --qq-blue: #12b7f5;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Inter', sans-serif;
    background-color: var(--color-dark);
    color: var(--color-light);
    overflow: hidden;
}

/* --- 开屏特效样式 (白色背景版) --- */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #fff; /* 1. 开屏背景改为白色 */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    /* 添加过渡，方便在JS中隐藏背景 */
    transition: background-color 0s ease; 
}

.intro-text-wrapper {
    text-align: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.intro-text-wrapper.hide {
    opacity: 0;
}

#intro-text {
    font-family: 'Space Mono', monospace;
    font-size: clamp(1.5rem, 5vw, 3rem);
    font-weight: 700;
    color: #000; /* 2. 开屏文字改为黑色 */
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

.intro-line {
    width: 0;
    height: 2px;
    background-color: #000; /* 3. 装饰线改为黑色 */
    margin: 10px auto 0;
    transition: width 0.3s ease;
}

.intro-text-wrapper.active .intro-line {
    width: 60px;
}

/* 黑色扩张幕布 */
.intro-curtain {
    position: absolute;
    width: 0;
    height: 0;
    background-color: #000; /* 4. 幕布改为黑色 */
    border-radius: 50%;
    z-index: 2;
    opacity: 1; /* 始终保持不透明，遮住白色背景 */
}

/* 页面初始隐藏 */
body:not(.loaded) .container {
    visibility: hidden;
}

/* --- 原有样式 --- */

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.background-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(0, 0, 0, 0.8) 50%,
        var(--color-dark) 100%
    );
    animation: gradientShift 8s ease-in-out infinite alternate;
    z-index: 1;
}

.content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 300;
    letter-spacing: 0.2em;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

body.loaded .main-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.logo-container {
    width: 300px;
    height: 300px;
    margin: 1rem auto;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

body.loaded .logo-container {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.6s;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    filter: brightness(1);
}

.progress-indicator {
    width: 200px;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 1.5rem auto;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

body.loaded .progress-indicator {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.9s;
}

.progress-fill {
    position: absolute;
    width: 50%;
    height: 100%;
    background-color: var(--color-light);
    animation: progressMove 2s ease-in-out infinite alternate;
}

.contact-info {
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

body.loaded .contact-info {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.2s;
}

.contact-text {
    font-size: 1.1rem;
    color: var(--color-gray);
    cursor: pointer;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    padding: 5px 10px;
    border-radius: 4px;
    position: relative;
}

.contact-text:hover {
    color: var(--qq-blue);
    text-shadow: 0 0 10px rgba(18, 183, 245, 0.5);
    background-color: rgba(255,255,255,0.05);
}

.contact-text::after {
    content: '点击复制';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--color-light);
    background: rgba(0, 0, 0, 0.8);
    padding: 4px 8px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease, top 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.contact-text:hover::after {
    opacity: 1;
    top: -35px;
}

.bilibili-link {
    color: var(--color-light);
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
    display: inline-block;
    margin-top: 0.5rem;
}

.bilibili-link:hover {
    color: #fb7299;
    text-decoration: underline;
}

.footer {
    position: absolute;
    bottom: 2rem;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-gray);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
    z-index: 10;
}

body.loaded .footer {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.5s;
}

.toast {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.95);
    color: #000;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* 动画定义 */
@keyframes gradientShift {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.1); opacity: 1; }
}

@keyframes progressMove {
    0% { left: -30%; width: 30%; }
    100% { left: 100%; width: 30%; }
}

/* 开屏动画关键帧 */
@keyframes expandCurtain {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 300vw;
        height: 300vh;
        opacity: 1;
        border-radius: 0;
    }
}

@keyframes slideUpCurtain {
    0% {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    100% {
        top: -100vh;
        left: -100vw;
        transform: translate(-50%, -50%);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .main-title {
        font-size: clamp(2rem, 10vw, 3.5rem);
        letter-spacing: 0.1em;
    }
    .logo-container {
        width: 220px;
        height: 220px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.8rem;
        letter-spacing: 0.05em;
        margin-bottom: 1rem;
    }
    .logo-container {
        width: 180px;
        height: 180px;
    }
    .content {
        padding: 1rem;
    }
    .progress-indicator {
        width: 150px;
    }
    .contact-text {
        font-size: 1rem;
    }
}
