/* 背景设置 */
body {
    position: relative;
}

body::before {
    content: "";
    background-image: url('source/bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}


/* 脚注设置 */
footer {
    background-color: #fef3c7;
    /* 浅黄色背景 */
    color: #7c2d12;
    /* 深橘红字体 */
    font-size: 14px;
    padding: 20px;
    text-align: center;
    border-top: 2px solid #f59e0b;
    /* 顶部边框 */
    font-weight: bold;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
}

/* 排版设置 */
.main-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.topspace {
    height: 5%;
}

.topbar {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    width: 80%;
    height: 23%;
    margin: auto;
    padding-bottom: 5px;
    box-sizing: border-box;
    scrollbar-width: thin;
}

.intro-content {
    width: 80%;
    height: 50%;
    margin: auto;
    margin: 40px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
}

.bottomspace {
    height: 15%;
}

/* 顶部栏 */
.topbar ul {
    list-style-type: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.topbar li {
    flex: 0 0 auto;
    margin-right: 1px;
}

.topbar li a {
    margin-bottom: 4px;
    display: block;
    padding: 2px;
    background-color: #eee;
    text-decoration: none;
    color: #666;
}

.topbar li a:hover {
    background-color: #555;
    color: white;
}

.topbar li a.active {
    background-color: #008CBA;
    color: white;
}

/* 角色图片 */
.bar-img {
    height: 100%;
    width: auto;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    border-radius: 4px;
}

.bar-img.inactive {
    opacity: 0.8;
    transform: scale(0.9);
}

.bar-img.inactive:hover {
    opacity: 0.9;
    transform: scale(0.95);
}

.bar-img.active {
    opacity: 1.0;
    border-color: #008CBA;
    transform: scale(1.0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 介绍栏 */
.intro-title {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
}

.intro-text {
    font-size: 16px;
    text-align: center;
    line-height: 1.5;
}

.acknowledgements {
    font-size: 14px;
    text-align: center;
    line-height: 1.2;
}

.acknowledgements a {
    text-decoration: none;
}

/* 按钮样式 */
.intro-btn {
    justify-content: center;
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-top: 30px;
    padding: 0 20px;
}

.intro-btn a {
    text-decoration: none;
}

.intro-btn-easy, .intro-btn-adv {
    
    width: 200px;
    display: block;
    padding: 10px 0;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    color: white;
    background: 
        linear-gradient(135deg, #667eea 0%, #764ba2 100%) padding-box,
        linear-gradient(135deg, #667eea, #764ba2, #ff758c, #ff7eb3) border-box;
    border: 4px solid transparent;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}


.intro-btn-easy:hover, .intro-btn-adv:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%)padding-box;
}

/* 计时器样式 */
.timer-container {
    width: 100%;
    text-align: center;
    margin: 20px 0;
}

.timer {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 九宫格样式 */
.grid-container {
    display: grid;
    gap: 10px;
    width: 70vh;
    height: 70vh;
    margin: 20px auto;
}

.grid-item {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.grid-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 九宫格图片样式 */
.grid-img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.grid-item:hover .grid-img {
    transform: scale(1.1);
}

.grid-item.disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
    transition: opacity 0.3s ease;
}

.grid-item.found {
    border: 3px solid #4CAF50;
    background-color: rgba(76, 175, 80, 0.1);
    animation: foundPulse 0.5s ease;
}

.grid-item.error-click {
    border: 3px solid #F44336;
    background-color: rgba(244, 67, 54, 0.1);
    animation: errorPulse 0.5s ease;
}

@keyframes foundPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes errorPulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* 其他 */
.part h2 {
    text-align: center;
    font-size: 2rem;
    margin: 20px 0;
    color: #333;
}
