﻿@font-face {
    font-family: 'AlimamaShuHeiTi-Bold';
    src: url('00Tjad/AlimamaShuHeiTi-Bold.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 0;
    background-color: #000; /* Dark background */
    color: #fff; /* White text */
    width: 100vw; /* Use viewport width */
    height: 100vh; /* Use viewport height */
    overflow: hidden; /* Hide overflow */
    box-sizing: border-box;
    position: relative;
    background-image: url('00Tjad/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}



header {
    width: 100%;
    max-width: 1920px; /* Match body width */
    padding: 10px 40px; /* Reduced padding */
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    margin-bottom: 10px; /* Reduced margin */
    box-sizing: border-box;
}

.header-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center; /* Align items vertically in the center */
}

.tongji-logo {
    width: 150px; /* Adjust size as needed */
    height: auto;
    /* cursor: pointer; */ /* Removed cursor pointer as it's not a primary interactive element now */
}

.header-center {
    flex: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-title-img {
    width: 600px; /* 中上主LOGO调整大小 */
    height: auto;
    margin-bottom: 5px;
}

header h2 {
    font-family: 'AlimamaShuHeiTi-Bold', sans-serif;
    font-size: 24px;
    color: #fff;
    margin: 0;
}

.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    position: relative;
    right: 120px; /* 右上文字大小调整 */
}

#score-display {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 22px; /* Increase font size */
    line-height: 1.2;
    font-family: 'AlimamaShuHeiTi-Bold', sans-serif;
}

#score-display p {
    margin: 0;
    text-align: right;
    font-size: 32px; /* 右上五题三胜文字大小 */
}

#question-counter {
    font-size: 40px; /* 右上得分板文字大小调整 */
    font-weight: bold;
    color: #fff; /* Changed to white */
}

main {
    width: 100%;
    max-width: 1920px; /* Match body width */
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    min-height: 0;
    position: relative;
    bottom: 100px; /* Move up further */
}

.hidden {
    display: none !important;
}

#start-screen, #end-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.start-content {
    margin-top: 50px; /* Adjust spacing */
}

.action-button {
    cursor: pointer;
    transition: transform 0.2s ease;
    height: auto;
}

#start-game-btn {
    width: 600px; /* Set a width for the image button */
}

#restart-btn {
    width: 400px; /* Set a width for the image button */
}

.action-button:hover {
    transform: scale(1.05);
}

.rules-container {
    padding: 20px;
    max-width: 600px;
    text-align: center; /* Center the rules text */
    color: #fff;
    font-family: 'AlimamaShuHeiTi-Bold', sans-serif;
    margin-bottom: 50px; /* Add space between rules and button */
}

.rules-container h3 {
    text-align: center;
    margin-top: 0;
    color: #fff;
    font-size: 36px;
}

.rules-container p {
    font-size: 24px;
    line-height: 1.8;
}

.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    width: 100%;
    max-width: 1600px; /* Widen the container further */
    height: 45vh;
    margin-top: 20px;
}

.image-wrapper {
    width: 50%;
    height: 100%; /* Take full height of container */
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fill the container, cropping if necessary */
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease;
}



.image-container img:hover {
    transform: scale(1.02);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.6); /* Dark semi-transparent overlay */
    color: white;
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Allow clicks to pass through */
}

.overlay.show {
    opacity: 1;
}

.overlay.correct {
    background-color: rgba(46, 204, 113, 0.7); /* Green for correct */
}

.overlay.incorrect {
    background-color: rgba(231, 76, 60, 0.7); /* Red for incorrect */
}

.overlay-text {
    padding: 20px;
    border-radius: 5px;
}

#intro-text {
    margin-top: 20px; /* 修改文本框上下位置，如果是0就紧贴图片 */
    padding: 20px 30px;
    background-color: rgba(34, 34, 34, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    width: 100%;
    max-width: 1600px; /* Widen the text area further */
    box-sizing: border-box;
    min-height: 100px;
    color: #fff;
    flex-shrink: 0;
    display: flex;
    justify-content: center; /* 掉漆格式 flex-start左对齐 center居中*/
    align-items: center;
    font-size: 30px;/* 修改项目介绍文字的大小 */
    line-height: 1.6;
    font-family: 'AlimamaShuHeiTi-Bold', sans-serif;
}

#timer-container {
    font-size: 40px;
    font-weight: bold;
    color: #fff;
    position: relative;
    left: 120px; /* Move further to the right */
    font-family: 'AlimamaShuHeiTi-Bold', sans-serif;
}

#timer {
    color: #FFFFFF; /* Red color for timer */
}

#end-screen #end-message {
    font-size: 36px;
    font-family: 'AlimamaShuHeiTi-Bold', sans-serif;
    margin-bottom: 30px;
}

#end-screen #final-score {
    font-size: 28px;
    font-weight: bold;
    margin-top: 20px;
}

#results-container {
    text-align: left;
    margin: 20px auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    max-width: 600px;
    color: #fff;
}

#results-container h3 {
    text-align: center;
    color: #fff;
}

#results-container p {
    margin: 5px 0;
}
