canvas {
  touch-action: none;
  transition: pointer-events 0.3s;
}

.pause-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  font-size: 2em;
  color: #bfd1e9;
  z-index: 1000;
  pointer-events: auto;
}

.pause-overlay::after {
  content: '游戏已暂停';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(122, 170, 232, 0.9);
  color: white;
  padding: 20px 20px;
  border-radius: 10px;
  font-size: 1em;
  pointer-events: none;
}

.seed-content {
    margin: 10px;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.seed-input {
    font-size: 0.6em;
    width: 20em;
    text-align: center;
}

.cheat-sheet-table {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.cheat-sheet-content {
    display: grid;
    grid-template-columns: 70px 40px 40px;
    border: #2c3e50 solid 1px;
    /* padding: 3px; */
}

.cheat-sheet-content span {
    font-size: 0.7em;
    color: #95a5a6;
}

.cheat-sheet-container {
    display: flex;
    flex-direction: column;
    padding: 5px;
}

.cheat-sheet-current {
    color: green;
}

body {
    margin: 0;
    padding: 20px 20px 0;
    display: flex;
    justify-content: center;
    background: #F0F8FF;
    min-height: 100vh;
    box-sizing: border-box;
}

.game-container {
    width: 100%;
    max-width: 400px;
    min-height: calc(100vh - 80px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

button {
    padding: 5px 8px;
    /* margin: 0 1px; */
    background: #2E5D9A;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.game-panel {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    margin-bottom: 10px;
}

.info-panel {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 20px;
    padding: 8px 10px;
    background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(240,244,249,0.9));
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(46,93,154,0.1);
    border: 1px solid rgba(255,255,255,0.4);
    backdrop-filter: blur(5px);
    margin-right: 10px;
}

.info-panel > div {
    align-items: center;
    background: linear-gradient(135deg, rgba(46,93,154,0.08), rgba(255,255,255,0.12));
    border-radius: 6px;
}

.info-panel i {
    font-size: 18px;
    margin-right: 1px;
    color: #2E5D9A;
}

.info-panel span {
    font-family: 'Arial Rounded MT Bold', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(46,93,154,0.1);
    transition: transform 0.2s ease;
    width: 2em
}

.btn-icon {
    margin: 10px;
}

@keyframes scaleEffect {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.value-updated {
    animation: scaleEffect 0.3s ease-in-out;
}

.info-item {
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(46,93,154,0.1);
}

.info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46,93,154,0.2);
}

@media (max-width: 768px) {
    .info-item:hover {
        transform: none;
    }

    .info-panel {
        padding: 8px 1px;
        /* gap: 15px; */
    }

    .info-panel i {
        font-size: 18px;
        margin-right: 1px;
    }

    .info-panel .value {
        font-size: 10px;
        width: 33px;
    }
    
    .info-panel span {
        font-size: 10px;
    }

    button {
        padding: 5px 5px;
        /* margin: 0 1px; */
        background: #2E5D9A;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 8px;
    }
    
    .btn-icon {
        margin: 8px;
    }
}

@media (max-width: 480px) {
    .info-panel {
        flex-direction: row;
        width: 100%;
    }
}

.control-panel {
    display: flex;
    gap: 5px;
    position: relative;
}

.menu-container {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #2E5D9A;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 100;
    min-width: 80px;
}

.dropdown-menu.show {
    opacity: 1;
    transform: translateY(5px);
    pointer-events: auto;
}

.dropdown-menu button {
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    background: transparent;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.dropdown-menu button:hover {
    background: rgba(255,255,255,0.1);
}

#rankRulesModal .game-over-box {
    max-width: 320px;
    padding: 1rem 2rem;
}

#rank-rules-container {
    margin: 1rem 0;
    text-align: left;
}

.rank-rule {
    display: flex;
    align-items: left;
    padding: 1px 0;
    border-bottom: 1px solid #eee;
}

.rank-rule i {
    font-size: 1.2em;
    margin-right: 12px;
    width: 30px;
}

button:hover {
    background: #357ABD;
}

.pause-content button {
    padding: 10px 15px;
    font-size: 18px;
}

.pause-content button {
    padding: 10px 15px;
    font-size: 18px;
}

.game-over-box button {
    padding: 10px 15px;
    font-size: 18px;
}

@media (max-width: 600px) {
    #gameCanvas {
        width: auto;
        max-width: min(100%, 80dvh);
        height: auto;
        max-height: min(100%, 80dvh);
    }
    .game-container {
        min-height: calc(100dvh - 60px);
        display: flex;
        flex-grow: 1;
    }
    .dropdown-menu {
        min-width: 60px;
    }
}


/* 游戏结束弹窗样式 */
.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
    animation: fadeIn 0.3s;
}
.game-overlay.show {
    display: flex;
}
.game-overlay.visible {
    opacity: 1;
}
.game-over-box {
    background: white;
    padding: 4rem;
    border-radius: 15px;
    text-align: center;
    transform: scale(0);
    animation: zoomIn 0.3s 0.2s forwards;
}

.cheat-sheet-box {
    background: white;
    padding: 2rem 4rem;
    border-radius: 15px;
    text-align: center;
    transform: scale(0);
    animation: zoomIn 0.3s 0.2s forwards;
}

/* 等级特效样式 */
.rank-title {
    font-size: 2.5rem;
    margin: 0 0 1rem;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* 添加更多等级样式... */

.rank-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    object-fit: contain;
}
.rank-icon-small {
    width: 30px;
    height: 30px;
    padding: 5px 5px;
    object-fit: contain;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    to { transform: scale(1); }
}


/* 新增段位图标样式 */
.rank-icon::before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.rank-icon-small::before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 600;
    font-size: 1.5rem;
    display: block;
    margin-bottom: 1rem;
}

.rank-king::before {
    content: '\f091';
    color: #ffd700;
}

.rank-doctor::before {
    content: '\f5d2';
    color: #2E5D9A;
}

.rank-master::before {
    content: '\f610';
    color: #4a90e2;
}

.rank-985::before {
    content: '\f544';
    color: #e74c3c;
}

.rank-211::before {
    content: '\f19d';
    color: #3498db;
}

.rank-college::before {
    content: '\f19c';
    color: #2ecc71;
}

.rank-junior::before {
    content: '\f518';
    color: #95a5a6;
}

/* 新增段位图标 */
.rank-vocational::before {
    content: '\e56e';
    color: #666666;
}

.rank-high::before {
    content: '\f549';
    color: #2c3e50;
}

.rank-middle::before {
    content: '\e53d';
    color: #27ae60;
}

.rank-primary::before {
    content: '\f303';
    color: #e67e22;
}

.rank-preschool::before {
    content: '\f77d';
    color: #ffb6c1;
}


.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    /* padding: 8px 12px; */
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
    backdrop-filter: blur(5px);
}

.label {
    font-size: 14px;
    background-image: linear-gradient(45deg, #2c3e50 30%, #3498db 70%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.value {
    font-weight: 700;
    font-size: 14px;
    background-image: linear-gradient(45deg, #2E5D9A 30%, #4CAF50 70%);
    background-clip: text;
    color: transparent;
    width: 33px;
}

.version {
    font-size: 12px;
    color: #bebebe;
}

#css-version::before {
    content: 'v1.0.4';
}