:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --button-bg: rgba(0, 0, 0, 0.1);
    --button-hover: rgba(0, 0, 0, 0.2);
    --button-border: rgba(0, 0, 0, 0.2);
    --button-color: black;
    --placeholder-color: #777;
}

:root[data-theme="dark"] {
    --bg-color: #000000;
    --text-color: #ffffff;
    --button-bg: rgba(255, 255, 255, 0.1);
    --button-hover: rgba(255, 255, 255, 0.2);
    --button-border: rgba(255, 255, 255, 0.2);
    --button-color: white;
    --placeholder-color: #999;
}

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

body {
    min-height: 100vh;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    overflow-y: auto;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body.upload-view {
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.overlay::before {
    content: '';
    position: absolute;
    bottom: 40px;
    left: 50%;
    width: 24px;
    height: 24px;
    background: radial-gradient(circle, 
        rgba(30, 60, 114, 0.8) 0%,
        rgba(42, 82, 152, 0.7) 25%,
        rgba(79, 172, 254, 0.6) 50%,
        rgba(0, 242, 254, 0.4) 75%,
        rgba(0, 242, 254, 0) 100%
    );
    transform: translate(-50%, 50%) scale(0);
    border-radius: 50%;
    opacity: 1;
    filter: blur(5px);
}

.overlay.active::before {
    animation: circleExpand 1.5s ease-out forwards;
}

@keyframes circleExpand {
    0% {
        transform: translate(-50%, 50%) scale(0);
        opacity: 0.9;
        filter: blur(5px);
    }
    100% {
        transform: translate(-50%, 50%) scale(200);
        opacity: 0;
        filter: blur(15px);
    }
}

.search-button {
    padding: 12px 24px;
    font-size: 16px;
    background: var(--button-bg);
    border: 1px solid var(--button-border);
    color: var(--text-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    backdrop-filter: blur(8px);
    z-index: 3;
}

.search-button:hover {
    background: var(--button-hover);
    transform: translateX(-50%) scale(1.05);
}

.search-button.hidden {
    opacity: 0;
    transform: translateX(-50%) scale(0.9);
    pointer-events: none;
}

.overlay.active {
    animation: glowEffect 0.8s ease-out forwards;
}

@keyframes glowEffect {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

