:root {
    --bg-color: #0d1117;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #f50056;
    --search-bg: rgba(255, 255, 255, 0.1);
    --search-border: rgba(255, 255, 255, 0.2);
    --modal-bg: #161b22;
    --transition: 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
    background-color: var(--bg-color);
}

#background {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.5s ease;
    filter: brightness(0.7);
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    width: 100%;
    max-width: 700px;
    margin-top: 15vh; 
    animation: fadeIn 0.8s ease-out;
}

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

.clock-section {
    margin-bottom: 5px;
}

.clock {
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 600;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.date {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    color: var(--text-secondary);
    margin-top: 5px;
    font-weight: 300;
}

.greeting-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
    min-height: 60px;
}

.greeting {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 400;
    color: var(--text-primary);
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
    margin-bottom: 5px;
}

.privacy-quote {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.8;
    letter-spacing: 0.5px;
}

.search-section {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.search-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
    background: var(--search-bg);
    border: 1px solid var(--search-border);
    border-radius: 50px;
    padding: 5px 5px 5px 15px;
    backdrop-filter: blur(10px);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(245, 0, 86, 0.4);
}

.engine-select {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    padding-right: 10px;
    border-right: 1px solid var(--search-border);
    margin-right: 10px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23a0a0a0%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.4-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    background-size: 10px;
    padding-right: 20px;
}

.engine-select option {
    background: var(--modal-bg);
    color: var(--text-primary);
}

.search-form {
    display: flex;
    flex: 1;
    align-items: center;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    padding: 10px;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition);
}

.search-button:hover {
    color: var(--accent);
}

.footer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10;
}

.settings-btn {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--search-border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color var(--transition), background var(--transition);
}

.settings-btn:hover {
    color: var(--text-primary);
    background: rgba(0,0,0,0.6);
}

.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    display: none;
    opacity: 0;
}

.modal-content {
    background: var(--modal-bg);
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    border: 1px solid var(--search-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-content h2 {
    margin-bottom: 20px;
    font-weight: 500;
    color: var(--text-primary);
}

.setting-group {
    margin-bottom: 20px;
    text-align: left;
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.setting-group input[type="file"] {
    width: 100%;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--search-border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
}

.setting-group select {
    width: 100%;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--search-border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
}

.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: opacity var(--transition);
    width: 100%;
    margin-top: 5px;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--search-border);
    color: var(--text-secondary);
}

.btn-primary:hover, .btn-secondary:hover {
    opacity: 0.8;
}

@media (max-width: 500px) {
    .container {
        margin-top: 10vh;
    }
    .search-wrapper {
        flex-direction: column;
        border-radius: 16px;
        padding: 10px;
    }
    .engine-select {
        border-right: none;
        border-bottom: 1px solid var(--search-border);
        margin-right: 0;
        margin-bottom: 5px;
        width: 100%;
        padding-bottom: 5px;
    }
    .search-form {
        width: 100%;
    }
    .footer {
        bottom: 10px;
        right: 10px;
    }
    }
