body {
    background: linear-gradient(135deg, #0a0e17 0%, #1a1f2e 50%, #0f1419 100%);
    background-attachment: fixed;
    min-height: 100vh;
    font-family: 'Cairo', 'Tajawal', Tahoma, Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    margin: 0;
    padding: 20px 10px;
}

/* أشكال جانبية ديناميكية */
.side-shape {
    position: absolute;
    z-index: 1;
    opacity: 0.25;
    filter: blur(80px);
    pointer-events: none;
    animation: float 8s ease-in-out infinite alternate;
}

.side-shape.shape1 {
    left: -100px;
    top: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle at 60% 40%, #00c6fb 40%, transparent 100%);
    animation-delay: 0s;
}

.side-shape.shape2 {
    right: -120px;
    bottom: 15%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle at 40% 60%, #0078d7 40%, transparent 100%);
    animation-delay: 2s;
}

.side-shape.shape3 {
    left: 15%;
    bottom: -100px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle at 50% 50%, #667eea 30%, transparent 100%);
    opacity: 0.20;
    animation-delay: 4s;
}

.side-shape.shape4 {
    right: 8%;
    top: 5%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle at 60% 40%, #f093fb 30%, transparent 100%);
    opacity: 0.18;
    animation-delay: 6s;
}

.side-shape.shape5 {
    left: 45%;
    top: 85%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle at 50% 50%, #00c6fb 40%, transparent 100%);
    opacity: 0.22;
    animation-delay: 3s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    100% {
        transform: translate(20px, -40px) scale(1.1) rotate(5deg);
    }
}

/* الشعار */
.header-logo {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 120px;
    height: 120px;
    background: url('static/bg-dark.png') no-repeat center;
    background-size: cover;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(0, 198, 251, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    opacity: 1;
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(0, 198, 251, 0.5);
}

.header-logo:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(0, 198, 251, 0.5);
}

/* الحاوية الرئيسية */
.upload-container {
    background: rgba(25, 29, 38, 0.95);
    padding: 50px 40px 40px 40px;
    border-radius: 24px;
    box-shadow: 0 20px 60px 0 rgba(0, 0, 0, 0.5),
        0 0 1px rgba(255, 255, 255, 0.1);
    max-width: 700px;
    width: 90%;
    text-align: center;
    position: relative;
    z-index: 2;
    overflow: hidden;
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.upload-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0078d7, #00c6fb, #667eea);
    background-size: 200% 100%;
    animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {

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

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

.upload-container h2 {
    color: #fff;
    margin-bottom: 12px;
    font-size: 2em;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 20px rgba(0, 198, 251, 0.4);
}

.upload-container>p {
    color: #a0aec0;
    font-size: 0.95em;
    margin-bottom: 30px;
}

.custom-file-upload {
    border: 2px dashed rgba(0, 198, 251, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 30px;
    cursor: pointer;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(10, 14, 23, 0.6) 0%, rgba(20, 25, 35, 0.6) 100%);
    color: #cbd5e0;
    margin-bottom: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.custom-file-upload::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 198, 251, 0.15) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.custom-file-upload:hover::before {
    width: 400px;
    height: 400px;
}

.custom-file-upload:hover {
    border-color: #00c6fb;
    color: #00c6fb;
    background: linear-gradient(135deg, rgba(0, 120, 215, 0.1) 0%, rgba(0, 198, 251, 0.1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 198, 251, 0.2);
}

.upload-icon {
    font-size: 48px;
    color: #00c6fb;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 12px rgba(0, 198, 251, 0.4));
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

#file-name {
    color: #00c6fb;
    margin-top: 16px;
    font-weight: 600;
    font-size: 1.05em;
    text-shadow: 0 2px 10px rgba(0, 198, 251, 0.3);
}

button {
    background: linear-gradient(135deg, #0078d7 0%, #00c6fb 100%);
    color: #fff;
    border: none;
    padding: 18px 0;
    width: 100%;
    border-radius: 12px;
    font-size: 1.15em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 120, 215, 0.3);
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 198, 251, 0.4);
}

button:active {
    transform: translateY(-1px);
}

button:disabled {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* شاشة التحميل */
.progress-container {
    display: none;
    margin-top: 28px;
    text-align: right;
    padding: 20px;
    background: rgba(15, 20, 30, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(0, 198, 251, 0.2);
}

.progress-bar-bg {
    background: rgba(30, 35, 45, 0.8);
    border-radius: 10px;
    height: 12px;
    width: 100%;
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar-fill {
    background: linear-gradient(90deg, #0078d7, #00c6fb, #667eea);
    background-size: 200% 100%;
    height: 100%;
    width: 0%;
    transition: width 0.4s ease;
    box-shadow: 0 0 20px rgba(0, 198, 251, 0.6),
        0 0 40px rgba(0, 198, 251, 0.3);
    animation: progressGlow 2s ease infinite;
    border-radius: 10px;
}

@keyframes progressGlow {

    0%,
    100% {
        background-position: 0% 50%;
        box-shadow: 0 0 20px rgba(0, 198, 251, 0.6),
            0 0 40px rgba(0, 198, 251, 0.3);
    }

    50% {
        background-position: 100% 50%;
        box-shadow: 0 0 30px rgba(0, 198, 251, 0.8),
            0 0 60px rgba(0, 198, 251, 0.5);
    }
}

.status-text {
    color: #e2e8f0;
    font-size: 0.95em;
    font-weight: 500;
}

.note {
    color: #718096;
    font-size: 0.88em;
    margin-top: 24px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    padding-top: 16px;
    line-height: 1.6;
}

.success-area {
    display: none;
    margin-top: 28px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.15) 0%, rgba(56, 161, 105, 0.15) 100%);
    border-radius: 12px;
    border: 2px solid rgba(72, 187, 120, 0.4);
    box-shadow: 0 4px 20px rgba(72, 187, 120, 0.2);
    animation: successFadeIn 0.5s ease;
}

@keyframes successFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.success-area p {
    color: #48bb78;
    margin: 0 0 16px 0;
    font-weight: 700;
    font-size: 1.1em;
    text-shadow: 0 2px 10px rgba(72, 187, 120, 0.3);
}

/* تحسينات الاستجابة */
@media (max-width: 768px) {
    .header-logo {
        width: 80px;
        height: 80px;
        top: 15px;
        right: 15px;
    }

    .upload-container {
        padding: 35px 25px;
        width: 95%;
    }

    .upload-container h2 {
        font-size: 1.5em;
    }

    .custom-file-upload {
        padding: 35px 20px;
    }

    .upload-icon {
        font-size: 36px;
    }
}