* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    padding: 30px 20px;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    margin-bottom: 30px;
}

.order-form {
    max-width: 600px;
    margin: 0 auto 40px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.order-input {
    width: 100%;
    padding: 18px;
    font-size: 18px;
    border: 3px solid #e1e5e9;
    border-radius: 12px;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.order-input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.char-counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 14px;
    color: #666;
}

.hint {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.validation-rules {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 4px solid #3498db;
}

.validation-rules p {
    margin-bottom: 8px;
    padding-left: 10px;
    position: relative;
}

.validation-rules p:before {
    content: '✓';
    position: absolute;
    left: -5px;
    color: #2ecc71;
    font-weight: bold;
}

.btn-primary, .btn-secondary, .btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 35px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    min-width: 200px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #555;
    border: 3px solid #e1e5e9;
}

.btn-secondary:hover {
    background: #f8f9fa;
    border-color: #667eea;
    color: #667eea;
}

.btn-download {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    font-size: 18px;
    padding: 20px 40px;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(76, 175, 80, 0.4);
}

.btn-icon {
    font-size: 1.2em;
}

.info-box {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    border-left: 6px solid #667eea;
    margin-top: 40px;
}

.info-box h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 20px;
}

.info-box ol {
    margin-left: 25px;
    margin-bottom: 25px;
}

.info-box li {
    margin-bottom: 12px;
    padding-left: 8px;
}

.example-orders {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #e1e5e9;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.example-id {
    font-family: 'Courier New', monospace;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e1e5e9;
    text-align: center;
    font-weight: bold;
    letter-spacing: 1px;
}

/* Order Header Styles */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 3px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 20px;
}

.order-id-display {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.order-id-label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.order-id-value {
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px 25px;
    border-radius: 10px;
    border: 3px solid #e1e5e9;
    letter-spacing: 2px;
}

.order-id-length {
    font-size: 12px;
    color: #7f8c8d;
    text-align: center;
    margin-top: 5px;
}

.status-display {
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    color: white;
    text-align: center;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Success Header */
.success-header {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    padding: 40px 20px;
    border-radius: 15px;
    margin-bottom: 40px;
}

.success-header h1 {
    color: white;
    font-size: 2.8em;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
    font-size: 18px;
    border: 3px solid #c3e6cb;
}

.order-details {
    margin-bottom: 40px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
}

.order-details h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.details-content {
    background: white;
    padding: 25px;
    border-radius: 8px;
    white-space: pre-line;
    line-height: 1.8;
    font-size: 16px;
    border: 2px solid #e1e5e9;
}

.download-section {
    margin-bottom: 40px;
}

.download-section h3 {
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    border: 3px solid #e1e5e9;
    transition: all 0.3s;
}

.file-item:hover {
    border-color: #667eea;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.file-icon {
    font-size: 2em;
    margin-right: 20px;
    min-width: 60px;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    color: #2c3e50;
}

.file-size {
    font-size: 14px;
    color: #7f8c8d;
}

.file-item .btn-download {
    padding: 12px 25px;
    font-size: 16px;
    min-width: auto;
}

/* Processing Page Styles */
.processing-section {
    padding: 30px 0;
}

.loader-container {
    text-align: center;
    margin-bottom: 40px;
}

.loader {
    width: 100px;
    height: 100px;
    border: 8px solid #f3f3f3;
    border-top: 8px solid #667eea;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    margin: 0 auto 25px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    font-size: 20px;
    color: #2c3e50;
    font-weight: 500;
}

.progress-container {
    max-width: 600px;
    margin: 40px auto;
}

.progress-bar {
    height: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 40px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    transition: width 1s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 20px;
}

.progress-steps:before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 3px;
    background: #f0f0f0;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    min-width: 100px;
}

.step-number {
    width: 35px;
    height: 35px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
    color: #666;
    border: 3px solid #f0f0f0;
}

.step.active .step-number {
    background: #667eea;
    color: white;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.step.completed .step-number {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.step-text {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    text-align: center;
}

.waiting-info {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin: 40px 0;
}

.waiting-info h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.waiting-info ul {
    margin-left: 25px;
    margin-bottom: 25px;
}

.waiting-info li {
    margin-bottom: 12px;
    padding-left: 8px;
}

.auto-refresh {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e1e5e9;
}

.auto-refresh p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#countdown {
    font-weight: bold;
    font-size: 18px;
    color: #667eea;
    background: #f0f0f0;
    padding: 5px 15px;
    border-radius: 20px;
}

.actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 14px;
}

.footer a {
    color: white;
    text-decoration: underline;
}

.footer a:hover {
    color: #f0f0f0;
}

.error {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    text-align: center;
}

.error h2 {
    color: #e74c3c;
    margin-bottom: 20px;
    font-size: 2em;
}

.error-details {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin: 25px 0;
    text-align: left;
    border-left: 4px solid #e74c3c;
}

.error-details p {
    margin-bottom: 10px;
}

.error-details code {
    background: white;
    padding: 10px 15px;
    border-radius: 6px;
    border: 2px solid #e1e5e9;
    font-family: 'Courier New', monospace;
    display: inline-block;
    margin-top: 5px;
}

.admin-notice {
    background: #fff3cd;
    color: #856404;
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
    border: 2px solid #ffeaa7;
    text-align: center;
}

.admin-notice code {
    background: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    margin: 0 5px;
}

.order-id-confirmation {
    text-align: center;
    margin-bottom: 40px;
}

.confirmation-box {
    background: #e8f4fd;
    padding: 30px;
    border-radius: 12px;
    border: 3px solid #3498db;
    max-width: 600px;
    margin: 0 auto;
}

.order-id-large {
    font-family: 'Courier New', monospace;
    font-size: 32px;
    font-weight: bold;
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    letter-spacing: 3px;
    border: 3px solid #3498db;
    color: #2c3e50;
}

.confirmation-note {
    color: #666;
    font-size: 16px;
    margin-top: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .order-header {
        flex-direction: column;
        text-align: center;
    }
    
    .order-id-value {
        font-size: 18px;
        padding: 12px 20px;
    }
    
    .status-display {
        min-width: 100%;
    }
    
    .btn-primary, .btn-secondary, .btn-download {
        width: 100%;
        min-width: auto;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .example-grid {
        grid-template-columns: 1fr;
    }
    
    .order-id-large {
        font-size: 20px;
        padding: 15px;
        letter-spacing: 2px;
    }
    
    .form-sections {
        grid-template-columns: 1fr !important;
    }
}