/* 总布局 */
* {
    padding: 0;
    margin: 0;
}
ul li {
    list-style: none;
}
button:hover {
    outline: 0;
    border: 1px #ddd solid;
    color: rgb(26, 11, 240);
}
body {
    background-color: #57C085;
}

/* 总容器 */
#main {
    width: 99%;
    height: 99vh;
    margin: .1rem auto;
}

/*左边或上半部区域*/
#leftItem {
    height: 19%;
    background: #EDF8F2;
}

/* 左边头部 */
#leftTitle {
    line-height: 1.5rem;
    color: #27AE61;
    display: flex;           /* 启用弹性布局 */
    justify-content: center; /* 子元素水平居中 */
}

/* 左边或上半部本站说明内容 */
#information {
    padding: 0.2rem 0;
    font-size: 0.6rem;
    margin: 0.15rem 0.25rem;
}
#information p {
    padding: 0.1rem;
}

/* 右边或下半部区域 */
#rightItem {
    background: #fff;
    float: left;
    position: relative;
    box-sizing: border-box;
    font-size: 0.9rem;
    width: 100%;
    height: 81%;
}

/* 右边或下半部的提示信息 */
#info {
    width: 100%;
    height: 1.4rem;
    line-height: 1.4rem;
    background-color: #F2F2F2;
    font-family: "宋体";
    text-indent: 0.25rem;
    color: #333;
    margin-bottom: 0.5rem;
}


/* 下半部中部的主体 */
#fathers {
    perspective: 28rem;
    min-height: 75%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #6fabe7;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}
#dinosaurTitle { font-size: 1.25rem; color: #333; margin-bottom: 0.5rem; }
.hint { color: #666; font-size: 0.75rem; margin-bottom: 1rem; text-align: center; max-width: 800px; }
.game-wrap {
    width: 800px;
    max-width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #2c3e50;
    color: #fff;
}
.toolbar-title { font-size: 0.7rem; opacity: 0.9; }
.toolbar-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.toolbar button {
    padding: 0.35rem 0.45rem;
    border: none;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    color: #fff;
    background: #4a90d9;
}
.toolbar button:hover { background: #357abd; }
.toolbar button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.toolbar button.danger { background: #c0392b; }
.toolbar button.danger:hover { background: #a93226; }
.toolbar button.muted { background: #7f8c8d; }
.toolbar button.muted:hover { background: #636e72; }

#gameCanvas {
    display: block;
    width: 100%;
    height: auto;
    touch-action: none;
    background: #fff;
}
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.overlay.show { display: flex; }
.dialog {
    position: relative;
    background: #fff;
    padding: 1.5rem 2rem 1.25rem;
    border-radius: 8px;
    text-align: center;
    min-width: 260px;
    max-width: 90vw;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.dialog-close {
    position: absolute;
    top: 0.5rem;
    right: 0.6rem;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #888;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}
.dialog-close:hover {
    background: #f0f0f0;
    color: #333;
}

.dialog h2 { color: #c00; margin-bottom: 0.75rem; font-size: 1.1rem; padding-right: 1.5rem; }
.dialog .score-line {
    color: #333;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}
.dialog p { margin: 0.35rem 0; color: #555; }
.dialog-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}
.dialog button {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 4px;
    background: #4a90d9;
    color: #fff;
    cursor: pointer;
    font-size: 0.8rem;
}
.dialog button:hover { background: #357abd; }
.dialog button.btn-secondary {
    background: #7f8c8d;
}
.dialog button.btn-secondary:hover { background: #636e72; }
#exitPanel {
    display: none;
    text-align: center;
    padding: 2rem 1rem;
    color: #555;
}
#exitPanel.show { display: block; }
#exitPanel p { margin-bottom: 1rem; font-size: 0.9rem; }
#exitPanel button {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 4px;
    background: #4a90d9;
    color: #fff;
    cursor: pointer;
    font-size: 0.75rem;
}
#exitPanel button:hover { background: #357abd; }

/*隐藏“最简化窗口”按钮*/
#main-body-right {
    display: none;
}
