* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    height: 100vh;
    overflow: hidden;
    position: relative;
    background: #000;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('camera/background.jpg') center/cover no-repeat fixed;
}

.background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, transparent 70%, rgba(0, 0, 0, 0.2) 100%);
    opacity: 0.3;
    z-index: -1;
    animation: bg-move 20s infinite alternate ease-in-out;
}

@keyframes bg-move {
    0% {
        transform: scale(1) rotate(0deg);
    }
    100% {
        transform: scale(1.05) rotate(1deg);
    }
}

.container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 100vh;
    padding: 40px 20px 20px;
}

.time-container {
    margin-bottom: 30px;
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
}

#time {
    font-size: 4.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    text-align: center;
    font-family: 'Segoe UI', 'Microsoft YaHei', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 2px;
    background: transparent !important;
    padding: 15px 30px;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-container {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 520px;
    margin-bottom: 30px;
    justify-content: center;
}

.search-input-area {
    display: flex;
    align-items: center;
    flex: 1;
    border-radius: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    max-width: 500px;
    position: relative;
    overflow: visible;
    padding: 2px;
    border: none;
}

.search-input-area:focus-within {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
    background: rgba(255, 255, 255, 0.15);
}

.engine-selector {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.custom-select {
    position: relative;
    width: 45px;
    height: 45px;
    cursor: pointer;
    border-radius: 50%;
    background: transparent;
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    outline: none;
    z-index: 2;
    margin-right: 6px;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-select:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.05);
}

.selected-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.selected-option .engine-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
    opacity: 0.9;
    display: block;
    flex-shrink: 0;
}

.options-container {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    transform: translateY(10px);
    width: 160px;
    min-width: 160px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-radius: 16px;
    z-index: 1000;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
    border: none;
    transition: all 0.2s ease;
}

.options-container.show {
    transform: translateY(0);
    max-height: 300px;
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
}

.options-container::-webkit-scrollbar {
    display: none;
}

.options-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: white;
    cursor: pointer;
    gap: 10px;
    border-radius: 10px;
    margin: 3px 6px;
    font-size: 13px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0);
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left center;
}

.option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px) scale(1.02);
}

.option:active {
    transform: translateX(2px) scale(0.98);
    transition: transform 0.1s ease;
}

.option .engine-icon {
    transition: transform 0.3s ease;
}

.option:hover .engine-icon {
    transform: rotate(10deg) scale(1.1);
}

.option .engine-icon {
    width: 14px;
    height: 14px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    display: block;
    flex-shrink: 0;
}

#search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: white;
    font-size: 14px;
    outline: none;
    font-family: 'Segoe UI', 'Microsoft YaHei', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 45px;
    text-align: center;
    width: 100%;
    -webkit-autofill: initial !important;
    background-clip: content-box !important;
    transition: background-color 5000s ease-in-out 0s;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#search-input:focus {
    transform: scale(1.02);
}

#search-input::placeholder {
    transition: all 0.3s ease;
}

#search-input:focus::placeholder {
    opacity: 0.5;
    transform: translateY(-2px);
}

#search-input:-webkit-autofill,
#search-input:-webkit-autofill:hover,
#search-input:-webkit-autofill:focus,
#search-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0px 1000px transparent inset !important;
    box-shadow: 0 0 0px 1000px transparent inset !important;
    -webkit-text-fill-color: white !important;
    background-color: transparent !important;
    background-clip: content-box !important;
    transition: background-color 5000s ease-in-out 0s;
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    text-align: center;
    font-size: 13px;
}

#search-input:focus::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#search-button {
    width: 45px;
    height: 45px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    color: white;
    cursor: pointer;
    box-shadow: none;
    margin-left: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#search-button:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.05);
    box-shadow: none;
}

#search-button svg {
    transition: transform 0.3s ease;
}

#search-button:hover svg {
    transform: rotate(15deg);
}

#search-button svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
    opacity: 0.9;
    display: block;
    flex-shrink: 0;
}

.quote-container {
    position: absolute;
    bottom: 50px;
    width: 100%;
    max-width: 500px;
    text-align: center;
    padding: 0 20px;
    font-family: 'Georgia', 'KaiTi', 'Microsoft YaHei', serif;
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
}

#quote {
    color: white;
    font-size: 15px;
    font-style: italic;
    line-height: 1.6;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.8);
    background: transparent !important;
    padding: 10px 18px;
    backdrop-filter: none !important;
    display: inline-block;
    max-width: 100%;
}

.footer {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-family: 'Segoe UI', 'Microsoft YaHei', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.5px;
}

.footer:hover {
    color: rgba(255, 255, 255, 0.85);
}

.settings-button {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border: none;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-button:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.05) rotate(5deg);
}

.settings-button:active {
    transform: scale(0.95) rotate(-5deg);
    transition: transform 0.1s ease;
}

.settings-button svg {
    transition: transform 0.3s ease;
}

.settings-button:hover svg {
    transform: rotate(90deg);
}

.settings-button svg {
    width: 20px;
    height: 20px;
    fill: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.settings-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 400px;
    max-width: 90vw;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-radius: 20px;
    padding: 30px;
    z-index: 1000;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 
                0 5px 15px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: none;
    flex-direction: column;
    gap: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translate(-50%, -50%) translateY(-30px) scale(0.9) rotateX(-10deg);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center center;
}

.settings-panel.show {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0) scale(1) rotateX(0);
    animation: panelBounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes panelBounceIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(-30px) scale(0.9) rotateX(-10deg);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) translateY(10px) scale(1.05) rotateX(5deg);
    }
    70% {
        transform: translate(-50%, -50%) translateY(-5px) scale(0.98) rotateX(-2deg);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) translateY(0) scale(1) rotateX(0);
    }
}

.settings-panel.closing {
    animation: panelBounceOut 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes panelBounceOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) translateY(0) scale(1) rotateX(0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(-30px) scale(0.9) rotateX(-10deg);
    }
}

.settings-title {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    font-size: 14px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.settings-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.toggle-switch {
    position: relative;
    width: 56px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch.active {
    background: linear-gradient(135deg, rgba(100, 149, 237, 0.6), rgba(65, 105, 225, 0.6));
    box-shadow: 0 4px 15px rgba(100, 149, 237, 0.3), 
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active::after {
    transform: translateX(28px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.settings-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    opacity: 0.8;
}

.search-history-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(50px) saturate(180%);
    -webkit-backdrop-filter: blur(50px) saturate(180%);
    border-radius: 20px;
    padding: 20px;
    z-index: 100;
    max-height: 350px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15), 
                0 5px 15px rgba(0, 0, 0, 0.05),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(-20px) scale(0.9) rotateX(-10deg);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: top center;
}

.search-history-container.show {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
    animation: historyBounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.search-history-container.closing {
    animation: historyBounceOut 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes historyBounceIn {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.9) rotateX(-10deg);
    }
    50% {
        opacity: 1;
        transform: translateY(5px) scale(1.02) rotateX(2deg);
    }
    70% {
        transform: translateY(-3px) scale(0.98) rotateX(-1deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0);
    }
}

@keyframes historyBounceOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px) scale(0.9) rotateX(-10deg);
    }
}

.search-history-container::-webkit-scrollbar {
    display: none;
}

.search-history-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.search-history-title {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
}

.search-history-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, rgba(100, 149, 237, 0.6), transparent);
    border-radius: 1px;
}

.clear-history {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.clear-history::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 100, 100, 0.3), transparent);
    transition: left 0.5s ease;
}

.clear-history:hover::before {
    left: 100%;
}

.clear-history:hover {
    color: white;
    background: rgba(255, 100, 100, 0.2);
    border-color: rgba(255, 100, 100, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 100, 100, 0.2);
}

.search-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 250px;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.search-history-list::-webkit-scrollbar {
    display: none;
}

.search-history-item {
    color: white;
    font-size: 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    transform-origin: left center;
}

.search-history-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

.search-history-item:hover::before {
    left: 100%;
}

.search-history-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, rgba(100, 149, 237, 0.6), rgba(65, 105, 225, 0.6));
    border-radius: 3px 0 0 3px;
    transform: scaleY(0);
    transition: transform 0.3s ease;
    transform-origin: top;
}

.search-history-item:hover::after {
    transform: scaleY(1);
}

.search-history-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    transform: translateX(8px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.search-history-item:active {
    transform: translateX(4px) scale(0.98);
    transition: transform 0.1s ease;
}

.history-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-item-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.history-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.history-item-engine {
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-weight: 500;
}

.history-item-time {
    opacity: 0.7;
}

.remove-history-item {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.remove-history-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 100, 100, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.remove-history-item:hover::before {
    width: 100%;
    height: 100%;
}

.remove-history-item:hover {
    color: white;
    transform: rotate(90deg) scale(1.15);
    text-shadow: 0 0 8px rgba(255, 100, 100, 0.5);
}

.empty-history {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 20px;
    font-size: 14px;
    font-style: italic;
}

.settings-item-icon {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.settings-item:hover .settings-item-icon {
    opacity: 1;
    transform: scale(1.1) rotate(5deg);
}

.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.settings-overlay.show {
    opacity: 1;
    visibility: visible;
}

.settings-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 16px;
}

.settings-close:hover {
    color: white;
    background: rgba(255, 100, 100, 0.3);
    transform: rotate(90deg);
}

.background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: -2;
}
