/* index.css */
/* index.html */

body {
    font-family: sans-serif;
    background-color: #f4f4f9;
    color: #333;
    margin: 0 auto;
    padding: 0;
    max-width: 1024px;
    overflow-x: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    height: 600px;
}

.no-select {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

h1,
h3 {
    color: #2e2d3b;
}

h1 {
    font-size: 28px;
    margin-top: 30px;
    margin-bottom: 10px;
    text-align: center
}

h3 {
    font-size: 16px;
    margin: 0px;
    text-align: right;
    color: #888;
}

p {
    background-color: #ebebeb;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    display: inline-flex;
    color: #2e2d3b;
}

.line-container {
    display: flex;
    justify-content: center;
    margin-top: 80px;
}

.key-input {
    padding-left: 15px;
    border: 1px solid #dddddd00;
    outline: none;
    width: 60%;
    height: 50px;
    border-radius: 5px 0 0 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    font-size: 22px;
    letter-spacing: 2px;
    text-align: center;
}

.key-button {
    width: 120px;
    height: 50px;
    line-height: 50px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 18px;
    text-align: center;
    background-color: #28a745;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: white;
    user-select: none;
    transition: 0.3s ease;
}

.key-button:active {
    background-color: #218838;
}

.message {
    opacity: 0;
    background-color: #ebebeb;
    color: red;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    width: 120px;
    margin: 10px auto;
    transition: 0.3s ease;
}

.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

@media (max-width: 768px) {
    .key-button {
        width: 80px;
        font-size: 16px;
    }
}

/* 深色模式 */
body.dark-mode {
    background-color: #333;
    color: #ffffffd6;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

body.dark-mode h1,
h3 {
    color: #888;
}

body.dark-mode h2 {
    color: #f9703ddb;
    border-bottom: 2px solid #ffcdbb8f;
}

body.dark-mode p {
    background-color: #555555;
    color: #ffffffd6;
}

body.dark-mode .message {
    background-color: #555555;
    color: #ffff99d6;
}

body.dark-mode .key-input {
    background-color: #555555;
    color: #ffffffd6;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

body.dark-mode .key-button {
    color: #2e2d3b;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

@media (hover: hover) {
    .key-button:hover {
        background-color: #218838;
    }
}