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

body {
    font-family: 'Arial', sans-serif;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
}

.upload-panel {
    position: fixed;
    right: 20px;
    top: 20px;
    width: 350px;
    max-height: 500px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    display: none;
    flex-direction: column;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 140, 66, 0.3);
}

.upload-panel-header {
    padding: 15px 20px;
    border-bottom: 2px solid rgba(255, 140, 66, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    border-radius: 15px 15px 0 0;
}

.upload-panel-header h3 {
    color: white;
    font-size: 16px;
    margin: 0;
    font-weight: bold;
}

.close-panel {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: all 0.3s;
}

.close-panel:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

.upload-panel-content {
    padding: 15px;
    overflow-y: auto;
    max-height: 450px;
}

.upload-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.no-uploads {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 20px;
    font-style: italic;
}

.upload-item {
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #ff6b35;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.upload-item.uploading {
    border-left-color: #ffa500;
    background: #fff9e6;
}

.upload-item.success {
    border-left-color: #4caf50;
    background: #e8f5e9;
}

.upload-item.error {
    border-left-color: #f44336;
    background: #ffebee;
}

.upload-item-name {
    font-weight: bold;
    color: #333;
    font-size: 14px;
    word-break: break-all;
}

.upload-item-status {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.upload-item-time {
    font-size: 11px;
    color: #999;
}

.upload-progress {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 5px;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff6b35, #ffa500);
    width: 0%;
    transition: width 0.3s;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.container {
    width: 100%;
    height: 100%;
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.popup:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.popup-content {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 25px;
    padding: 40px 35px;
    box-shadow: 0 15px 50px rgba(255, 107, 53, 0.3), 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 320px;
    max-width: 420px;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 140, 66, 0.2);
    position: relative;
}

.popup-content.success-state {
    max-width: 400px;
    padding: 0px 30px 25px;
    min-height: auto;
    transform: translateY(50px);
}

.popup-content > * {
    position: relative;
    z-index: 1;
}

.gif-wrapper {
    width: 150px;
    height: 225px;
    margin: 0 auto 20px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.gif-wrapper.success-gif {
    width: 300px;
    height: 450px;
    margin: -100px auto 0;
    margin-bottom: 0;
    transform: translateY(180px);
}

.character-gif {
    width: 150px;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    transition: opacity 0.3s ease, width 0.3s ease;
    margin-top: -38px;
}

.gif-wrapper.success-gif .character-gif {
    width: 300px;
    margin-top: 0;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    pointer-events: none;
    margin-top: -20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 165, 0, 0.3);
    border-top: 4px solid #ff8c42;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.welcome-title {
    font-size: 32px;
    font-weight: bold;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 50%, #ffa500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(255, 140, 66, 0.3);
}

.welcome-text {
    font-size: 20px;
    font-weight: 600;
    color: #ff6b35;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.popup-content.success-state .welcome-title {
    font-size: 26px;
    margin-top: -30px;
    margin-bottom: 6px;
}

.popup-content.success-state .welcome-text {
    font-size: 16px;
    margin-bottom: 20px;
}

.gif-control {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.gif-control label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: #ff6b35;
    font-weight: bold;
}

.gif-control input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.gif-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff6b35;
    cursor: pointer;
}

.gif-control input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff6b35;
    cursor: pointer;
    border: none;
}

.instruction-text {
    font-size: 15px;
    color: #ff8c42;
    margin-bottom: 15px;
    font-weight: 500;
}

.download-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sunset-btn {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 50%, #ffa500 100%);
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sunset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
    background: linear-gradient(135deg, #ff7d4a 0%, #ff9d5c 50%, #ffb833 100%);
}

.sunset-btn:active {
    transform: translateY(0);
}

.download-btn {
    /* Inherits from .sunset-btn */
}

.convert-another-btn {
    /* Inherits from .sunset-btn */
    background: linear-gradient(135deg, #ff8c42 0%, #ffa500 50%, #ffb833 100%);
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.4);
}

.convert-another-btn:hover {
    background: linear-gradient(135deg, #ff9d5c 0%, #ffb833 50%, #ffc966 100%);
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.6);
}

/* Dancing animation for conversion */
.dancing {
    animation: dance 0.5s infinite;
}

@keyframes dance {
    0%, 100% {
        transform: rotate(0deg) translateY(0);
    }
    25% {
        transform: rotate(-5deg) translateY(-5px);
    }
    50% {
        transform: rotate(0deg) translateY(-10px);
    }
    75% {
        transform: rotate(5deg) translateY(-5px);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .popup-content {
        min-width: 250px;
        padding: 20px;
    }
    
    .character-gif {
        width: 120px;
    }
    
    .welcome-text {
        font-size: 16px;
    }
    
    .instruction-text {
        font-size: 12px;
    }
}

