* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: arial,sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #fff;
}

header {
    padding: 6px;
    position: relative;
    z-index: 1100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 0 20px;
    pointer-events: auto;
    position: relative;
}

.left-nav, .right-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

nav a {
    color: #202124;
    text-decoration: none;
    font-size: 13px;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    pointer-events: auto;
    position: relative;
    z-index: 1101;
}

nav a:hover {
    text-decoration: underline;
}

.apps-button {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    padding: 8px;
}

.apps-button:hover {
    background-color: rgba(60,64,67,0.08);
}

.sign-in {
    background: #0b57d0;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
    letter-spacing: 0.25px;
    height: 42px;
    pointer-events: auto;
    z-index: 999;
    position: relative;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px 0 rgba(66, 133, 244, 0), 0 4px 8px 3px rgba(66, 133, 244, 0);
}

.sign-in:hover {
    background: #1a73e8;
    box-shadow: 0 1px 3px 0 rgb(66 133 244 / 30%), 0 4px 8px 3px rgb(66 133 244 / 15%);
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: -100px;
    padding: 0 20px;
}

.logo-container {
    margin-bottom: 35px;
    text-align: center;
}

.logo {
    height: 92px;
    max-width: 272px;
}

.search-container {
    width: 100%;
    max-width: 584px;
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    height: 48px;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    padding: 0 8px 0 16px;
    margin-bottom: 30px;
    background-color: #fff;
    box-shadow: 0 2px 5px 1px rgba(64,60,67,.16);
    transition: all 0.15s cubic-bezier(0.4,0.0,0.2,1);
    width: 100%;
}

.search-box:hover {
    box-shadow: 0 2px 8px 1px rgba(64,60,67,.24);
    border-color: rgba(223,225,229,0);
}

.search-box:focus-within {
    box-shadow: 0 2px 8px 1px rgba(64,60,67,.24);
    border-color: rgba(223,225,229,0);
    outline: none;
}

.search-input {
    flex: 1;
    height: 40px;
    border: none;
    outline: none;
    margin: 0 13px;
    font-size: 16px;
    color: rgba(0,0,0,.87);
    background-color: transparent;
    font-family: 'Roboto', sans-serif;
    transition: opacity 0.15s cubic-bezier(0.4,0.0,0.2,1);
}

.search-icon {
    width: 20px;
    height: 20px;
    padding: 0;
    fill: #9aa0a6;
}

.mic-icon, .lens-icon {
    width: 24px;
    height: 24px;
    padding: 0;
    margin: 0 8px;
    cursor: pointer;
}

.search-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

.search-buttons button {
    background-color: #f8f9fa;
    border: 1px solid #f8f9fa;
    border-radius: 4px;
    color: #3c4043;
    font-family: arial,sans-serif;
    font-size: 14px;
    margin: 11px 4px;
    padding: 0 16px;
    line-height: 27px;
    height: 36px;
    min-width: 54px;
    cursor: pointer;
}

.search-buttons button:hover {
    border: 1px solid #dadce0;
    box-shadow: 0 1px 1px rgb(0 0 0 / 10%);
}

footer {
    background: #f2f2f2;
    margin-top: auto;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 48px;
}

.footer-left, .footer-right {
    display: flex;
    align-items: center;
    gap: 27px;
}

.carbon {
    color: #3c4043;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.carbon img {
    height: 14px;
    width: 14px;
    margin-top: -1px;
}

footer a {
    color: #3c4043;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 1200px) {
    .footer-bottom {
        justify-content: space-evenly;
    }
    
    .carbon {
        position: static;
        transform: none;
    }
}

.search-settings-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.32);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.15s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.search-settings-overlay.show {
    opacity: 1;
}

.search-settings-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background-color: #fff;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12), 0 5px 5px -3px rgba(0,0,0,.2);
    width: 90%;
    max-width: 512px;
    z-index: 1001;
    transition: transform 0.15s cubic-bezier(0.4, 0.0, 0.2, 1);
    font-family: 'Google Sans', 'Roboto', arial, sans-serif;
}

.search-settings-overlay.show .search-settings-popup {
    transform: translate(-50%, -50%) scale(1);
}

.popup-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #e8eaed;
}

.search-settings-popup h2 {
    color: #202124;
    font-size: 22px;
    margin: 0;
    font-weight: 400;
    line-height: 28px;
}

.popup-content {
    padding: 16px 24px;
    max-height: 400px;
    overflow-y: auto;
}

.search-engines-section {
    margin-bottom: 24px;
}

.section-title {
    color: #5f6368;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.search-engine-option {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    margin: 4px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: relative;
    min-height: 48px;
}

.search-engine-option:hover {
    background-color: #f8f9fa;
}

.search-engine-option:focus-within {
    background-color: #e8f0fe;
}

.search-engine-option input[type="radio"] {
    margin: 2px 16px 0 0;
    width: 20px;
    height: 20px;
    pointer-events: none;
    accent-color: #1a73e8;
    flex-shrink: 0;
}

.engine-info {
    flex: 1;
    min-width: 0;
}

.engine-name {
    font-size: 16px;
    color: #202124;
    font-weight: 400;
    line-height: 24px;
    margin-bottom: 2px;
}

.engine-description {
    font-size: 14px;
    color: #5f6368;
    line-height: 20px;
}

.settings-section {
    margin-top: 8px;
    padding-top: 24px;
    border-top: 1px solid #e8eaed;
}

.settings-section h3 {
    color: #5f6368;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.toggle-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    margin: 4px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    min-height: 48px;
}

.toggle-option:hover {
    background-color: #f8f9fa;
}

.toggle-option label {
    font-size: 16px;
    color: #202124;
    flex: 1;
    cursor: pointer;
    font-weight: 400;
}

.toggle-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #1a73e8;
    cursor: pointer;
    margin: 0;
}

.popup-actions {
    padding: 16px 24px 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid #e8eaed;
}

.popup-buttons {
    display: flex;
    gap: 8px;
}

.popup-buttons button {
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    height: 36px;
    min-width: 64px;
    border: none;
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.popup-cancel {
    background-color: transparent;
    color: #1a73e8;
}

.popup-cancel:hover {
    background-color: rgba(26, 115, 232, 0.08);
}

.popup-cancel:focus {
    background-color: rgba(26, 115, 232, 0.12);
    outline: none;
}

.popup-save {
    background-color: #1a73e8;
    color: #fff;
    box-shadow: 0 1px 3px 0 rgba(66,133,244,.3);
}

.popup-save:hover {
    background-color: #1557b0;
    box-shadow: 0 1px 3px 0 rgba(66,133,244,.3), 0 4px 8px 3px rgba(66,133,244,.15);
}

.popup-save:focus {
    background-color: #1557b0;
    box-shadow: 0 1px 3px 0 rgba(66,133,244,.3), 0 4px 8px 3px rgba(66,133,244,.15);
    outline: none;
}

.popup-save:active {
    background-color: #0d47a1;
    box-shadow: 0 2px 3px 0 rgba(66,133,244,.3), 0 6px 10px 4px rgba(66,133,244,.15);
}