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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #e8e8eb;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 550px;
}

.payment-section {
    display: block;
}

.form-card {
    background: white;
    padding: 50px 45px;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 2px solid #d1d5db;
}

.form-group {
    margin-bottom: 28px;
}

.form-group label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 10px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    resize: vertical;
    background: white;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #d1d5db;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #9ca3af;
    background: #fafafa;
}

.form-group textarea {
    min-height: 110px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .form-card {
        margin: 20px auto;
        padding: 20px;
        width: 100%;
        max-width: 100%;
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }
}

.input-with-currency {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-currency input {
    padding-right: 50px;
}

.currency-badge {
    position: absolute;
    right: 16px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
}

.payment-method {
    padding: 12px 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    color: #666;
    font-size: 14px;
}

.btn-pay {
    width: 100%;
    padding: 14px 24px;
    background: #1f2937;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
}

.btn-pay:hover {
    background: #111827;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(31, 41, 55, 0.2);
}

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

.result {
    margin-top: 30px;
    padding: 24px;
    border-radius: 12px;
    animation: slideIn 0.3s ease;
}

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

.result.success {
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
}

.result.success h3 {
    color: #1e40af;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 600;
}

.result.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.result.error h3 {
    color: #dc2626;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

.result.error p {
    color: #991b1b;
    font-size: 14px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 14px;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item strong {
    color: #333;
    font-weight: 600;
}

.result-item-value {
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-item span {
    color: #667eea;
    font-weight: 500;
    word-break: break-word;
    max-width: 200px;
    text-align: right;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

.copy-btn svg {
    width: 18px;
    height: 18px;
    color: #667eea;
}

.copy-btn.copied svg {
    color: #10b981;
}

.loading {
    text-align: center;
    color: #667eea;
    padding: 30px;
}

.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #ddd;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Стили для загрузки чека */

.receipt-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.receipt-upload-area {
    border: 2px dashed #bfdbfe;
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafb;
}

.receipt-upload-area:hover {
    border-color: #93c5fd;
    background: #f0f7ff;
}

.receipt-upload-area.drag-over {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.upload-content svg {
    width: 40px;
    height: 40px;
    color: #667eea;
    opacity: 0.7;
}

.upload-content p {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin: 0;
}

.upload-hint {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

.receipt-status {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    animation: slideIn 0.3s ease;
}

.receipt-status svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.loading-receipt {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}

.loading-receipt svg {
    animation: spin 0.8s linear infinite;
}

.success-receipt {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.success-receipt svg {
    color: #10b981;
}

.success-receipt strong {
    font-weight: 600;
}

.error-receipt {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.error-receipt svg {
    color: #ef4444;
}

.spinner-small {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ddd;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@media (max-width: 600px) {
    .receipt-upload-area {
        padding: 24px 16px;
    }

    .upload-content svg {
        width: 32px;
        height: 32px;
    }

    .upload-content p {
        font-size: 13px;
    }

    .receipt-status {
        font-size: 12px;
        gap: 10px;
    }
}