@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --red: #FF0000;
    --red-dark: #CC0000;
    --red-glow: rgba(255, 0, 0, 0.3);
    --surface: rgba(255, 255, 255, 0.82);
    --surface-2: rgba(255, 255, 255, 0.65);
    --surface-3: rgba(245, 245, 245, 0.8);
    --border: rgba(0, 0, 0, 0.08);
    --text-primary: #111111;
    --text-secondary: rgba(0, 0, 0, 0.6);
    --text-muted: rgba(0, 0, 0, 0.38);
}

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

body {
    font-family: 'Manrope', sans-serif;
    background: #f0f0f0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(255,0,0,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 90%, rgba(255,80,80,0.08) 0%, transparent 55%),
        linear-gradient(135deg, #fff8f8 0%, #fff4f4 50%, #fafafa 100%);
    animation: bgPulse 8s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,0,0,0.05) 1px, transparent 0);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

@keyframes bgPulse {
    0%   { opacity: 0.7; transform: scale(1); }
    100% { opacity: 1;   transform: scale(1.03); }
}

.particles { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 0, 0, 0.35);
    border-radius: 50%;
    animation: float linear infinite;
    box-shadow: 0 0 6px rgba(255,0,0,0.45);
}

.particle:nth-child(1)  { left: 10%; animation-duration: 12s; animation-delay: 0s;   width:3px;height:3px; }
.particle:nth-child(2)  { left: 25%; animation-duration: 18s; animation-delay: 2s; }
.particle:nth-child(3)  { left: 40%; animation-duration: 14s; animation-delay: 4s;   width:3px;height:3px; }
.particle:nth-child(4)  { left: 55%; animation-duration: 20s; animation-delay: 1s; }
.particle:nth-child(5)  { left: 70%; animation-duration: 16s; animation-delay: 3s;   width:3px;height:3px; }
.particle:nth-child(6)  { left: 85%; animation-duration: 13s; animation-delay: 5s; }
.particle:nth-child(7)  { left: 33%; animation-duration: 22s; animation-delay: 7s; }
.particle:nth-child(8)  { left: 60%; animation-duration: 17s; animation-delay: 6s; background:rgba(255,100,100,0.3); }
.particle:nth-child(9)  { left: 78%; animation-duration: 15s; animation-delay: 8s; }
.particle:nth-child(10) { left: 5%;  animation-duration: 19s; animation-delay: 9s; }

@keyframes float {
    0%   { transform: translateY(110vh) translateX(0) scale(1); opacity:0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-10vh) translateX(30px) scale(0.5); opacity:0; }
}

.container { width: 100%; max-width: 500px; position: relative; z-index: 1; }

.card {
    background: var(--surface);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border-radius: 24px;
    padding: 40px 30px;
    border: 1px solid rgba(255,255,255,0.92);
    box-shadow:
        0 0 0 1px rgba(255,0,0,0.04),
        0 24px 70px rgba(0,0,0,0.12),
        0 0 40px rgba(255,0,0,0.04),
        inset 0 1px 0 rgba(255,255,255,1);
    animation: cardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,0,0,0.5), transparent);
    animation: scanLine 3s ease-in-out infinite;
}

@keyframes scanLine {
    0%,100% { opacity:0.3; transform:scaleX(0.5); }
    50%      { opacity:1;   transform:scaleX(1); }
}

@keyframes cardIn {
    from { opacity:0; transform:translateY(40px) scale(0.97); }
    to   { opacity:1; transform:translateY(0) scale(1); }
}

/* Logo */
.logo-container { text-align: center; margin-bottom: 30px; }
.logo {
    width: 120px; height: 120px; object-fit: contain;
    filter: drop-shadow(0 0 16px rgba(255,0,0,0.25));
    animation: logoPulse 3s ease-in-out infinite;
}
@keyframes logoPulse {
    0%,100% { filter: drop-shadow(0 0 16px rgba(255,0,0,0.25)); }
    50%      { filter: drop-shadow(0 0 28px rgba(255,0,0,0.5)); }
}

/* Progress */
.progress-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    padding: 0 10px;
}

.progress-step { display:flex; flex-direction:column; align-items:center; gap:8px; }

.step-circle {
    width: 40px; height: 40px; border-radius: 50%;
    background: #f0f0f0;
    border: 2px solid #ddd;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: #aaa;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 14px;
}

.step-circle.completed {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border-color: var(--red); color: white;
    box-shadow: 0 0 18px var(--red-glow);
}

.progress-step.active .step-circle {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border-color: var(--red); color: white;
    box-shadow: 0 0 22px var(--red-glow), 0 0 45px rgba(255,0,0,0.15);
    animation: stepPulse 2s ease-in-out infinite;
}

@keyframes stepPulse {
    0%,100% { box-shadow: 0 0 18px var(--red-glow); }
    50%      { box-shadow: 0 0 32px var(--red-glow), 0 0 55px rgba(255,0,0,0.2); }
}

.step-label {
    font-size: 10px; font-weight:700; color:#aaa;
    text-align:center; text-transform:uppercase; letter-spacing:0.5px;
    white-space: nowrap;
}
.progress-step.active .step-label { color: var(--text-secondary); }
.progress-step:has(.completed) .step-label { color: var(--text-secondary); }

.progress-line {
    width: 40px; height: 2px; background: #e0e0e0;
    margin: 0 8px; margin-bottom: 20px;
    position: relative; overflow: hidden; border-radius: 2px; flex-shrink:0;
}
.progress-line.done::after {
    content:''; position:absolute; inset:0;
    background: linear-gradient(90deg, var(--red), rgba(255,0,0,0.4));
}

/* Form */
.form-group { margin-bottom: 20px; }

.form-group label {
    display: block; margin-bottom: 8px;
    color: var(--text-secondary); font-weight: 700;
    font-size: 12px; text-transform: uppercase; letter-spacing: 0.7px;
}

.form-group input {
    width: 100%; padding: 14px 16px;
    border: 1.5px solid rgba(0,0,0,0.1); border-radius: 12px;
    font-size: 15px; font-family: 'Manrope', sans-serif; font-weight: 500;
    transition: all 0.3s;
    background: rgba(255,255,255,0.8);
    color: var(--text-primary); outline: none;
}
.form-group input::placeholder { color: #bbb; }
.form-group input:focus {
    border-color: var(--red); background: rgba(255,255,255,0.95);
    box-shadow: 0 0 0 3px rgba(255,0,0,0.1), 0 0 18px rgba(255,0,0,0.06);
}

/* Phone prefix */
.phone-input-wrapper {
    display: flex; align-items: center;
    border: 1.5px solid rgba(0,0,0,0.1);
    border-radius: 12px; background: rgba(255,255,255,0.8);
    transition: all 0.3s; overflow: hidden;
}
.phone-input-wrapper:focus-within {
    border-color: var(--red); background: rgba(255,255,255,0.95);
    box-shadow: 0 0 0 3px rgba(255,0,0,0.1);
}
.phone-prefix {
    padding: 14px 12px 14px 16px; font-size: 15px; font-weight:700;
    color: var(--text-primary); background: rgba(0,0,0,0.04);
    border-right: 1.5px solid rgba(0,0,0,0.08);
    user-select: none; white-space: nowrap; font-family:'Manrope',sans-serif;
}
.phone-input-wrapper input {
    border: none !important; border-radius: 0 !important;
    background: transparent !important; box-shadow: none !important;
    flex: 1; padding-left: 10px;
}

/* Buttons */
.btn-primary {
    width: 100%; padding: 16px;
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    color: white; border: none; border-radius: 12px;
    font-size: 14px; font-weight: 800; font-family: 'Manrope', sans-serif;
    cursor: pointer; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-transform: uppercase; letter-spacing: 1.5px;
    position: relative; overflow: hidden;
}
.btn-primary::before {
    content:''; position:absolute; inset:0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
    opacity:0; transition:opacity 0.3s;
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255,0,0,0.4), 0 0 0 1px rgba(255,80,80,0.2);
}
.btn-primary:hover::before { opacity:1; }
.btn-primary:active { transform:translateY(-1px); }
.btn-primary:disabled { background:#ccc; color:#888; cursor:not-allowed; transform:none; box-shadow:none; }

/* Footer */
footer {
    text-align:center; margin-top:20px;
    color: rgba(0,0,0,0.35); font-size:12px; font-weight:500; letter-spacing:0.3px;
}

/* User Badge */
.user-badge {
    position: absolute; top:20px; right:20px;
    display:flex; align-items:center; gap:10px;
    background: rgba(255,255,255,0.88);
    padding: 8px 14px 8px 8px; border-radius:40px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px); transition: all 0.3s;
}
.user-badge:hover { border-color:rgba(255,0,0,0.2); box-shadow:0 4px 20px rgba(255,0,0,0.1); }

.user-avatar {
    width:36px; height:36px; border-radius:50%; overflow:hidden;
    border: 2px solid var(--red); box-shadow:0 0 10px rgba(255,0,0,0.3); flex-shrink:0;
}
.user-avatar img { width:100%; height:100%; object-fit:cover; }
.user-avatar-fallback {
    width:100%; height:100%;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    display:flex; align-items:center; justify-content:center;
    color:white; font-weight:800; font-size:14px;
}

.user-info { display:flex; flex-direction:column; }
.user-name { font-size:13px; font-weight:700; color:#111; line-height:1.2; }
.user-phone { font-size:11px; color:#888; font-weight:500; }

.payment-card { position:relative; padding-top:80px; }

/* Payment section */
.payment-section { margin-bottom:28px; }
.payment-section h3 {
    font-size:11px; color:var(--text-muted); margin-bottom:14px;
    text-transform:uppercase; letter-spacing:0.8px; font-weight:700;
}

.payment-methods { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:24px; }

.payment-method {
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:10px; padding:20px 16px;
    background: rgba(255,255,255,0.75);
    border: 1.5px solid rgba(0,0,0,0.07);
    border-radius:16px; text-decoration:none;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position:relative; overflow:hidden;
}
.payment-method::before {
    content:''; position:absolute; inset:0;
    background: linear-gradient(135deg, rgba(255,0,0,0.05), transparent);
    opacity:0; transition:opacity 0.3s;
}
.payment-method:hover {
    border-color: rgba(255,0,0,0.35);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12), 0 0 20px rgba(255,0,0,0.08);
    background: rgba(255,255,255,0.95);
}
.payment-method:hover::before { opacity:1; }
.payment-method-img { height:36px; object-fit:contain; transition:filter 0.3s; max-width:100%; }
.payment-method:hover .payment-method-img { filter:drop-shadow(0 2px 8px rgba(0,0,0,0.15)); }
.payment-label {
    font-size:11px; font-weight:700; color:var(--text-muted);
    text-transform:uppercase; letter-spacing:0.8px; transition:color 0.3s;
}
.payment-method:hover .payment-label { color:var(--text-secondary); }

/* Card info section */
.card-info-section {
    margin-bottom:24px; padding:18px;
    background:rgba(255,255,255,0.6); border-radius:16px;
    border:1px solid rgba(0,0,0,0.06); position:relative; overflow:hidden;
}
.card-info-section::before {
    content:''; position:absolute; top:0; left:0; right:0; height:2px;
    background: linear-gradient(90deg, var(--red), rgba(255,0,0,0.3), transparent);
}
.card-info-section h3 {
    font-size:11px; color:var(--text-muted); margin-bottom:14px;
    text-transform:uppercase; letter-spacing:0.8px; font-weight:700;
}
.card-details {
    background:rgba(255,255,255,0.85); padding:16px;
    border-radius:12px; border:1px solid rgba(0,0,0,0.07);
}
.card-number-container {
    display:flex; justify-content:space-between; margin-bottom:10px; align-items:center;
}
.card-type { font-size:11px; font-weight:800; color:var(--text-muted); letter-spacing:1px; text-transform:uppercase; }
.card-number {
    font-size:19px; font-weight:800; color:var(--text-primary);
    letter-spacing:3px; margin-bottom:8px;
    display:flex; align-items:center; gap:12px; font-variant-numeric:tabular-nums;
}
.copy-btn {
    background:#f5f5f5; border:1px solid rgba(0,0,0,0.1);
    padding:5px 10px; border-radius:8px; cursor:pointer;
    font-size:14px; transition:all 0.2s; color:#555;
}
.copy-btn:hover { background:rgba(255,0,0,0.08); border-color:rgba(255,0,0,0.3); transform:scale(1.1); }
.card-holder { font-size:11px; color:var(--text-muted); font-weight:600; letter-spacing:0.5px; text-transform:uppercase; }

/* Payment confirmation */
.payment-confirmation { margin-bottom:24px; }
.payment-confirmation h3 {
    font-size:11px; color:var(--text-muted); margin-bottom:14px;
    text-transform:uppercase; letter-spacing:0.8px; font-weight:700; line-height:1.6;
}
.radio-group { display:flex; gap:12px; margin-bottom:20px; }
.radio-label {
    display:flex; align-items:center; gap:8px; cursor:pointer;
    font-size:13px; font-weight:600; color:var(--text-secondary);
    padding:10px 16px; border-radius:10px;
    border:1.5px solid rgba(0,0,0,0.08); background:rgba(255,255,255,0.7);
    transition:all 0.2s; flex:1; justify-content:center;
}
.radio-label:has(input:checked) { border-color:var(--red); background:rgba(255,0,0,0.05); color:var(--text-primary); }
.radio-label input[type="radio"] { width:16px; height:16px; cursor:pointer; accent-color:var(--red); }

/* Upload */
.upload-section { margin-bottom:20px; }
.upload-label {
    display:block; padding:22px 20px;
    background:rgba(255,0,0,0.03); border:2px dashed rgba(255,0,0,0.25);
    border-radius:14px; text-align:center; cursor:pointer;
    transition:all 0.3s; color:rgba(200,0,0,0.6); font-weight:700; font-size:13px;
}
.upload-label:hover {
    background:rgba(255,0,0,0.07); border-color:rgba(255,0,0,0.5);
    box-shadow:0 0 20px rgba(255,0,0,0.06); color:var(--red);
}
.image-preview { margin-top:14px; }
.image-preview img {
    width:100%; max-height:300px; object-fit:contain;
    border-radius:12px; border:1px solid rgba(0,0,0,0.08);
}

/* Help section */
.help-section {
    text-align:center; padding:20px;
    background:rgba(255,255,255,0.6); border-radius:14px; border:1px solid rgba(0,0,0,0.06);
}
.help-section p { font-size:13px; color:var(--text-muted); margin-bottom:4px; font-weight:500; }

.btn-telegram {
    display:inline-block; margin-top:14px; padding:12px 24px;
    background:linear-gradient(135deg, #229ED9, #0088cc);
    color:white; text-decoration:none; border-radius:12px;
    font-size:13px; font-weight:700;
    transition:all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing:0.3px; border:1px solid rgba(255,255,255,0.15);
}
.btn-telegram:hover { transform:translateY(-3px); box-shadow:0 10px 25px rgba(0,136,204,0.35); }

/* Divider */
.section-divider {
    height:1px; background:rgba(0,0,0,0.07); margin:24px 0; position:relative;
}
.section-divider::after {
    content:''; position:absolute; left:0; top:0;
    width:60px; height:1px; background:var(--red);
}

/* ===== STEP 3 SUCCESS ===== */
.success-section { text-align:center; padding:10px 0 20px; }

.success-icon { width:80px; height:80px; margin:0 auto 24px; position:relative; }
.success-icon svg { width:80px; height:80px; }

.check-circle {
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
    animation: drawCircle 0.8s cubic-bezier(0.65,0,0.35,1) forwards 0.2s;
}
.check-mark {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: drawCheck 0.5s ease forwards 0.9s;
}
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck  { to { stroke-dashoffset: 0; } }

.success-glow {
    position:absolute; inset:-10px; border-radius:50%;
    background:radial-gradient(circle, rgba(0,200,80,0.18), transparent 70%);
    animation: glowPulse 2s ease-in-out infinite;
}
@keyframes glowPulse {
    0%,100% { transform:scale(1); opacity:0.5; }
    50%      { transform:scale(1.15); opacity:1; }
}

.success-title {
    font-size:22px; font-weight:800; color:var(--text-primary);
    margin-bottom:10px; line-height:1.3;
    animation: fadeUp 0.5s ease both 1s;
}
.success-subtitle {
    font-size:14px; color:var(--text-secondary); margin-bottom:28px; line-height:1.6;
    animation: fadeUp 0.5s ease both 1.1s;
}
@keyframes fadeUp {
    from { opacity:0; transform:translateY(12px); }
    to   { opacity:1; transform:translateY(0); }
}

.success-card {
    background:rgba(255,255,255,0.8); border:1px solid rgba(0,0,0,0.07);
    border-radius:16px; overflow:hidden; margin-bottom:24px;
    animation: fadeUp 0.5s ease both 1.2s;
}
.success-card-header {
    background:linear-gradient(135deg, var(--red), var(--red-dark));
    padding:14px 20px; text-align:center;
}
.success-card-header h3 {
    font-size:16px; font-weight:800; color:white;
    letter-spacing:0.5px; text-transform:uppercase;
}
.success-card-body { padding:20px; text-align:left; }
.success-row {
    display:flex; justify-content:space-between; align-items:center;
    padding:10px 0; border-bottom:1px solid rgba(0,0,0,0.05); font-size:14px;
}
.success-row:last-child { border-bottom:none; padding-bottom:0; }
.success-row-label {
    font-weight:700; color:var(--text-muted);
    text-transform:uppercase; font-size:11px; letter-spacing:0.5px;
}
.success-row-value { font-weight:700; color:var(--text-primary); font-size:14px; }

.success-message {
    background:rgba(0,180,80,0.06); border:1px solid rgba(0,180,80,0.18);
    border-radius:12px; padding:16px 18px; margin-bottom:24px;
    animation: fadeUp 0.5s ease both 1.3s; text-align:left;
}
.success-message p {
    font-size:13px; color:#1a6b35; line-height:1.7; font-weight:500;
}
.success-message p + p { margin-top:8px; }

@media (max-width: 768px) {
    .card { padding:30px 20px; }
    .payment-card { padding-top:100px; }
    .user-badge { top:10px; right:10px; }
    .progress-line { width:28px; }
}
