/* Global Variables */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --text-color: #1f2937;
    --text-light: #6b7280;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 12px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    min-height: 100vh;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Glassmorphism Card */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    box-shadow: var(--shadow);
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typography */
h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #111827;
}

p.subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Form Elements */
.search-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group {
    position: relative;
    width: 100%;
}

input[type="text"] {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius);
    outline: none;
    transition: all 0.2s;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
    text-align: center;
}

.btn:hover {
    background: var(--primary-hover);
}

.btn:active {
    transform: scale(0.98);
}

/* Product Result Page */
.product-image-container {
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: var(--radius);
    overflow: hidden;
    background: #f3f4f6;
    height: 300px;
    /* Fixed height for consistency */
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.product-desc {
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

footer a {
    text-decoration: underline;
}

footer a:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }
}