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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    margin-bottom: 40px;
    color: white;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.username {
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-1px);
}

.upload-section {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.file-input-wrapper {
    position: relative;
    border: 3px dashed #ddd;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafafa;
}

.file-input-wrapper:hover,
.file-input-wrapper.drag-over {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.file-input-label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.upload-icon {
    font-size: 3rem;
    opacity: 0.7;
}

.upload-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.upload-text strong {
    font-size: 1.2rem;
    color: #333;
}

.upload-text span {
    color: #666;
    font-size: 0.9rem;
}

.selected-files {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.selected-files h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 4px solid #667eea;
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-name {
    font-weight: 500;
    color: #333;
}

.file-size {
    font-size: 0.85rem;
    color: #666;
}

.remove-file {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-file:hover {
    background: #ff3742;
    transform: scale(1.1);
}

.upload-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 30px;
}

.upload-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.upload-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.progress-section,
.results-section,
.error-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.progress-section h3,
.results-section h3,
.error-section h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.progress-item,
.overall-progress {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.overall-progress {
    border-left: 4px solid #28a745;
    background: #f8fff8;
}

.progress-file-name {
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.9rem;
    color: #666;
    text-align: right;
}

.result-item {
    padding: 20px;
    background: #f8fff8;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #28a745;
}

.result-filename {
    font-weight: 500;
    margin-bottom: 10px;
    color: #333;
}

.result-url {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.result-url strong {
    color: #333;
    min-width: 70px;
}

.cdn-link {
    color: #667eea;
    text-decoration: none;
    word-break: break-all;
    flex: 1;
    min-width: 200px;
}

.cdn-link:hover {
    text-decoration: underline;
}

.copy-btn {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #138496;
    transform: translateY(-1px);
}

.error-section {
    border-left: 4px solid #dc3545;
}

.error-section h3 {
    color: #dc3545;
}

.error-file {
    padding: 10px;
    background: #fff5f5;
    border-radius: 6px;
    margin-bottom: 8px;
    color: #721c24;
    border-left: 3px solid #dc3545;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .upload-section {
        padding: 25px;
    }

    .file-input-wrapper {
        padding: 40px 20px;
    }

    .result-url {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .cdn-link {
        word-break: break-all;
        width: 100%;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.progress-section,
.results-section,
.error-section {
    animation: fadeInUp 0.5s ease;
}