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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #fff;
    color: #202124;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
header {
    padding: 20px;
}

.nav-links {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

.nav-links a {
    color: #70757a;
    text-decoration: none;
    font-size: 13px;
    line-height: 24px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.1s;
}

.nav-links a:hover {
    background-color: #f8f9fa;
}

/* Main */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.search-container {
    width: 100%;
    max-width: 584px;
    margin-top: 50px;
}

/* Logo */
.logo {
    text-align: center;
    margin-bottom: 30px;
}

.google-text {
    font-size: 90px;
    font-weight: 500;
    color: #4285f4;
    font-family: 'Product Sans', Arial, sans-serif;
    letter-spacing: -5px;
}

.search-text {
    font-size: 90px;
    font-weight: 500;
    color: #ea4335;
    font-family: 'Product Sans', Arial, sans-serif;
    letter-spacing: -5px;
}

/* Search Box */
.search-box {
    margin: 20px 0;
}

.search-input-container {
    position: relative;
    width: 100%;
    max-width: 584px;
    margin: 0 auto;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    background: #fff;
    box-shadow: none;
    transition: box-shadow 0.2s;
}

.search-input-container:hover {
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
    border-color: rgba(223, 225, 229, 0);
}

.search-input-container:focus-within {
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
    border-color: rgba(223, 225, 229, 0);
}

#searchInput {
    width: 100%;
    padding: 14px 20px;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
    border-radius: 24px;
}

#searchInput::placeholder {
    color: #9aa0a6;
}

.clear-btn, .search-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.1s;
}

.clear-btn {
    right: 60px;
}

.clear-btn:hover {
    background-color: #f8f9fa;
}

.search-btn {
    right: 12px;
}

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

.clear-btn svg, .search-btn svg {
    fill: #70757a;
}

/* Search Buttons */
.search-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
}

.submit-btn {
    background-color: #f8f9fa;
    border: 1px solid #f8f9fa;
    border-radius: 4px;
    color: #3c4043;
    font-family: inherit;
    font-size: 14px;
    margin: 11px 4px;
    padding: 0 16px;
    line-height: 27px;
    height: 36px;
    min-width: 54px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: box-shadow 0.1s, background-color 0.1s, border-color 0.1s;
}

.submit-btn:hover {
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    background-color: #f8f9fa;
    border: 1px solid #dadce0;
    color: #202124;
}

.submit-btn:active {
    border: 1px solid #4285f4;
    outline: none;
}

/* Results */
.results-container {
    width: 100%;
    max-width: 652px;
    margin-top: 40px;
    padding: 20px 0;
}

.results-info {
    color: #70757a;
    font-size: 14px;
    margin-bottom: 20px;
    padding: 0 16px;
}

.search-results {
    width: 100%;
}

.result-item {
    margin-bottom: 30px;
    padding: 0 16px;
}

.result-title {
    margin-bottom: 4px;
}

.result-title a {
    color: #1a0dab;
    text-decoration: none;
    font-size: 20px;
    font-weight: 400;
    line-height: 26px;
}

.result-title a:hover {
    text-decoration: underline;
}

.result-url {
    color: #006621;
    font-size: 14px;
    line-height: 20px;
    margin-bottom: 4px;
}

.result-description {
    color: #4d5156;
    font-size: 14px;
    line-height: 22px;
    margin-bottom: 8px;
}

.result-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.keyword-tag {
    background-color: #e8f0fe;
    color: #1a73e8;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

/* Highlight */
mark {
    background-color: #fff59d;
    color: #202124;
    padding: 1px 2px;
    border-radius: 2px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #70757a;
}

.no-results p {
    margin-bottom: 16px;
    font-size: 16px;
}

.no-results ul {
    list-style: none;
    padding: 0;
}

.no-results li {
    margin-bottom: 8px;
    font-size: 14px;
}

/* Footer */
footer {
    margin-top: auto;
    background-color: #f2f2f2;
    border-top: 1px solid #e4e4e4;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    flex-wrap: wrap;
}

.footer-left, .footer-right {
    display: flex;
    gap: 30px;
}

.footer-left a, .footer-right a {
    color: #70757a;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.1s;
}

.footer-left a:hover, .footer-right a:hover {
    background-color: #e8e8e8;
}

/* Responsive */
@media (max-width: 768px) {
    .search-container {
        margin-top: 20px;
    }
    
    .google-text, .search-text {
        font-size: 60px;
        letter-spacing: -3px;
    }
    
    .search-input-container {
        max-width: 100%;
    }
    
    .search-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .submit-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-left, .footer-right {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .google-text, .search-text {
        font-size: 40px;
        letter-spacing: -2px;
    }
    
    .nav-links {
        font-size: 12px;
        gap: 10px;
    }
    
    .result-item {
        padding: 0 8px;
    }
    
    .result-title a {
        font-size: 18px;
    }
}
