body {
    font-family: Arial, sans-serif;
    text-align: center;
    margin: 0;
    padding-top: 60px;
}

h1 {
    font-size: 2.5em;
    font-weight: bold;
}

h2 {
    font-size: 1.8em;
    color: #333;
}

p {
    font-size: 1.2em;
    color: #555;
}

.random {
    margin-top: 25px;
    padding: 12px 20px;
    font-size: 1.1em;
    cursor: pointer;
    background-color: #035993;
    color: white;
    border: none;
    border-radius: 22px;
    transition: background-color 0.3s ease;
}

.random:hover {
    background-color: #062f89;
}

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #f8f9fa;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(100, 100, 100, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 999;
    height: 40px;
}

.top-bar h1 {
    font-size: 1.5em;
    margin: 0;
}

.search-box {
    display: flex;
    align-items: center;
    flex: 1;
    margin-right: 10px;
}

.search-box input {
    padding: 8px 12px;
    font-size: 1em;
    border: 1px solid #ddd;
    border-radius: 20px;
    transition: border-color 0.3s ease;
    outline: none;
    width: 100%;
}

.search-box input:focus {
    outline: 0px;
}

.topBarMenuButton{
    margin-top: 5px;
    margin-right: 10px;
}

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    border-radius: 19px;
    z-index: 1000;
    max-width: 300px;
    width: 80%;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    text-align: left;
}

.modal h2 {
    margin-top: 0;
    font-size: 1.5em;
    color: #333;
}

.modal label {
    display: block;
    margin: 10px 0 5px;
    font-size: 1em;
    color: #555;
}

.modal input,
.modal select {
    width: 100%;
    padding: 8px;
    font-size: 1em;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
}

.modal select[multiple] {
    height: 100px;
    overflow-y: auto;
}

.modal button {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    margin-top: 5px;
    background-color: #035993;
    color: white;
    border: none;
    border-radius: 15px;
    transition: background-color 0.3s ease;
}

.modal button:hover {
    background-color: #062f89;
}

.dropdown{
    margin-right: 35px;
}

#menu {
    margin-top: 15vh;
}

#searchResults {
    margin-top: 20px;
}

.search-result-item {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #f9f9f9;
    margin-left: 5%;
    margin-right: 5%;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.modal input[type="number"] {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    font-size: 1em;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
}

.close-btn {
    background-color: #035993;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background-color: #062f89;
}

.dropdown-list {
    margin-top: 20px;
}

.dropdown-item {
    display: block;
    padding: 15px;
    margin-bottom: 2px;
    border-radius: 5px;
    background-color: #f9f9f9;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background-color: #f1f1f1;
}

.upload-alert {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 25px;
    animation: fadeOut 2s forwards;
}

.modal input:focus,
.modal select:focus {
    outline: none;
}

.topBarMenuButton {
    padding: 3px;
    border-radius: 10px;
    transition: background-color 0.01s ease
}

.topBarMenuButton:active {
    background-color: #3b3b3b25;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

/* 深色模式样式 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
    }

    h2 {
        color: #e0e0e0;
    }

    p {
        color: #b0b0b0;
    }

    .top-bar {
        background-color: #121212;
    }

    .search-box input {
        border: 1px solid #424242;
        background-color: #1e1e1e;
        color: #e0e0e0;
    }

    .modal {
        background: #121212;
        color: #e0e0e0;
    }

    .modal-overlay {
        background: #000000cc;
    }

    .modal h2 {
        color: #e0e0e0;
    }

    .modal label {
        color: #b0b0b0;
    }

    .modal input,
    .modal select {
        border: 1px solid #424242;
        background-color: #1e1e1e;
        color: #e0e0e0;
    }

    .modal select[multiple] {
        height: 100px;
        background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23e0e0e0" d="M2 0L0 2h4z"/></svg>') no-repeat right 10px center;
    }

    .modal select option {
        background-color: #1e1e1e;
        color: #e0e0e0;
    }

    #searchResults .search-result-item {
        border: 1px solid #424242;
        background-color: #1e1e1e;
    }

    .modal a {
        color: #e0e0e0;
    }

    .modal a:hover {
        background-color: #333;
    }

    .close-btn {
        background-color: #035993;
        color: white;
    }

    .close-btn:hover {
        background-color: #062f89;
    }

    .dropdown-list {
        margin-top: 20px;
    }

    .dropdown-item {
        background-color: #1e1e1e;
        color: #e0e0e0;
    }

    .dropdown-item:hover {
        background-color: #333;
    }

    .upload-alert {
        background: #ffffffe6;
        color: #121212;
    }
}