/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    background-color: #0d0d0d;
    color: #f0f0f0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(255, 0, 0, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 85% 30%, rgba(255, 255, 0, 0.05) 0%, transparent 20%);
}

/* Glassmorphism container */
.container {
    width: 100%;
    max-width: 800px;
    padding: 40px;
    background: rgba(20, 20, 20, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 28px;
    background: linear-gradient(135deg, #FF0000, #FFFF00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-text {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #FF0000, #FFFF00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Main Content */
.main-content {
    margin-bottom: 40px;
}

/* Search Container */
.search-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

/* Search Engine Selector */
.search-engine-selector {
    display: flex;
    align-items: center;
    background: rgba(30, 30, 30, 0.8);
    border-radius: 25px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 220px;
    margin: 0 auto;
    position: relative;
}

.selector-icon {
    padding: 0 14px;
    color: #FF0000;
}

/* Custom Dropdown */
.custom-dropdown {
    flex-grow: 1;
    position: relative;
    cursor: pointer;
}

.dropdown-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    color: #f0f0f0;
}

.selected-text {
    font-size: 16px;
    font-weight: 500;
    color: #f0f0f0;
}

.dropdown-arrow {
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
}

.custom-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 103%;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.custom-dropdown.active .dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f0f0f0;
}

/* Search Engine Icons */
.engine-icon {
    width: 24px;
    height: 24px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.google-icon {
    background-image: url('Google.png');
}

.bing-icon {
    background-image: url('Bing.png');
}

.baidu-icon {
    background-image: url('Baidu.png');
}

.localai-icon {
    background-image: url('Baidu.png'); /* Using Baidu icon as placeholder */
}

/* Fallback icons in case images don't load */
.engine-icon:not([style*="background-image"]) {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.google-icon:not([style*="background-image"])::after {
    content: "G";
    color: #4285F4;
}

.bing-icon:not([style*="background-image"])::after {
    content: "B";
    color: #008FF7;
}

.baidu-icon:not([style*="background-image"])::after {
    content: "B";
    color: #2932E1;
}

.localai-icon:not([style*="background-image"])::after {
    content: "AI";
    color: #00FF00;
}

.engine-select {
    display: none;
}

/* Search Bar */
.search-bar-container {
    display: flex;
    align-items: center;
    background: rgba(30, 30, 30, 0.8);
    border-radius: 40px;
    padding: 8px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    position: relative;
}

.search-bar-container:focus-within {
    border-color: rgba(255, 255, 0, 0.3);
    box-shadow: 0 6px 20px rgba(255, 255, 0, 0.1);
}

.search-icon {
    color: rgba(255, 255, 255, 0.6);
    margin-right: 15px;
    font-size: 18px;
}

.search-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: #f0f0f0;
    font-size: 18px;
    padding: 12px 0;
    outline: none;
    min-width: 0;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.clear-button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    visibility: hidden;
    opacity: 0;
}

.clear-button.visible {
    visibility: visible;
    opacity: 1;
}

.clear-button:hover {
    color: #FF0000;
    background: rgba(255, 255, 255, 0.05);
}

/* Search Button */
.search-button {
    background: linear-gradient(135deg, #FF0000, #FFFF00);
    border: none;
    border-radius: 30px;
    color: #0d0d0d;
    font-size: 18px;
    font-weight: 600;
    padding: 18px 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 auto;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(255, 0, 0, 0.2);
    width: 220px;
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.3);
}

.search-button:active {
    transform: translateY(0);
}

.button-text {
    letter-spacing: 0.5px;
}

/* Footer */
.footer {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.copyright {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.3px;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 25px 20px;
        border-radius: 20px;
    }
    
    .logo-text {
        font-size: 24px;
    }
    
    .search-bar-container {
        padding: 6px 16px;
    }
    
    .search-input {
        font-size: 16px;
        padding: 14px 0;
    }
    
    .search-button {
        font-size: 17px;
        padding: 16px 30px;
    }
}