Загрузка данных


<!DOCTYPE html>
<html lang="ru">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Белый NFC Терминал</title>
    <style>
        * {
            box-sizing: border-box;
            font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            margin: 0;
            padding: 0;
        }

        body {
            background: #f0f2f5;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
        }

        /* Корпус терминала */
        .terminal {
            background: #ffffff;
            width: 360px;
            border-radius: 40px;
            padding: 30px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05), 
                        0 0 0 10px #fcfcfc;
            border: 1px solid #e6e8eb;
            text-align: center;
            transition: all 0.3s ease;
        }

        /* Экран ввода суммы */
        .screen {
            background: #f7f9fa;
            border-radius: 20px;
            padding: 20px;
            margin-bottom: 25px;
            border: 1px solid #edf0f2;
        }

        .screen-label {
            font-size: 13px;
            color: #8a94a6;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 8px;
        }

        .amount-input-wrapper {
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 32px;
            font-weight: 700;
            color: #1e2530;
        }

        .amount-input {
            background: transparent;
            border: none;
            outline: none;
            text-align: right;
            width: 180px;
            font-size: 32px;
            font-weight: 700;
            color: #1e2530;
            padding-right: 5px;
        }

        /* Большая NFC Метка */
        .nfc-zone {
            background: #f7f9fa;
            border: 3px dashed #e1e5e8;
            border-radius: 30px;
            padding: 40px 20px;
            cursor: pointer;
            transition:建设 all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }

        .nfc-zone:hover {
            background: #f1f4f7;
            border-color: #cbd2d9;
        }

        .nfc-icon {
            width: 80px;
            height: 80px;
            margin: 0 auto 15px;
            display: block;
            fill: #a2aab8;
            transition: all 0.3s ease;
        }

        .nfc-text {
            font-size: 14px;
            color: #626d7a;
            font-weight: 600;
        }

        /* Статус успешной оплаты */
        .status-container {
            display: none;
            margin-top: 20px;
            padding: 15px;
            border-radius: 15px;
            background: #f0fdf4;
            border: 1px solid #bbf7d0;
            animation: slideUp 0.4s ease forwards;
        }

        .success-text {
            color: #16a34a;
            font-size: 20px;
            font-weight: 700;
            margin-bottom: 5px;
        }

        .code-text {
            color: #15803d;
            font-size: 14px;
            font-weight: 500;
        }

        @keyframes slideUp {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
    </style>
</head>
<body>

    <div class="terminal">
        <!-- Экран терминала -->
        <div class="screen">
            <div class="screen-label">Введите сумму</div>
            <div class="amount-input-wrapper">
                <input type="number" class="amount-input" id="amount" value="500" min="1" placeholder="0">
                <span>₽</span>
            </div>
        </div>

        <!-- Крупная NFC зона для прикладывания карты/телефона -->
        <div class="nfc-zone" id="nfcButton" onclick="processPayment()">
            <!-- SVG иконка бесконтактной оплаты (NFC) -->
            <svg class="nfc-icon" id="nfcIcon" viewBox="0 0 24 24">
                <path d="M4 18.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm0-4c-3.03 0-5.5-2.47-5.5-5.5S.97 3.5 4 3.5s5.5 2.47 5.5 5.5-2.47 5.5-5.5 5.5zm0-9C2.07 5.5.5 7.07.5 9s1.57 3.5 3.5 3.5S7.5 10.93 7.5 9 5.93 5.5 4 5.5zM12 20c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-18C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.5 11c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"/>
                <path d="M11.5 16.5c-2.48 0-4.5-2.02-4.5-4.5s2.02-4.5 4.5-4.5 4.5 2.02 4.5 4.5-2.02 4.5-4.5 4.5zm0-7c-1.38 0-2.5 1.12-2.5 2.5s1.12 2.5 2.5 2.5 2.5-1.12 2.5-2.5-1.12-2.5-2.5-2.5z"/>
            </svg>
            <div class="nfc-text" id="nfcText">Приложите карту или телефон</div>
        </div>

        <!-- Блок статуса успешной операции -->
        <div class="status-container" id="statusContainer">
            <div class="success-text">✓ УСПЕШНО</div>
            <div class="code-text" id="authCode">Код подтверждения: 0000</div>
        </div>
    </div>

    <script>
        function processPayment() {
            const amount = document.getElementById('amount').value;
            
            if (!amount || amount <= 0) {
                alert('Пожалуйста, введите корректную сумму для оплаты.');
                return;
            }

            const nfcZone = document.getElementById('nfcButton');
            const nfcIcon = document.getElementById('nfcIcon');
            const nfcText = document.getElementById('nfcText');
            const statusContainer = document.getElementById('statusContainer');
            const authCode = document.getElementById('authCode');

            // Анимация считывания (мигание)
            nfcZone.style.pointerEvents = 'none';
            nfcText.innerText = 'Обработка...';
            nfcIcon.style.fill = '#16a34a';
            
            setTimeout(() => {
                // Генерация случайного 4-значного кода
                const randomCode = Math.floor(1000 + Math.random() * 9000);
                
                // Вывод результата
                authCode.innerText = `Код подтверждения: ${randomCode}`;
                statusContainer.style.display = 'block';
                nfcText.innerText = 'Оплачено';
                
                // Сброс для возможности повторной оплаты через 4 секунды
                setTimeout(() => {
                    nfcZone.style.pointerEvents = 'auto';
                    nfcText.innerText = 'Приложите карту или телефон';
                    nfcIcon.style.fill = '#a2aab8';
                    statusContainer.style.display = 'none';
                }, 4000);

            }, 800);
        }
    </script>
</body>
</html>