:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --surface: #ffffff;
    --bg-body: #f1f5f9;
    --text-main: #0f172a;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-main);
    background-color: var(--bg-body);
    overflow: hidden;
    position: relative;
}

/* ==========================================
   LIQUID LIGHT MESH BACKGROUND (ENHANCED)
   ========================================== */
.mesh-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    background: #f8fafc;
}

.mesh-node {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.85;
    mix-blend-mode: multiply;
    animation: floatingMesh 20s infinite ease-in-out alternate;
}

.node-1 {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.5), rgba(168, 85, 247, 0.35));
    animation-delay: 0s;
}

.node-2 {
    bottom: -10%;
    right: -10%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.45), rgba(244, 63, 94, 0.3));
    animation-delay: -5s;
    animation-duration: 25s;
}

.node-3 {
    top: 40%;
    left: 40%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.45), rgba(56, 189, 248, 0.3));
    animation-delay: -10s;
    animation-duration: 22s;
}

.node-4 {
    top: 10%;
    right: 20%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.35), rgba(251, 146, 60, 0.25));
    animation-delay: -8s;
    animation-duration: 28s;
}

@keyframes floatingMesh {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    33% {
        transform: translate(50px, -30px) scale(1.1) rotate(10deg);
    }

    66% {
        transform: translate(-30px, 40px) scale(0.95) rotate(-5deg);
    }

    100% {
        transform: translate(20px, 20px) scale(1.05) rotate(5deg);
    }
}

/* ==========================================
   FLOATING GLASS SHAPES & PARTICLES
   ========================================== */
.glass-shapes-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.glass-shape {
    position: absolute;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

/* Triangle - Colorful Gradient */
.shape-triangle {
    width: 120px;
    height: 120px;
    top: 12%;
    left: 8%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(168, 85, 247, 0.4));
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    animation: complexFloat 22s infinite ease-in-out;
    animation-delay: 0s;
}

/* Blob - Pink Organic */
.shape-blob {
    width: 180px;
    height: 180px;
    bottom: 18%;
    right: 12%;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.45), rgba(244, 63, 94, 0.3));
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: blobMorph 18s infinite ease-in-out alternate;
    animation-delay: -3s;
}

/* Ring - Cyan Circle */
.shape-ring {
    width: 90px;
    height: 90px;
    top: 35%;
    right: 8%;
    border: 10px solid rgba(34, 211, 238, 0.5);
    border-radius: 50%;
    background: transparent;
    animation: complexFloat 20s infinite ease-in-out;
    animation-delay: -6s;
}

/* Pentagon - Gold */
.shape-pentagon {
    width: 110px;
    height: 110px;
    bottom: 12%;
    left: 18%;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.45), rgba(251, 146, 60, 0.35));
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    animation: complexFloat 26s infinite ease-in-out;
    animation-delay: -9s;
}

/* Star - Golden Rotating */
.shape-star {
    width: 70px;
    height: 70px;
    top: 8%;
    right: 25%;
    background: linear-gradient(to bottom right, #fde047, #f59e0b);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: spinFloat 10s infinite linear;
    opacity: 0.7;
}

/* ==========================================
   PARTICLES - COLORFUL RISING BUBBLES
   ========================================== */
.particle {
    position: absolute;
    border-radius: 50%;
    animation: particleRise 12s infinite linear;
    opacity: 0;
}

.p1 {
    left: 8%;
    bottom: -15%;
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    animation-duration: 14s;
}

.p2 {
    left: 28%;
    bottom: -25%;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #ec4899, #f472b6);
    animation-duration: 16s;
    animation-delay: -4s;
}

.p3 {
    left: 68%;
    bottom: -10%;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #22d3ee, #67e8f9);
    animation-duration: 18s;
    animation-delay: -2s;
}

.p4 {
    left: 88%;
    bottom: -30%;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #facc15, #fde047);
    animation-duration: 12s;
    animation-delay: -7s;
}

.p5 {
    left: 48%;
    bottom: -20%;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #a855f7, #c084fc);
    animation-duration: 22s;
    animation-delay: -10s;
}

/* ==========================================
   ANIMATION KEYFRAMES
   ========================================== */
@keyframes complexFloat {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    25% {
        transform: translate(20px, -30px) rotate(90deg) scale(1.05);
    }

    50% {
        transform: translate(40px, -50px) rotate(180deg) scale(1.1);
    }

    75% {
        transform: translate(20px, -30px) rotate(270deg) scale(1.05);
    }

    100% {
        transform: translate(0, 0) rotate(360deg) scale(1);
    }
}

@keyframes blobMorph {
    0% {
        transform: translate(0, 0) scale(1);
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    50% {
        transform: translate(-20px, 15px) scale(1.08);
        border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
    }

    100% {
        transform: translate(-40px, 30px) scale(1.15);
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

@keyframes spinFloat {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.7;
    }

    50% {
        transform: translateY(-25px) rotate(180deg);
        opacity: 0.9;
    }

    100% {
        transform: translateY(0) rotate(360deg);
        opacity: 0.7;
    }
}

@keyframes particleRise {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    5% {
        opacity: 0.9;
    }

    95% {
        opacity: 0.7;
    }

    100% {
        transform: translateY(-110vh) translateX(60px);
        opacity: 0;
    }
}

/* ==========================================
   CONTAINER & LAYOUT
   ========================================== */
.container {
    width: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    max-width: 1200px;
    margin-top: -5vh;
    z-index: 10;
}

/* ==========================================
   HEADER SECTION
   ========================================== */
.header-text {
    text-align: center;
    max-width: 700px;
    animation: fadeUp 0.8s ease-out;
}

.header-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 1.25rem;
    background: linear-gradient(to right, #1e293b, #334155);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.description {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--text-secondary);
    font-weight: 400;
}

.description strong {
    color: var(--primary);
    font-weight: 600;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   UPLOAD BOX (TOOL AREA)
   ========================================== */
.upload-box {
    background: var(--surface);
    width: 100%;
    max-width: 680px;
    height: 420px;
    border-radius: 30px;
    border: 2px solid transparent;
    background-clip: padding-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: visible;
    animation: scaleIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Gradient Border on Hover - Lighter & Beautiful */
.upload-box::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #a5b4fc, #f9a8d4, #c4b5fd, #99f6e4);
    background-size: 300% 300%;
    z-index: -1;
    border-radius: 32px;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.upload-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px -15px rgba(99, 102, 241, 0.2);
}

.upload-box:hover::after {
    opacity: 0.5;
}

.upload-box.dragover {
    border: 2px dashed var(--primary);
    background-color: #f8fafc;
    transform: scale(1.02);
}

/* ==========================================
   INNER CONTENT
   ========================================== */
.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    pointer-events: none;
    width: 100%;
    transition: opacity 0.2s ease;
}

.content.hidden {
    display: none;
    opacity: 0;
}

.icon-wrapper {
    background: #f1f5f9;
    padding: 1.75rem;
    border-radius: 50%;
    color: var(--primary);
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.upload-box:hover .icon-wrapper {
    background: #e0e7ff;
    color: var(--primary-hover);
    transform: scale(1.08);
}

.icon {
    width: 48px;
    height: 48px;
    stroke-width: 1.5;
}

.text-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

p.main-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.sub-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ==========================================
   SPINNER
   ========================================== */
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================
   SUCCESS STATE
   ========================================== */
.content.success .icon-wrapper {
    background: #dcfce7;
    color: #16a34a;
}

.success-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #16a34a;
}

/* ==========================================
   SHIMMER EFFECT
   ========================================== */
.shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
    transform: skewX(-20deg) translateX(-150%);
    transition: transform 0.5s;
    pointer-events: none;
    border-radius: 30px;
}

.upload-box:hover .shimmer {
    transition: transform 1s ease-in-out;
    transform: skewX(-20deg) translateX(150%);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
        gap: 2rem;
    }

    .header-text h1 {
        font-size: 2.25rem;
    }

    .upload-box {
        height: 340px;
    }

    .icon {
        width: 40px;
        height: 40px;
    }

    .shape-triangle,
    .shape-blob,
    .shape-ring,
    .shape-pentagon,
    .shape-star {
        transform: scale(0.7);
    }
}