/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Main Content */
main {
    padding: 40px 30px;
    min-height: 400px;
}

/* Upload Section */
.upload-section {
    text-align: center;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 30px;
    background: #f8f9ff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #764ba2;
    background: #f0f2ff;
    transform: translateY(-2px);
}

.upload-icon {
    width: 80px;
    height: 80px;
    color: #667eea;
    margin: 0 auto 20px;
}

.upload-area h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
}

.upload-area p {
    color: #666;
    margin-bottom: 20px;
}

/* File Info */
.file-info {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 30px;
    margin-top: 20px;
}

.file-details {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.file-icon {
    width: 50px;
    height: 50px;
    color: #667eea;
    flex-shrink: 0;
}

.file-text {
    text-align: left;
    flex-grow: 1;
}

.file-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    word-break: break-all;
}

.file-size {
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Buttons */
.btn {
    padding: 14px 30px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-download {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-size: 1.1rem;
    padding: 16px 40px;
}

/* Progress Section */
.progress-section {
    text-align: center;
    padding: 60px 30px;
}

.progress-content h3 {
    font-size: 1.8rem;
    color: #333;
    margin: 30px 0 10px;
}

.progress-content p {
    color: #666;
    font-size: 1rem;
}

/* Spinner */
.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success Section */
.success-section {
    text-align: center;
    padding: 60px 30px;
}

.success-content h3 {
    font-size: 1.8rem;
    color: #11998e;
    margin: 20px 0 10px;
}

.success-content p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 30px;
}

.success-icon {
    width: 80px;
    height: 80px;
    color: #38ef7d;
    margin: 0 auto;
}

/* Error Section */
.error-section {
    text-align: center;
    padding: 60px 30px;
}

.error-content h3 {
    font-size: 1.8rem;
    color: #f5576c;
    margin: 20px 0 10px;
}

.error-content p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 30px;
}

.error-icon {
    width: 80px;
    height: 80px;
    color: #f5576c;
    margin: 0 auto;
}

/* Footer */
footer {
    background: #f8f9fa;
    padding: 30px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

/* Ad Container Styles */
.ad-container {
    margin: 30px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-horizontal {
    width: 100%;
    max-width: 100%;
}

.ad-container ins {
    display: block;
    text-align: center;
}

/* Ensure ads are responsive */
@media (max-width: 768px) {
    .ad-container {
        margin: 20px 0;
        padding: 10px;
        min-height: 80px;
    }
}

footer p {
    color: #666;
    font-size: 0.9rem;
    margin: 5px 0;
}

.disclaimer {
    font-size: 0.8rem;
    color: #999;
}

.footer-links {
    margin-top: 15px;
}

.footer-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    main {
        padding: 30px 20px;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .upload-icon,
    .success-icon,
    .error-icon {
        width: 60px;
        height: 60px;
    }

    .upload-area h2 {
        font-size: 1.2rem;
    }

    .file-details {
        flex-direction: column;
        text-align: center;
    }

    .file-text {
        text-align: center;
    }

    .btn {
        width: 100%;
        margin: 5px 0;
    }

    .progress-content h3,
    .success-content h3,
    .error-content h3 {
        font-size: 1.5rem;
    }
}

/* Accessibility */
.btn:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Smooth Transitions */
.upload-section,
.progress-section,
.success-section,
.error-section {
    transition: opacity 0.3s ease;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .container {
        box-shadow: none;
    }

    .btn {
        display: none;
    }
}
