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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    padding: 10px;
}

.container {
    width: 100%;
    max-width: 650px;
    padding: 10px 20px;
    text-align: center;
}

header {
    margin-bottom: 20px;
    animation: fadeInDown 0.8s ease-out;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
    letter-spacing: -2px;
}

.tagline {
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
}

main {
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.background-image {
    width: 100%;
    max-width: 400px;
    height: 400px;
    object-fit: cover;
    object-position: center;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-top: 20px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    transition: all 0.3s ease;
}

.background-image:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.search-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    padding: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-box:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

#searchInput {
    flex: 1;
    border: none;
    outline: none;
    padding: 18px 25px;
    font-size: 1rem;
    background: transparent;
    color: #333;
}

#searchInput::placeholder {
    color: #999;
}

#engineSelect {
    border: none;
    outline: none;
    padding: 18px 40px 18px 25px;
    font-size: 0.95rem;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23667eea' d='M1.41 0L6 4.59 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 12px;
}

#engineSelect:hover {
    background-color: rgba(102, 126, 234, 0.2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23667eea' d='M1.41 0L6 4.59 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 12px;
}

#engineSelect:focus {
    background-color: rgba(102, 126, 234, 0.15);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23667eea' d='M1.41 0L6 4.59 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 12px;
}

.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    margin-right: 6px;
    padding: 2px;
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.search-btn:active {
    transform: scale(0.95);
}

/* Quiz Banner */
.quiz-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0d0221 0%, #1a0a3e 100%);
    border: 1px solid rgba(255, 42, 109, 0.4);
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.quiz-banner:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 42, 109, 0.8);
    box-shadow: 0 4px 20px rgba(255, 42, 109, 0.25);
}

.quiz-banner-icon {
    font-size: 1.3rem;
}

.quiz-banner-text strong {
    color: #ff2a6d;
}

.quiz-banner-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.quiz-banner:hover .quiz-banner-arrow {
    transform: translateX(4px);
}

footer {
    animation: fadeIn 0.8s ease-out 0.4s both;
}

footer nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

footer a {
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background: #667eea;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

footer a:hover {
    color: #667eea;
}

footer a:hover::after {
    width: 100%;
}

.separator {
    color: #aaa;
    font-weight: 300;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 3rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .input-group {
        flex-wrap: wrap;
    }

    #searchInput {
        width: 100%;
        min-width: 0;
    }

    #engineSelect {
        flex: 1;
    }

    .background-image {
        max-width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

/* Page styles for About, Terms, Privacy */
.page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out;
}

.page-content h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #333;
}

.page-content h2 {
    font-size: 1.8rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #444;
}

.page-content p {
    line-height: 1.8;
    margin-bottom: 20px;
    color: #555;
    font-size: 1.05rem;
}

.page-content ul {
    margin-left: 30px;
    margin-bottom: 20px;
}

.page-content li {
    line-height: 1.8;
    color: #555;
    margin-bottom: 10px;
}

.back-link {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.back-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

@media (max-width: 768px) {
    .page-content {
        padding: 30px 25px;
    }

    .page-content h1 {
        font-size: 2rem;
    }

    .page-content h2 {
        font-size: 1.5rem;
    }
}
