/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #000000;
    color: white;
    height: 100vh;
    overflow: hidden;
}

.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 0 2rem;
}

.search-container {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background-color: #303134;
    border: 1px solid #5f6368;
    border-radius: 24px;
    padding: 0;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.search-wrapper:hover {
    background-color: #393a3d;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.search-wrapper:focus-within {
    background-color: #393a3d;
    border-color: #8ab4f8;
    box-shadow: 0 2px 8px rgba(138, 180, 248, 0.2);
}

#questionInput {
    flex: 1;
    width: 80%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    outline: none;
    border-radius: 24px 0 0 24px;
}

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

#askButton {
    background-color: #4285f4;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 0 24px 24px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 80px;
}

#askButton:hover {
    background-color: #3367d6;
    box-shadow: 0 2px 4px rgba(66, 133, 244, 0.3);
}

#askButton:active {
    background-color: #2d5aa0;
}

.answer {
    background-color: #393a3d;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
    margin-top: 1rem;
    border: 1px solid #5f6368;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
    display: none;
}

.processing {
    background-color: #4285f4;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 400;
    margin-top: 1rem;
    border: 1px solid #3367d6;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
    position: relative;
    display: none;
}

.processing::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

.answer.hidden,
.processing.hidden {
    opacity: 0;
    transform: translateY(-10px);
    display: none;
}

.answer.show,
.processing.show {
    opacity: 1;
    transform: translateY(0);
    display: block;
    animation: slideIn 0.4s ease;
}

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

/* Confetti Animation */
.confetti {
    position: fixed;
    top: -10px;
    width: 10px;
    height: 10px;
    background-color: #ff6b35;
    animation: confetti-fall linear forwards;
    z-index: 1000;
    pointer-events: none;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotateZ(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotateZ(720deg);
        opacity: 0;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .main-container {
        padding: 0 1rem;
    }
    
    .search-wrapper {
        flex-direction: column;
        border-radius: 24px;
    }
    
    #questionInput {
        width: 100%;
        border-radius: 24px 24px 0 0;
        border-bottom: 1px solid #5f6368;
    }
    
    #askButton {
        width: 100%;
        border-radius: 0 0 24px 24px;
        border-top: none;
    }
}

@media (max-width: 480px) {
    #questionInput {
        font-size: 16px;
        padding: 14px 16px;
    }
    
    #askButton {
        padding: 14px 24px;
        font-size: 16px;
    }
    
    .answer {
        font-size: 16px;
        padding: 14px 20px;
    }
}
