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

body {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(248, 248, 248, 0.1)), url(./background.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    padding: 1rem;
    gap: 1rem; /* Controls spacing between .image-container and .container */
}

/* Image container styles */
.image-container {
    width: 100%;
    height: auto;
    min-height: 40vh;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem; /* Reduced from 2rem 1rem */
    margin-bottom: 0; /* Remove extra gap */
}

.image-container img {
    display: block;
    width: 100%;
    max-width: 500px;
    height: auto;
    object-fit: contain;
    transform: translateX(0);
    transition: transform 0.8s ease-in-out, opacity 0.3s ease;
    opacity: 0.95;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.image-container img:hover {
    transform: scale(1.05);
    opacity: 1;
}

/* Container styles */
.container {
    width: 100%;
    min-height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1.2rem; /* Reduced gap */
    padding: 1rem; /* Reduced from 2rem */
    margin-top: 0;
}

/* Input container styles */
.input-container {
    width: 100%;
    max-width: 600px;
    min-height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem; /* Reduced from 1.5rem */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.input-container input {
    flex: 1;
    min-width: 200px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    padding: 0 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-container input:focus {
    border-color: #ff4757;
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.2);
    transform: translateY(-2px);
}

.input-container input::placeholder {
    color: #666;
    font-weight: 400;
}

.input-container button {
    padding: 0.85rem 1.8rem;
    min-width: 150px;
    height: 52px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, #ff2b2b, #d90429);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 18px rgba(255, 71, 87, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.input-container button:hover {
    background: linear-gradient(135deg, #ff4b4b, #e63946);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.6);
}

.input-container button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
}

.input-container button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Pokemon sprite styles */
#pokemonSprite {
    width: 100%;
    max-width: 300px;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    animation: fadeIn 0.6s ease-out;
}

#pokemonSprite:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

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

/* Accessibility & Responsive Tweaks */
.input-container input:focus,
.input-container button:focus {
    outline: 2px solid #fd0318;
    outline-offset: 2px;
}

/* Responsive improvements (optional) */
@media (max-width: 768px) {
    .input-container {
        flex-direction: column;
        padding: 1rem;
    }
}
