* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    height: 100vh;
    overflow: hidden;
}

#background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#background {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 0 20px;
}

#search-container {
    position: relative;
    width: 100%;
    max-width: 600px;
}

#search-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    outline: none;
    transition: all 0.3s ease;
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#search-input:focus {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.15);
}

#suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

#suggestions.show {
    display: block;
}

#suggestions div {
    padding: 12px 20px;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
}

#suggestions div[style*="pointer-events: none"] {
    cursor: default;
}

#suggestions div[style*="pointer-events: none"]:hover {
    background: transparent;
}

#suggestions div:first-of-type {
    border-radius: 30px 30px 0 0;
}

#suggestions div:last-child {
    border-radius: 0 0 30px 30px;
}

#suggestions div:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 左上角设置区域 */
#settings-area {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

#settings-button {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
}

#settings-area:hover #settings-button {
    opacity: 1;
    transform: translateY(0);
}

#settings-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

#settings-panel {
    position: absolute;
    top: 50px;
    left: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 20px;
    min-width: 250px;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

#settings-panel.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.settings-section {
    margin-bottom: 20px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 16px;
}

.search-engine-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.engine-option {
    display: flex;
    align-items: center;
    color: white;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.engine-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.engine-option input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
}

#upload-button-settings,
#reset-background {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 15px;
    border-radius: 15px;
    cursor: pointer;
    text-align: center;
    margin-bottom: 10px;
    transition: background 0.3s ease;
}

#upload-button-settings:hover,
#reset-background:hover {
    background: rgba(255, 255, 255, 0.3);
}

#reset-background {
    margin-bottom: 0;
    background: rgba(255, 100, 100, 0.2);
}

#reset-background:hover {
    background: rgba(255, 100, 100, 0.3);
}

#file-input {
    display: none;
}

/* 右上角上传按钮 */
#upload-area {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

#upload-button {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

#upload-area:hover #upload-button {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#upload-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

#welcome-guide {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

#welcome-guide.hidden {
    display: none;
}

.guide-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    color: white;
    text-align: center;
}

.guide-content h2 {
    margin-bottom: 20px;
    font-size: 24px;
}

.guide-content p {
    margin-bottom: 20px;
    font-size: 16px;
    opacity: 0.9;
}

.guide-content ul {
    list-style: none;
    margin-bottom: 30px;
    text-align: left;
}

.guide-content li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.guide-content li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: white;
}

#close-guide {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#close-guide:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    #search-input {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .guide-content {
        padding: 30px;
        margin: 0 20px;
    }
    
    #settings-panel {
        min-width: 200px;
    }
}

/* 滚动条样式 */
#suggestions::-webkit-scrollbar {
    width: 6px;
}

#suggestions::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

#suggestions::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

#suggestions::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}