* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
}

.container {
    width: 100%;
    max-width: 600px;
}

.payment-form-wrapper {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
}

.form-title {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    margin-bottom: 32px;
    text-align: left;
}

.payment-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: #fafafa;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #6366f1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder {
    color: #999;
}

.hint {
    font-size: 12px;
    color: #666;
    margin-top: -4px;
}

.payment-methods-section {
    margin-top: 8px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.payment-methods .payment-method-card:first-child {
    grid-column: 1 / -1;
}

.payment-method-card {
    display: block;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.payment-method-card:hover {
    border-color: #d0d0d0;
}

.payment-method-card input[type="radio"] {
    display: none;
}

.payment-method-card.selected {
    border-color: #6366f1;
    background: #f8f9ff;
}

.method-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.method-text {
    flex: 1;
}

.method-text p {
    margin: 0;
}

.method-name {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin-bottom: 4px;
}

.method-description {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.method-image {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 60px;
}

.method-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}

.btn-pay {
    width: 100%;
    padding: 14px 24px;
    background: #9ca3af;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-pay:hover:not(:disabled) {
    background: #6b7280;
}

.btn-pay:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-pay:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-pay.loading {
    position: relative;
    color: transparent;
}

.btn-pay.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.link-personal-cabinet {
    text-align: center;
    color: #6366f1;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.link-personal-cabinet:hover {
    color: #4f46e5;
    text-decoration: underline;
}

.payment-status {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
}

.payment-status.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.payment-status.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.payment-status.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Адаптивность */
@media (max-width: 640px) {
    .payment-form-wrapper {
        padding: 24px;
    }

    .form-title {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .payment-form {
        gap: 20px;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }

    .payment-methods .payment-method-card:first-child {
        grid-column: 1;
    }
}
