@font-face {
    font-family: Pixel;
    src: url(./assets/Font.ttf);
}

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

body {
    font-family: Pixel;
    overflow: hidden;
    position: relative;
    width: 100vw;
    height: 100vh;
}

/* 背景 */
.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(4px);
    z-index: 0;
}

/* 顶部品牌标识 */
.brand-header {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    text-align: center;
}

.brand-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-top: 10px;
}

.brand-logo {
    width: 220px;
    height: 220px;
    object-fit: contain;
}

.brand-logo-2 {
    width: 160px;
    height: 160px;
}

.brand-x {
    color: white;
    font-size: 40px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    line-height: 1;
}

/* 传送门框架 */
.portal-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 40;
    cursor: default;
    pointer-events: none;
}

.portal-frame {
    position: relative;
    width: 300px;
    height: 400px;
}

.portal-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

.portal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    height: 80%;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.door-gif {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.portal-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

/* 游戏元素容器 */
.game-elements {
    position: absolute;
    right: 20%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
}

/* 水桶 */
.water-bucket {
    position: relative;
    width: 80px;
    height: 80px;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 60;
}

.water-bucket:hover {
    transform: scale(1.1);
}

.water-bucket img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
    transition: opacity 0.5s ease;
}

.water-bucket img.bucket-img {
    position: absolute;
    top: 0;
    left: 0;
}

.water-bucket img.bucket-img.fade-out {
    opacity: 0;
}

.water-bucket img.bucket-img.fade-in {
    opacity: 1;
}

/* 底部版权信息 */
.copyright {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    text-align: center;
    color: white;
    font-size: 14px;
    line-height: 1.8;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.copyright p {
    margin: 5px 0;
}

.copyright a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.copyright a:hover {
    color: #ffff00;
    text-shadow: 0 0 5px rgba(255, 255, 0, 0.8);
}

/* 访问统计 */
.visit-counter {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    padding: 8px 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 200px;
}

.counter-text {
    margin: 0;
    padding: 0;
    font-size: 11px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    line-height: 1.4;
}

.visit-count {
    margin: 0;
    padding: 0;
    font-size: 10px;
    opacity: 0.85;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    line-height: 1.4;
}

/* 成就弹窗 */
.achievement-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.5s ease-out;
    pointer-events: none;
}

.achievement-popup.show {
    opacity: 1;
    transform: translateX(0);
}

.achievement-popup.hide {
    opacity: 0;
    transform: translateX(400px);
}

.achievement-image {
    max-width: 300px;
    height: auto;
    object-fit: contain;
    display: block;
}

/* 弹窗遮罩 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    max-width: 60%;
    max-height: 60vh;
    object-fit: contain;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .portal-frame {
        width: 280px;
    }

    .game-elements {
        right: 15%;
    }

    .brand-logo {
        width: 100px;
        height: 100px;
    }

    .brand-logo-2 {
        width: 75px;
        height: 75px;
    }

    .brand-x {
        font-size: 36px;
    }

    .copyright {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .portal-frame {
        width: 200px;
        height: 300px;
    }

    /* 门向上移一点 */
    .portal-container {
        top: 45%;
    }

    /* 水桶移到门的下方 */
    .game-elements {
        right: auto;
        left: 50%;
        top: 70%;
        transform: translate(-50%, -50%);
    }

    /* 顶部logo再大一点 */
    .brand-logo {
        width: 100px;
        height: 100px;
    }

    .brand-logo-2 {
        width: 75px;
        height: 75px;
    }

    .brand-x {
        font-size: 36px;
    }

    .water-bucket {
        width: 60px;
        height: 60px;
    }

    /* 底部文字容器更宽 */
    .copyright {
        font-size: 10px;
        max-width: 90%;
        width: 90%;
    }

    /* 手机端访问统计 */
    .visit-counter {
        bottom: 100px;
        max-width: 90%;
        width: 90%;
        min-width: auto;
        padding: 6px 12px;
    }

    .counter-text {
        font-size: 10px;
    }

    .visit-count {
        font-size: 9px;
    }

    /* 手机端弹窗图片恢复原始尺寸 */
    .modal-image {
        max-width: 100%;
        max-height: 90vh;
    }

    /* 手机端成就弹窗 */
    .achievement-popup {
        top: 0;
        right: 0;
        left: 0;
        width: 100%;
        transform: translateY(-100%);
    }

    .achievement-popup.show {
        transform: translateY(0);
    }

    .achievement-popup.hide {
        transform: translateY(-100%);
    }

    .achievement-image {
        max-width: 100%;
        width: 100%;
    }
}

