* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 25%, #2c5364 50%, #203a43 75%, #0f2027 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    direction: rtl;
    position: relative;
    overflow-x: hidden;
    perspective: 1000px;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Animated background particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(42, 82, 152, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, -30px) scale(1.1); }
}

/* 3D Floating Shapes */
.shapes-3d {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    perspective: 2000px;
}

.shape-3d {
    position: absolute;
    opacity: 0.15;
    border-radius: 8px;
    animation: float3d 20s infinite ease-in-out;
}

.shape-1 {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    top: 10%;
    left: 10%;
    transform-style: preserve-3d;
    animation-delay: 0s;
    box-shadow: 0 20px 60px rgba(255, 107, 53, 0.3);
}

.shape-2 {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2a5298, #1e3c72);
    top: 60%;
    right: 15%;
    transform-style: preserve-3d;
    animation-delay: 2s;
    box-shadow: 0 15px 40px rgba(42, 82, 152, 0.3);
}

.shape-3 {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #ff6b35, #ffa366);
    bottom: 20%;
    left: 20%;
    transform-style: preserve-3d;
    animation-delay: 4s;
    border-radius: 50%;
    box-shadow: 0 20px 50px rgba(255, 107, 53, 0.25);
}

.shape-4 {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #2a5298, #4a7bc8);
    top: 30%;
    right: 25%;
    transform-style: preserve-3d;
    animation-delay: 1s;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    box-shadow: 0 15px 45px rgba(42, 82, 152, 0.25);
}

.shape-5 {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #ff8c42, #ff6b35);
    bottom: 40%;
    right: 10%;
    transform-style: preserve-3d;
    animation-delay: 3s;
    transform: rotate(45deg);
    box-shadow: 0 15px 40px rgba(255, 140, 66, 0.3);
}

.shape-6 {
    width: 110px;
    height: 110px;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    top: 50%;
    left: 5%;
    transform-style: preserve-3d;
    animation-delay: 5s;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    box-shadow: 0 20px 50px rgba(30, 60, 114, 0.3);
}

@keyframes float3d {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    25% {
        transform: translate3d(30px, -30px, 50px) rotateX(90deg) rotateY(45deg) rotateZ(45deg);
    }
    50% {
        transform: translate3d(-20px, 20px, -30px) rotateX(180deg) rotateY(90deg) rotateZ(90deg);
    }
    75% {
        transform: translate3d(40px, 10px, 40px) rotateX(270deg) rotateY(135deg) rotateZ(135deg);
    }
}

.container {
    width: 100%;
    max-width: 650px;
    animation: fadeIn 0.6s ease-in;
    position: relative;
    z-index: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    text-align: center;
    margin-bottom: 35px;
    color: white;
    position: relative;
}

.logo {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 50%, #ffa366 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
    letter-spacing: 2px;
    position: relative;
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(255, 107, 53, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(255, 107, 53, 0.6));
    }
}

.tagline {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    padding: 45px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
    animation: cardFloat 6s ease-in-out infinite;
}

@keyframes cardFloat {
    0%, 100% {
        transform: translateY(0) rotateX(0deg) rotateY(0deg);
    }
    50% {
        transform: translateY(-10px) rotateX(2deg) rotateY(1deg);
    }
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 107, 53, 0.05), transparent);
    animation: shine 8s infinite;
    pointer-events: none;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.upload-area {
    border: 3px dashed #2a5298;
    border-radius: 18px;
    padding: 70px 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, rgba(42, 82, 152, 0.03) 0%, rgba(30, 60, 114, 0.03) 100%);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.1), transparent);
    transition: left 0.5s;
}

.upload-area:hover::before {
    left: 100%;
}

.upload-area:hover {
    border-color: #ff6b35;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.08) 0%, rgba(255, 140, 66, 0.08) 100%);
    transform: translateY(-3px) rotateX(5deg) rotateY(-2deg);
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.3);
}

.upload-area.dragover {
    border-color: #ff6b35;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, rgba(255, 140, 66, 0.15) 100%);
    transform: scale(1.02) rotateX(8deg) rotateY(-3deg);
    box-shadow: 0 20px 50px rgba(255, 107, 53, 0.4);
}

.upload-icon {
    width: 72px;
    height: 72px;
    color: #2a5298;
    margin: 0 auto 25px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 4px 8px rgba(42, 82, 152, 0.2));
    transform-style: preserve-3d;
    animation: icon3dRotate 8s ease-in-out infinite;
}

@keyframes icon3dRotate {
    0%, 100% {
        transform: rotateY(0deg) rotateX(0deg);
    }
    25% {
        transform: rotateY(90deg) rotateX(10deg);
    }
    50% {
        transform: rotateY(180deg) rotateX(0deg);
    }
    75% {
        transform: rotateY(270deg) rotateX(-10deg);
    }
}

.upload-area:hover .upload-icon {
    color: #ff6b35;
    transform: scale(1.15) translateY(-5px) translateZ(20px) rotateY(15deg);
    filter: drop-shadow(0 8px 16px rgba(255, 107, 53, 0.4));
    animation: icon3dRotate 4s ease-in-out infinite;
}

.upload-text {
    font-size: 1.3rem;
    color: #2a5298;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.upload-hint {
    font-size: 0.95rem;
    color: #666;
    margin-top: 8px;
    font-weight: 400;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    color: white;
    padding: 18px 24px;
    border-radius: 14px;
    margin-bottom: 24px;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1), fileInfo3d 4s ease-in-out infinite;
    box-shadow: 0 8px 20px rgba(42, 82, 152, 0.3);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

@keyframes fileInfo3d {
    0%, 100% {
        transform: rotateX(0deg) rotateY(0deg);
    }
    50% {
        transform: rotateX(2deg) rotateY(1deg);
    }
}

.file-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.file-name {
    flex: 1;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1rem;
    letter-spacing: 0.3px;
}

.license-section {
    margin: 24px 0;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.license-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: #2a5298;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}

.icon-small {
    width: 20px;
    height: 20px;
    color: #2a5298;
    transition: all 0.3s ease;
}

.license-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.license-input:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.15), 0 4px 12px rgba(255, 107, 53, 0.2);
    transform: translateY(-1px);
}

.license-input::placeholder {
    color: #aaa;
}

.license-hint {
    font-size: 0.875rem;
    color: #777;
    margin-top: 10px;
    font-style: italic;
    line-height: 1.4;
}

.btn-remove {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 12px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-remove:hover {
    background: rgba(255, 107, 53, 0.9);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.progress-container {
    margin: 24px 0;
    animation: fadeIn 0.4s ease;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2a5298 0%, #ff6b35 50%, #ff8c42 100%);
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    animation: progressPulse 2s ease-in-out infinite, progressFlow 3s linear infinite;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

@keyframes progressPulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
    }
    50% {
        opacity: 0.9;
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.8);
    }
}

@keyframes progressFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.progress-text {
    text-align: center;
    color: #555;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.btn-submit {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 50%, #ffa366 100%);
    background-size: 200% 200%;
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 6px 20px rgba(255, 107, 53, 0.4),
        0 0 0 0 rgba(255, 107, 53, 0.5);
    margin-top: 24px;
    animation: fadeIn 0.4s ease, buttonGlow 3s ease-in-out infinite, button3d 5s ease-in-out infinite;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

@keyframes button3d {
    0%, 100% {
        transform: rotateX(0deg) rotateY(0deg);
    }
    25% {
        transform: rotateX(3deg) rotateY(2deg);
    }
    50% {
        transform: rotateX(0deg) rotateY(0deg);
    }
    75% {
        transform: rotateX(-3deg) rotateY(-2deg);
    }
}

@keyframes buttonGlow {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4), 0 0 0 0 rgba(255, 107, 53, 0.5);
    }
    50% {
        box-shadow: 0 8px 30px rgba(255, 107, 53, 0.6), 0 0 0 8px rgba(255, 107, 53, 0);
    }
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-submit:hover:not(:disabled)::before {
    width: 300px;
    height: 300px;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-3px) translateZ(10px) rotateX(5deg) rotateY(-2deg);
    box-shadow: 
        0 15px 45px rgba(255, 107, 53, 0.6),
        0 0 0 0 rgba(255, 107, 53, 0.7),
        inset 0 0 30px rgba(255, 255, 255, 0.2);
    background-position: 100% 50%;
}

.btn-submit:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    animation: none;
}

.alert {
    margin-top: 24px;
    padding: 16px 20px;
    border-radius: 12px;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
}

.alert.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-color: #28a745;
}

.alert.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-color: #dc3545;
}

.alert.info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-color: #17a2b8;
}

.footer {
    text-align: center;
    margin-top: 35px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    font-weight: 400;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

@media (max-width: 640px) {
    .card {
        padding: 35px 25px;
        border-radius: 20px;
    }

    .logo {
        font-size: 2.2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .upload-area {
        padding: 50px 20px;
    }

    .upload-text {
        font-size: 1.1rem;
    }

    .upload-icon {
        width: 60px;
        height: 60px;
    }

    .btn-submit {
        padding: 16px;
        font-size: 1.05rem;
    }
}