body {
    background-color: #181A1B;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    position: relative;
}

.centered {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background-color: #181A1B;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.centered img {
    max-width: 40%;
    max-height: 40%;
}

.centered h2 {
    margin-top: 60px;
    font-size: 2.5em;
    opacity: 1;
}

.container {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 15%;
    top: 50%;
    transform: translateY(-50%);
}

.card {
    position: relative;
    width: 300px;
    height: 200px;
    background: #181A1B;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.card__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    background-color: #fff;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.card:hover .card__content {
    transform: translate(-50%, -50%) rotate(0deg);
    opacity: 1;
}

.card__title {
    margin: 0;
    font-size: 24px;
    color: #333;
    font-weight: 700;
}

.card__description {
    margin: 10px 0 0;
    font-size: 14px;
    color: #777;
    line-height: 1.4;
}

.card:hover img {
    scale: 0;
    transform: rotate(-45deg);
}

.container h1 {
    font-size: 2em;
    margin: 20px 0 0 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.container button {
    text-decoration: none;
    position: relative;
    border: none;
    font-size: 18px;
    font-family: inherit;
    cursor: pointer;
    color: #fff;
    width: 13em;
    height: 2em;
    line-height: 2em;
    text-align: center;
    background: linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
    background-size: 300%;
    border-radius: 30px;
    z-index: 1;
    margin-top: 20px;
    margin-bottom: 10px;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container button:hover {
    animation: ani 8s linear infinite;
    border: none;
}

@keyframes ani {
    0% {
        background-position: 0%;
    }
    100% {
        background-position: 400%;
    }
}

.container button:before {
    content: "";
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    z-index: -1;
    background: linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
    background-size: 400%;
    border-radius: 35px;
    transition: 1s;
}

.container button:hover::before {
    filter: blur(20px);
}

.container button:active {
    background: linear-gradient(32deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
}

.version {
    font-size: 0.88em;
    font-style: italic;
    color: #aaa;
    margin-top: 10px;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}


.image-container {
    position: absolute;
    top: 50%;
    left: 48%;
    transform: translateY(-50%) translateX(100%);
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: none;
}

.image-container img {
    width: 68%;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.648);
    transition: box-shadow 0.3s ease-in-out, transform 0.5s;
}

.social-buttons {
    position: absolute;
    top: 2%;
    left: 1%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f2f2f2;
    box-shadow: 0px 0px 15px #00000027;
    padding: 5px 7px;
    border-radius: 5em;
    opacity: 0;
    transition: opacity 1s ease;
    display: none;
  }
  
  .social-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 10px;
    background-color: #fff;
    box-shadow: 0px 0px 4px #00000027;
    transition: 0.3s;
  }
  
  .social-button:hover {
    background-color: #f2f2f2;
    box-shadow: 0px 0px 6px 3px #00000027;
  }
  
  .social-buttons svg {
    transition: 0.3s;
    height: 20px;
  }
  
  .github {
    background-color: #333;
  }
  
  .github svg {
    width: 20px;
    height: 20px;
    fill: #f2f2f2;
  }
  
  .github:hover svg {
    fill: #333;
  }
  
  .bilibili {
    background-color: #00A1D6;
  }
  
  .bilibili svg {
    width: 20px;
    height: 20px;
    fill: #f2f2f2;
  }
  
  .bilibili:hover svg {
    fill: #00A1D6;
  }

.details {
    background-color: #d75ab5;
  }
  
  .details svg {
    width: 20px;
    height: 20px;
    fill: #f2f2f2;
  }
  
  .details:hover svg {
    fill: #d75ab5;
  }




  .year{
    position: absolute;
    top: 96%;
    left: 1.4%;
    font-size: 0.58em;
    /*font-style: italic;*/
    color: #aaa;
    /*margin-top: 10px;*/
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

/* 添加响应式设计的媒体查询 */
@media screen and (max-width: 1200px) {
    .container {
        left: 10%;
    }
    
    .image-container {
        left: 45%;
    }
    
    .image-container img {
        width: 60%;
    }
}

@media screen and (max-width: 956px) {
    body {
        overflow-y: auto;
        align-items: center;
        padding: 20px 0;
        min-height: 100vh;
        display: flex;
    }

    .container {
        position: relative;
        left: 0;
        transform: none;
        padding: 20px;
        width: 90%;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 80vh;
    }
    
    .card {
        width: 280px;
        margin: 0 auto 20px auto;
    }
    
    .container h1 {
        margin: 15px 0;
    }
    
    .container button {
        margin: 10px auto;
    }
    
    .version {
        margin-top: 15px;
    }
    
    .social-buttons {
        position: fixed;
        top: 20px;
        left: 20px;
        bottom: auto;
        transform: none;
        z-index: 1000;
        background-color: rgba(242, 242, 242, 0.9);
        padding: 5px 7px;
        width: auto;
        display: flex;
    }
    
    .social-button {
        flex: 0 0 auto;
    }
    
    .year {
        position: fixed;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1000;
        background-color: rgba(24, 26, 27, 0.8);
        padding: 5px 10px;
        border-radius: 15px;
    }

    #mainContent {
        margin-bottom: 120px;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 10px 0;
    }

    .container {
        margin: 0 auto;
        min-height: 85vh;
    }

    .card {
        width: 240px;
    }
    
    .container h1 {
        font-size: 1.5em;
    }
    
    .container button {
        font-size: 16px;
        height: 2.5em;
    }
    
    .centered h2 {
        font-size: 1.4em;
    }
    
    .social-buttons {
        top: 10px;
        left: 10px;
        padding: 3px 5px;
    }
    
    .social-button {
        width: 35px;
        height: 35px;
        margin: 0 5px;
    }

    .version {
        font-size: 0.8em;
    }
}

/* 添加新的小屏幕设备优化 */
@media screen and (max-height: 600px) {
    .container {
        margin-top: 20px;
        margin-bottom: 80px;
    }

    .card {
        height: 180px;
    }

    .social-buttons {
        bottom: 30px;
    }

    .year {
        bottom: 5px;
    }
}

/* 添加防止溢出的样式 */
html, body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

/* 添加 emoji 动画相关样式 */
.emoji-bubble {
    position: fixed;
    pointer-events: none;
    animation: floatUp 1s ease-in-out forwards;
    font-size: 20px;
    z-index: 1000;
    user-select: none;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(var(--rotation));
        opacity: 0;
    }
}

/* 修改原有的渐显动画 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(100%, -50%); /* 从右侧开始，保持垂直居中 */
    }
    to {
        opacity: 1;
        transform: translate(0, -50%); /* 移动到原位，保持垂直居中 */
    }
}

/* 应用动画的元素样式 */
.slide-in {
    animation: slideIn 0.5s ease-out forwards;
    opacity: 0;
}

/* 当显示时的状态 */
.image-container.visible {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
}
