:root {
    --bg-gradient-start: #f0f9ff;
    --bg-gradient-end: #cbebff;
    --primary: #0ea5e9;
    --primary-hover: #0284c7;
    --primary-light: #e0f2fe;
    --text-main: #1e293b;
    --text-muted: #64748b;
    /* More transparent for better background visibility */
    --card-bg: rgba(255, 255, 255, 0.75);
    --border: #e2e8f0;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden; /* Hide blob overflow */
}

/* --- NEW: Animated Background Blobs --- */
.background-anim {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.blob-1 {
    top: -10%; left: -10%;
    width: 500px; height: 500px;
    background: var(--primary-light);
    animation: floatBlob 25s infinite alternate ease-in-out;
}

.blob-2 {
    bottom: -20%; right: -20%;
    width: 600px; height: 600px;
    background: #c7d2fe; /* A soft purple-blue */
    animation: floatBlob 30s infinite alternate-reverse ease-in-out;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.1); }
}

/* Main Layout */
.main-wrapper { width: 100%; max-width: 500px; position: relative; z-index: 1; }

header { text-align: center; margin-bottom: 30px; }
.brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 5px; }

.logo-icon {
    color: var(--primary); background: white; width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.2);
}

/* Subtle pulse on logo */
.icon-pulse { animation: subtlePulse 3s infinite ease-in-out; }
@keyframes subtlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); box-shadow: 0 8px 15px rgba(14, 165, 233, 0.3); }
}

header h1 { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.8rem; color: var(--text-main); letter-spacing: -0.5px; }
header p { color: var(--text-muted); font-size: 0.95rem; }

/* --- App Card with Enhanced Glassmorphism --- */
.app-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px) saturate(120%); /* Increased blur for better blob effect */
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 20px 40px -5px rgba(14, 165, 233, 0.15), 0 10px 15px -5px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Subtle hover lift on the whole card */
.app-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 50px -5px rgba(14, 165, 233, 0.2);
}

/* Navigation */
.nav-tabs { display: flex; background: rgba(241, 245, 249, 0.8); padding: 4px; border-radius: 12px; margin-bottom: 25px; }
.nav-btn { flex: 1; padding: 10px; border: none; background: transparent; color: var(--text-muted); font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.9rem; border-radius: 8px; cursor: pointer; transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); }
.nav-btn.active { background: white; color: var(--primary); box-shadow: 0 2px 8px rgba(14, 165, 233, 0.15); transform: scale(1.02); }

/* Inputs & Drop Zones */
.panel { display: none; }
.panel.active { display: block; }
.input-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.85rem; color: var(--text-main); font-family: 'Poppins', sans-serif; }

.drop-zone {
    position: relative; border: 2px dashed #cbd5e1; border-radius: 16px; background: rgba(248, 250, 252, 0.8);
    height: 70px; transition: all 0.3s ease; cursor: pointer; overflow: hidden;
}

.drop-zone:hover { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 4px 12px rgba(14, 165, 233, 0.1); }
input[type="file"] { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; }
.drop-content { display: flex; align-items: center; padding: 0 20px; height: 100%; gap: 15px; }
.drop-content .icon { font-size: 1.4rem; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* Bouncy Icon on Hover */
.drop-zone:hover .bounce-hover { transform: scale(1.2) rotate(5deg); }

.text-group { display: flex; flex-direction: column; }
.main-text { font-weight: 500; font-size: 0.95rem; color: var(--text-main); }
.sub-text { font-size: 0.75rem; color: var(--text-muted); }

/* --- Animated Primary Button (Shine Effect) --- */
.primary-btn {
    width: 100%; padding: 16px;
    background: var(--primary); color: white; border: none; border-radius: 14px;
    font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1rem;
    cursor: pointer; transition: transform 0.1s, background 0.2s, box-shadow 0.2s;
    margin-top: 10px; box-shadow: 0 4px 6px rgba(14, 165, 233, 0.2);
    position: relative; overflow: hidden; /* Needed for shine */
}

/* The Shine Element */
.primary-btn::after {
    content: ''; position: absolute; top: -50%; right: -50%; bottom: -50%; left: -50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(45deg) translate(-100%, -100%);
    transition: transform 0.6s ease-in-out;
}

.primary-btn:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 8px 15px rgba(14, 165, 233, 0.3); }
.primary-btn:hover::after { transform: rotate(45deg) translate(100%, 100%); } /* Trigger shine */
.primary-btn:active { transform: translateY(0); }

/* Results Area */
.result-box { display: none; margin-top: 25px; padding-top: 25px; border-top: 1px solid var(--border); text-align: center; }
.success-badge { display: inline-block; background: #dcfce7; color: #166534; padding: 6px 12px; border-radius: 20px; font-weight: 600; font-size: 0.85rem; margin-bottom: 10px; }
.status-text { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 15px; }

.download-btn {
    display: block; width: 100%; padding: 12px; background: white; color: var(--primary); border: 2px solid var(--primary);
    border-radius: 12px; text-decoration: none; font-weight: 600; transition: all 0.2s;
}
.download-btn:hover { background: var(--primary-light); box-shadow: 0 4px 10px rgba(14, 165, 233, 0.15); }

/* File Found Card */
.file-found-card { background: rgba(255,255,255,0.8); border: 1px solid var(--border); border-radius: 12px; padding: 15px; display: flex; align-items: center; gap: 12px; }
.file-icon { width: 40px; height: 40px; background: #f1f5f9; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.file-info { flex: 1; text-align: left; }
.file-info strong { display: block; font-size: 0.9rem; color: var(--text-main); }
.file-info small { color: var(--text-muted); font-size: 0.8rem; }
.download-link { color: var(--primary); text-decoration: none; font-weight: 600; font-size: 0.85rem; padding: 8px 14px; background: var(--primary-light); border-radius: 8px; transition: 0.2s; }
.download-link:hover { background: var(--primary); color: white; }

/* --- Entry Animations --- */
/* Standard subtle fade up */
.pop-in { animation: fadeUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Bouncy elastic pop in for success elements */
.pop-in-elastic { animation: elasticPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes elasticPop {
    0% { opacity: 0; transform: scale(0.5); }
    100% { opacity: 1; transform: scale(1); }
}