* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Courier New', monospace;
    background-color: #e6f7ff;
    color: #000;
    overflow: hidden;
    user-select: none;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

#container {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 200;
}

.char-cell {
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.control-panel {
    width: 95%;
    height: 95%;
    max-width: 1500px;
    max-height: 900px;
    background-color: #0a2a5e;
    border: 4px solid #4da6ff;
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 0 30px rgba(0, 0, 255, 0.7);
    position: relative;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.button-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto auto;
    gap: 30px;
    margin: auto auto 40px auto;
    max-width: 1200px;
    width: 100%;
}

.file-button {
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    background-color: #f0f0f0;
    color: #333;
    border: 3px solid #666;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 4px 4px 0px #999;
    transition: all 0.2s ease;
    font-family: 'Courier New', monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
    position: relative;
    min-height: 80px;
    transition: min-height 0.3s ease;
}

.file-button.has-icon {
    min-height: 180px;
}

.no-icon-button {
    min-height: 60px !important;
    padding: 8px 15px !important;
}

.button-icon-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    min-height: 128px;
    align-items: center;
}

.button-icon {
    width: 128px;
    height: 128px;
    object-fit: contain;
    background-color: transparent;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.button-label {
    width: 100%;
    text-align: left;
    padding-left: 10px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 10px;
}

.no-icon-button .button-label {
    margin-top: 0 !important;
    padding-top: 5px;
    padding-bottom: 5px;
}

.button-id {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background-color: #ff6666;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 0 3px rgba(0,0,0,0.5);
    display: none;
}

.file-button:hover {
    background-color: #e0e0e0;
    transform: translate(3px, 3px);
    box-shadow: 1px 1px 0px #999;
}

.file-button:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px #999;
}

.exe-button {
    background-color: #ffcccc;
}

.wav-button {
    background-color: #ccffcc;
}

.destruct-button {
    background-color: #ff6666;
    color: white;
}

.hidden-button {
    background-color: #333333;
    color: #000;
    cursor: default;
}

.last-row {
    grid-column: span 3;
    display: flex;
    gap: 30px;
}

.last-row button {
    flex: 1;
    width: 100%;
}

.divider-container {
    margin-top: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-top: 30px;
}

.divider {
    height: 3px;
    background-color: #4da6ff;
    margin-bottom: 20px;
    box-shadow: 0 0 5px rgba(77, 166, 255, 0.8);
    width: calc(100% - 100px);
    max-width: 100%;
}

.footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: calc(100% - 100px);
    padding: 0 20px;
    gap: 15px;
}

.main-interface {
    color: white;
    font-size: 26px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 8px #4da6ff;
}

.time-display {
    color: white;
    font-size: 30px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 8px #4da6ff;
}

.console-instructions {
    position: absolute;
    bottom: 10px;
    left: 10px;
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    font-family: 'Courier New', monospace;
    background-color: rgba(0,0,0,0.3);
    padding: 5px 10px;
    border-radius: 5px;
    display: none;
}

.no-icon-container {
    min-height: 24px !important;
    margin-bottom: 15px !important;
}

.no-icon-label {
    margin-top: 0 !important;
}

/* 管理员批注窗口样式 */
.admin-panel {
    width: 95%;
    height: 95%;
    max-width: 1500px;
    max-height: 900px;
    background-color: #0a2a5e;
    border: 4px solid #4da6ff;
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 0 30px rgba(0, 0, 255, 0.7);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 250;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-header {
    text-align: center;
    color: white;
    font-size: 32px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 8px #4da6ff;
    margin-bottom: 30px;
    padding: 10px 0;
    border-bottom: 2px solid #4da6ff;
}

.admin-content {
    flex: 1;
    color: white;
    font-size: 18px;
    font-family: 'Courier New', monospace;
    line-height: 1.8;
    overflow-y: auto;
    padding-left: 40px;
    padding-right: 20px;
    margin-bottom: 30px;
}

.admin-content p {
    margin-bottom: 15px;
}

.admin-close {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    font-size: 18px;
    font-weight: bold;
    background-color: #ff6666;
    color: white;
    border: 2px solid #cc0000;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 3px 3px 0px #999;
    transition: all 0.2s ease;
}

.admin-close:hover {
    background-color: #ff3333;
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px #999;
}

.admin-close:active {
    transform: translate(3px, 3px);
    box-shadow: 0px 0px 0px #999;
}

/* 自毁效果样式 */
.destruction-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 150;
    animation: flash 0.1s infinite;
}

@keyframes flash {
    0% { background-color: #ff0000; }
    50% { background-color: #ffffff; }
    100% { background-color: #ff0000; }
}

.destruction-frame {
    width: 95%;
    height: 95%;
    max-width: 1500px;
    max-height: 900px;
    background-color: #8b0000;
    border: 4px solid #ff0000;
    border-radius: 20px;
    padding: 50px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 180;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.8);
    overflow: hidden;
}

.bg-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 160;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bg-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border: 3px solid #ff6666;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.bg-image.active {
    opacity: 1;
}

.progress-wrapper {
    margin-top: auto;
    width: 100%;
    background-color: rgba(255, 102, 102, 0.85);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border: 2px solid #ff3333;
    backdrop-filter: blur(2px);
    z-index: 190;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-wrapper.centered {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.5);
    margin-top: 0;
    width: 80%;
    max-width: 800px;
    z-index: 210;
}

.progress-title {
    background-color: #ff6666;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 22px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.4);
    border: 2px solid #ff3333;
}

.progress-percentage-display {
    color: white;
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    margin: 25px 0;
    text-shadow: 0 0 8px rgba(0,0,0,0.7);
    font-family: 'Courier New', monospace;
}

.progress-bar {
    height: 40px;
    background-color: #1a0000;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 3px solid #440000;
    box-shadow: 0 3px 10px rgba(0,0,0,0.6);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(
            45deg,
            #ff0000 25%,
            #cc0000 25%,
            #cc0000 50%,
            #ff0000 50%,
            #ff0000 75%,
            #cc0000 75%,
            #cc0000 100%
    );
    background-size: 40px 40px;
    animation: progress-stripes 2s linear infinite;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
    overflow: hidden;
}

@keyframes progress-stripes {
    0% { background-position: 0 0; }
    100% { background-position: 40px 0; }
}

.black-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 300;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.black-screen.active {
    opacity: 1;
}

.text-output {
    position: fixed;
    top: 20px;
    left: 20px;
    color: #ff69b4;
    font-size: 20px;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    line-height: 1.8;
    z-index: 310;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.text-output.active {
    opacity: 1;
}