* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
}

body {
    background-color: #1a1a2e;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    color: #e6e6e6;
}

.container {
    background-color: #16213e;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 800px;
    padding: 30px;
    border: 1px solid #30475e;
}

#game-title {
    text-align: center;
    margin-bottom: 30px;
}

#game-title h1 {
    color: #f05454;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

.level {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.level.active {
    display: block;
}

.level h2 {
    color: #f05454;
    margin-bottom: 20px;
    font-size: 1.8rem;
    border-bottom: 1px solid #30475e;
    padding-bottom: 10px;
}

.level p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #e6e6e6;
}

.input-area {
    display: flex;
    margin-bottom: 20px;
}

.input-area input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #30475e;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
    background-color: #1a1a2e;
    color: #e6e6e6;
}

.input-area input:focus {
    border-color: #f05454;
}

.input-area button {
    background-color: #f05454;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1rem;
}

.input-area button:hover {
    background-color: #d83a3a;
}

.controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 30px;
}

#level-indicator {
    font-size: 1rem;
    color: #e6e6e6;
    font-weight: bold;
    padding: 8px 15px;
    background-color: #30475e;
    border-radius: 5px;
}

.code-block {
    background-color: #121726;
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    border-left: 4px solid #f05454;
    color: #e6e6e6;
    font-size: 1.1rem;
    text-align: center;
}

.enigma {
    background-color: #121726;
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
    overflow-x: auto;
    text-align: center;
}

.enigma pre {
    font-family: monospace;
    color: #e6e6e6;
    white-space: pre;
    line-height: 1.2;
}

.final-puzzle {
    display: flex;
    justify-content: center;
    margin: 25px 0;
}

.final-puzzle span {
    display: inline-block;
    width: 60px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    font-size: 1.5rem;
    margin: 0 10px;
    background-color: #121726;
    border: 2px solid #30475e;
    border-radius: 5px;
    color: #f05454;
    font-weight: bold;
}

.final-hint {
    text-align: center;
    font-style: italic;
    color: #a0a0a0;
    font-size: 1rem;
}

.reverse-text {
    font-size: 1.5rem;
    letter-spacing: 3px;
    color: #f05454;
    font-weight: bold;
    display: inline-block;
    padding: 10px;
}

.celebration {
    display: flex;
    justify-content: center;
    font-size: 3rem;
    margin: 30px 0;
}

.celebration span {
    margin: 0 10px;
    animation: bounce 0.5s infinite alternate;
}

.celebration span:nth-child(2) {
    animation-delay: 0.1s;
}

.celebration span:nth-child(3) {
    animation-delay: 0.2s;
}

.secret-message {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    color: #f05454;
    margin: 20px 0;
    min-height: 60px;
    animation: fadeIn 0.8s forwards;
}

.secret-message.highlight {
    text-shadow: 0 0 10px #f05454, 0 0 20px #f05454;
    animation: pulse 2s infinite;
}

/* 音乐奖励样式 */
.music-reward {
    margin: 30px 0;
    text-align: center;
    animation: fadeIn 1.2s forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

.music-reward p {
    font-size: 1.1rem;
    color: #a0a0a0;
    margin-bottom: 15px;
}

.music-link {
    display: inline-block;
    background-color: #121726;
    color: #f05454;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: bold;
    border: 2px solid #30475e;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.music-link:hover {
    background-color: #f05454;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(240, 84, 84, 0.3);
}

.music-link.special-highlight {
    animation: linkPulse 2s infinite;
}

@keyframes linkPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(240, 84, 84, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(240, 84, 84, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(240, 84, 84, 0);
    }
}

.music-icon {
    font-size: 1.3rem;
    margin-right: 8px;
    display: inline-block;
    animation: musicBounce 1.5s infinite alternate;
}

@keyframes musicBounce {
    0% {
        transform: scale(1) rotate(0deg);
    }
    100% {
        transform: scale(1.2) rotate(5deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.completion-text {
    text-align: center;
    font-style: italic;
    margin-top: 10px;
    color: #a0a0a0;
}

button {
    background-color: #f05454;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1rem;
}

button:hover {
    background-color: #d83a3a;
}

#game-complete button {
    display: block;
    margin: 20px auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-15px);
    }
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    #game-title h1 {
        font-size: 2rem;
    }
    
    .level h2 {
        font-size: 1.5rem;
    }
    
    .level p {
        font-size: 1rem;
    }
    
    .final-puzzle span {
        width: 45px;
        height: 45px;
        line-height: 45px;
        font-size: 1.2rem;
    }
} 