* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Prevents vertical centering of all content */
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #4776E6, #8E54E9);
}

.container {
    flex: 1 0 auto;
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    text-align: center;
    max-width: 800px;
    width: 100%;
    margin: 20px;
}

.footer {
    flex-shrink: 0;
    width: 100vw;
    text-align: center;
    padding: 16px 0;
    color: #555;
    font-size: 1rem;
    margin-top: auto;
    position: relative;
    left: 50%;
    right: 50%;
    transform: translateX(-50%);
}

.header h1 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.header p {
    color: #555;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.5;
}

/* Drag & Drop Zone */
.drop-zone {
    border: 3px dashed #6c5ce7;
    border-radius: 15px;
    padding: 40px 20px;
    margin: 20px 0;
    background-color: #f8f9ff;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.drop-zone:hover, .drop-zone.dragover {
    background-color: #eef0ff;
    border-color: #a29bfe;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    color: #6c5ce7;
    margin-bottom: 15px;
    display: block;
}

.drop-zone p {
    color: #555;
    margin: 10px 0;
    font-size: 1.1rem;
}

.or {
    color: #aaa;
    font-size: 0.9rem;
    margin: 15px 0;
}

.browse-btn {
    background: #6c5ce7;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.browse-btn:hover {
    background: #5649c3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

#fileInput {
    display: none;
}

/* File List */
.file-list {
    text-align: left;
    margin: 20px 0;
    max-height: 200px;
    overflow-y: auto;
    padding: 0 10px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 5px 0;
    font-size: 0.95rem;
}

.file-icon {
    color: #6c5ce7;
    margin-right: 10px;
    font-size: 1.2rem;
}

.file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    color: #666;
    font-size: 0.85rem;
    margin-left: 10px;
}

/* Convert Button */
.convert-btn {
    background: #00b894;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 20px 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.convert-btn:hover:not(:disabled) {
    background: #00a085;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 184, 148, 0.3);
}

.convert-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Progress Section */
.progress-section {
    display: none;
    margin: 25px 0;
    text-align: left;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.progress-bar-container {
    height: 15px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 5px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00c853, #00e676);
    width: 0%;
    transition: width 0.3s ease;
}

/* Results Container */
.results-container {
    margin-top: 30px;
}

.result-item {
    background: #f8f9ff;
    border: 1px solid #e3e7ff;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    text-align: left;
}

.result-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.result-item.success {
    border-left: 5px solid #00c853;
}

.result-item.error {
    border-left: 5px solid #ff3d00;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.result-icon {
    font-size: 1.5rem;
}

.result-filename {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.result-status {
    margin: 0 15px;
    font-weight: 500;
    min-width: 100px;
    text-align: center;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.status-waiting {
    background: #fff3cd;
    color: #856404;
}

.status-converting {
    background: #d1ecf1;
    color: #0c5460;
}

.status-success {
    background: #d4edda;
    color: #155724;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
}

.download-btn {
    background: #00b894;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-btn:hover {
    background: #00a085;
    transform: translateY(-1px);
}

.download-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
        margin: 10px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .drop-zone {
        padding: 30px 15px;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .result-actions {
        width: 100%;
        margin-top: 15px;
        display: flex;
        justify-content: space-between;
    }
    
    .download-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Scrollbar styling */
.file-list::-webkit-scrollbar {
    width: 8px;
}

.file-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.file-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.file-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}