:root {
    --card: rgba(30, 41, 59, 0.45); /* Made translucent to blend nicely into the fluid background */
    --accent: #2563eb;
    --text: #f8fafc;
}

body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: system-ui, -apple-system, sans-serif;
    overflow: hidden;
    
    /* GENTLY ANIMATED OCEAN WAVE GRADIENT BACKGROUND DESIGN */
    background: linear-gradient(-45deg, #070f1e, #0b1e36, #1e3a8a, #0f172a, #1d4ed8);
    background-size: 400% 400%; /* Expands size parameters to allow smooth panning motion shifts */
    animation: gentleWaveGradient 18s ease infinite; /* Slow, non-distracting loop */
}

/* Fluid moving background coordinates calculation sequence matrix */
@keyframes gentleWaveGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* PREMIUM FROSTED-GLASS CARD WINDOW HOUSING */
.upload-container {
    background: var(--card);
    backdrop-filter: blur(16px); /* Generates premium blurred transparency overlay */
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08); /* Sophisticated subtle inner border glow */
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    width: 420px;
    text-align: center;
    position: relative;
    z-index: 10;
}

/* Header layout configuration wrappers */
.title-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 0.5rem;
    width: 100%;
}

.title-header h1 {
    margin: 0;
    font-size: 2.4rem;
    color: var(--text);
    font-weight: 800;
    letter-spacing: -0.5px;
}

#shield3D {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px;
    min-height: 60px;
    background-color: transparent !important;
    outline: none;
    border: none !important;
    box-shadow: none !important;
    display: block;
    animation: wobbleShield 3.5s ease-in-out infinite alternate;
    pointer-events: none; 
    
    /* FIXED: This forces the browser to hide internal wireframe boxes while loading */
    --webgl-context-lost-overlay-opacity: 0;
}

/* Also ensure model-viewer internal shadow DOM parts don't draw outlines */
#shield3D::part(default-progress-bar) {
    display: none !important;
}

/* UPDATED 3D WOBBLE: Sways side to side and subtly twists to reveal the 3D edges */
@keyframes wobbleShield {
    0% {
        transform: perspective(400px) rotate3d(0, 1, 0, -22deg) rotate(-6deg) translateY(-2px);
    }
    100% {
        transform: perspective(400px) rotate3d(0, 1, 0, 22deg) rotate(6deg) translateY(2px);
    }
}

.upload-container p {
    color: #94a3b8;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* INTERACTIVE DRAG HOUSING SURFACE BLOCK */
.drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 3.5rem 1.5rem;
    cursor: pointer;
    position: relative;
    background: rgba(15, 23, 42, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 1.5rem;
}

.drop-zone:hover, .drop-zone--over {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.drop-zone__input { display: none; }
.drop-zone__prompt { color: #cbd5e1; font-size: 1rem; }
.drop-zone__prompt span { color: #3b82f6; font-weight: 600; }

.progress-container {
    background: rgba(51, 65, 85, 0.5);
    border-radius: 10px;
    height: 6px;
    width: 100%;
    margin-top: 1.5rem;
    display: none;
    overflow: hidden;
}

.progress-bar {
    background: #3b82f6;
    height: 100%;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px #3b82f6;
}

.result-container {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.6rem;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-container.show {
    opacity: 1;
    transform: scale(1);
}

input[type="text"] {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    padding: 0.8rem;
    border-radius: 10px;
    flex-grow: 1;
    outline: none;
    font-size: 0.95rem;
    transition: border 0.2s;
}
input[type="text"]:focus {
    border-color: #3b82f6;
}

button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.8rem 1.4rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    transition: background 0.2s, transform 0.1s;
}
button:hover { background: #1d4ed8; }
button:active { transform: scale(0.98); }
