/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    min-height: 100vh;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

/* Main sections */
main {
    margin-bottom: 40px;
}

section {
    margin-bottom: 30px;
}

/* Upload widget */
.upload-widget {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

.upload-area {
    padding: 60px 40px;
    text-align: center;
    border: 3px dashed #e0e0e0;
    margin: 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #2563eb;
    background-color: #f8f9ff;
}

.upload-area.dragover {
    border-color: #2563eb;
    background-color: #f0f2ff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-area h3 {
    margin-bottom: 10px;
    color: #333;
}

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

.browse-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.browse-btn:hover {
    background: #1d4ed8;
}

/* Progress */
.upload-progress {
    padding: 40px;
    text-align: center;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
    width: 0%;
    transition: width 0.3s ease;
}

/* Pricing section */
.pricing-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.pricing-card h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.file-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.file-info p {
    margin-bottom: 8px;
}

.pricing-breakdown {
    margin-bottom: 30px;
}

.pricing-breakdown h4 {
    margin-bottom: 15px;
    color: #333;
}

.price-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.price-total {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-top: 2px solid #e0e0e0;
    margin-top: 15px;
    font-size: 1.2rem;
}

.checkout-btn {
    width: 100%;
    background: #28a745;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-bottom: 20px;
}

.checkout-btn:hover {
    background: #218838;
}

.checkout-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.guarantee {
    text-align: center;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.guarantee p {
    margin-bottom: 8px;
}

.guarantee a {
    color: #2563eb;
    text-decoration: none;
}

.guarantee a:hover {
    text-decoration: underline;
}

/* Error section */
.error-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    border-left: 4px solid #dc3545;
}

.error-card h3 {
    color: #dc3545;
    margin-bottom: 20px;
}

.retry-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s ease;
}

.retry-btn:hover {
    background: #1d4ed8;
}

/* Footer */
footer {
    color: white;
    text-align: center;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.feature h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.feature p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.legal-links {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 20px;
}

.legal-links a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.legal-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

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

    header h1 {
        font-size: 2.5rem;
    }

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

    .pricing-card {
        padding: 30px 20px;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Success Page Styles */
.success-section {
    margin-bottom: 40px;
}

.success-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 30px;
}

.status-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.success-card h2 {
    color: #22c55e;
    margin-bottom: 15px;
    font-size: 2rem;
}

.success-message {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

/* Processing Status */
.processing-status {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.status-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spinner {
    margin-bottom: 20px;
}

.spinner-ring {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

#statusTitle {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

#statusMessage {
    color: #666;
    max-width: 500px;
    margin: 0 auto;
}

/* Download Section */
.download-section {
    background: #f0f9ff;
    border: 2px solid #22c55e;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.download-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.download-section h3 {
    color: #22c55e;
    margin-bottom: 15px;
}

.download-btn {
    display: inline-block;
    background: #22c55e;
    color: white;
    text-decoration: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 20px 0;
    transition: background 0.3s ease;
}

.download-btn:hover {
    background: #16a34a;
}

.download-note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 15px;
}

/* Error Section */
.error-section {
    background: #fef2f2;
    border: 2px solid #ef4444;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.error-section h3 {
    color: #ef4444;
    margin-bottom: 15px;
}

.support-message {
    margin-top: 15px;
    font-size: 0.9rem;
}

.support-message a {
    color: #2563eb;
    text-decoration: none;
}

.support-message a:hover {
    text-decoration: underline;
}

/* Job Info */
.job-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    text-align: left;
    margin-top: 30px;
}

.job-info h4 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.info-item .label {
    font-weight: 600;
    color: #555;
}

.info-item .value {
    color: #333;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.status-awaiting_payment {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-paid {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.status-processing {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-processed {
    background: #dcfce7;
    color: #166534;
}

.status-badge.status-failed {
    background: #fecaca;
    color: #dc2626;
}

/* Explanation Section */
.explanation-section {
    margin-bottom: 40px;
}

.explanation-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.explanation-card h3 {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.problem-solution {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 25px;
}

.problem, .solution {
    padding: 20px;
    border-radius: 8px;
}

.problem {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
}

.solution {
    background: #f0f9ff;
    border-left: 4px solid #22c55e;
}

.problem h4, .solution h4 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.problem h4 {
    color: #ef4444;
}

.solution h4 {
    color: #22c55e;
}

.problem ul, .solution ul {
    margin: 0;
    padding-left: 20px;
}

.problem li, .solution li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.tech-note {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Responsive for success page */
@media (max-width: 768px) {
    .success-card {
        padding: 30px 20px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .problem-solution {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .explanation-card {
        padding: 25px 20px;
    }
}

/* Benefits Section */
.benefits-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.benefits-section h2 {
    text-align: center;
    color: #1e40af;
    font-size: 2.2rem;
    margin-bottom: 30px;
}

.benefits {
    display: grid;
    gap: 25px;
    margin-bottom: 35px;
}

.benefit {
    background: #f8fafc;
    border-radius: 10px;
    padding: 25px;
    border-left: 4px solid #3b82f6;
}

.benefit.primary {
    border-left-color: #22c55e;
    background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 100%);
}

.benefit.secondary {
    border-left-color: #6366f1;
    background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
}

.benefit h3 {
    color: #1e40af;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.benefit.primary h3 {
    color: #15803d;
}

.benefit.secondary h3 {
    color: #4338ca;
}

.benefit p {
    line-height: 1.6;
    color: #374151;
}

.use-cases {
    background: #fafafa;
    border-radius: 10px;
    padding: 25px;
}

.use-cases h3 {
    color: #1e40af;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.use-cases ul {
    list-style: none;
    padding-left: 0;
}

.use-cases li {
    margin-bottom: 8px;
    color: #374151;
    font-size: 1rem;
}

/* Responsive benefits */
@media (min-width: 768px) {
    .benefits {
        grid-template-columns: 1fr 1fr;
    }
}

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

.loading {
    opacity: 0.6;
    pointer-events: none;
}