/* ============================================
   ONEQR Box - Common Styles
   Shared styles for all pages
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Colors - Green */
    --green-50: #f0fdf4;
    --green-100: #dcfce7;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --green-700: #15803d;
    --green-800: #166534;

    /* Colors - Blue */
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;

    /* Colors - Red */
    --red-500: #ef4444;
    --red-600: #dc2626;
    --red-700: #991b1b;
    --red-800: #7f1d1d;

    /* Colors - Slate/Gray */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;

    /* Colors - Amber/Yellow */
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #92400e;
    --amber-800: #78350f;

    /* Gradients */
    --gradient-demo: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --gradient-qr: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-failed: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);

    /* Animation */
    --anim-ease: ease-out;
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   COMMON ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

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

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.1) rotate(5deg);
    }

    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ============================================
   COMMON BUTTONS
   ============================================ */
.btn {
    padding: clamp(14px, 2vh, 16px) clamp(20px, 3vw, 24px);
    border-radius: clamp(8px, 1.2vw, 12px);
    font-size: clamp(15px, 2vw, 16px);
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 1.2vw, 10px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--slate-600);
    border: 2px solid var(--slate-200);
}

.btn-secondary:hover {
    background: var(--slate-50);
    border-color: var(--slate-300);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--red-500), var(--red-600));
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

/* ============================================
   COMMON DETAIL ROWS
   ============================================ */
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(16px, 2.5vh, 20px);
    background: var(--slate-50);
    border-radius: clamp(10px, 1.5vw, 12px);
    margin-bottom: clamp(12px, 2vh, 15px);
    transition: all 0.3s ease;
    border: 1px solid var(--slate-200);
}

.detail-row:hover {
    background: var(--slate-100);
    transform: translateX(5px);
}

.detail-label {
    color: var(--slate-500);
    font-size: clamp(13px, 1.8vw, 14px);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-value {
    font-weight: 700;
    color: var(--slate-800);
    font-size: clamp(15px, 2vw, 16px);
}

/* ============================================
   COMMON BADGES
   ============================================ */
.status-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: clamp(13px, 1.8vw, 14px);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ============================================
   DEMO PAGE STYLES
   ============================================ */
body.page-demo {
    background: var(--gradient-demo);
    align-items: flex-start;
    justify-content: center;
    padding: 15px 20px;
    min-height: 100vh;
    position: relative;
}

body.page-demo::before,
body.page-demo::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite ease-in-out;
}

body.page-demo::before {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
    animation-delay: 0s;
}

body.page-demo::after {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -100px;
    animation-delay: 10s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-50px) rotate(180deg);
    }
}

.demo-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 100px rgba(255, 255, 255, 0.3);
    max-width: min(95vw, 1400px);
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease-out;
    box-sizing: border-box;
    margin: 0 auto;
}

.demo-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.demo-header img {
    width: 50px !important;
    height: auto;
    transition: transform 0.3s ease;
}

.demo-header img:hover {
    transform: scale(1.1) rotate(5deg);
}

.demo-header h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
}

.demo-subtitle {
    color: #718096;
    font-size: 14px;
    margin-bottom: 20px;
    font-weight: 400;
    line-height: 1.4;
}

.payment-form {
    text-align: left;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.form-group {
    margin-bottom: 0;
    width: 100%;
    box-sizing: border-box;
    grid-column: span 2;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group.half-width {
    grid-column: span 3;
}

.form-row {
    display: contents;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    max-width: 100%;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    min-height: 60px;
}

.generated-url {
    background: linear-gradient(135deg, #f6f9fc 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 0;
    border: 2px solid rgba(102, 126, 234, 0.1);
    width: 100%;
    box-sizing: border-box;
    grid-column: 1 / -1;
}

.generated-url label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.url-preview {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #667eea;
    word-break: break-all;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
    padding: 10px;
    background: white;
    border-radius: 5px;
    min-height: 35px;
    max-width: 100%;
}

.button-group {
    margin-top: 0;
    width: 100%;
    box-sizing: border-box;
    grid-column: 1 / -1;
}

/* Demo page specific button styles */
.page-demo .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.page-demo .btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.page-demo .btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.page-demo .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.page-demo .btn-primary:active {
    transform: translateY(-1px);
}

.page-demo .btn-primary span {
    position: relative;
    z-index: 1;
}

.page-demo .btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: clamp(14px, 2vh, 16px) clamp(20px, 3vw, 24px);
    font-size: clamp(15px, 2vw, 16px);
    font-weight: 600;
    border-radius: clamp(8px, 1.2vw, 10px);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 1.2vw, 10px);
    width: 100%;
}

.page-demo .btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.features {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    justify-content: center;
}

.feature {
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
    border-radius: 10px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.feature-title {
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.feature-desc {
    font-size: 11px;
    color: #718096;
}

.icon-qr,
.icon {
    width: 18px;
    height: 18px;
    position: relative;
    z-index: 1;
}

/* ============================================
   QR TRANSFER PAGE STYLES
   ============================================ */
body.page-qr-transfer {
    background: var(--gradient-qr);
    padding: 20px;
}

.qr-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.qr-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.qr-main-content {
    padding: 40px;
}

.qr-header {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.success-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: white;
    font-size: 28px;
    font-weight: bold;
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
    animation: pulse 2s infinite;
}

.qr-header-content h1 {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #1e40af, #7c3aed);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.order-id {
    color: var(--slate-500);
    font-size: 16px;
    font-weight: 500;
}

.countdown-container {
    background: linear-gradient(135deg, var(--amber-100) 0%, var(--amber-200) 100%);
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 30px;
    border: 2px solid rgba(245, 158, 11, 0.3);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.countdown-title {
    font-size: 16px;
    color: var(--amber-700);
    margin-bottom: 10px;
    font-weight: 600;
}

.countdown-time {
    font-size: 36px;
    font-weight: 900;
    color: var(--red-600);
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
}

.countdown-time.warning {
    animation: blink 1s infinite;
}

.countdown-warning {
    font-size: 14px;
    color: #7c2d12;
    margin-top: 10px;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.payment-method {
    background: white;
    border: 2px solid var(--slate-200);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.payment-method:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--blue-500);
}

.method-title {
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--slate-800);
    font-size: 18px;
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, var(--slate-50) 0%, var(--slate-200) 100%);
    border-radius: 12px;
}

.sepay-section {
    text-align: center;
}

.sepay-logo {
    color: var(--blue-500);
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.sepay-logo::before {
    content: "⚡";
    font-size: 24px;
}

.qr-code {
    width: 220px;
    height: 220px;
    border: 3px solid var(--slate-200);
    margin: 25px auto;
    background:
        linear-gradient(45deg, var(--slate-50) 25%, transparent 25%),
        linear-gradient(-45deg, var(--slate-50) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--slate-50) 75%),
        linear-gradient(-45deg, transparent 75%, var(--slate-50) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--slate-500);
    position: relative;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.mb-section {
    padding: 0;
}

.mb-logo {
    text-align: center;
    margin-bottom: 25px;
}

.bank-name {
    font-size: 18px;
    font-weight: 600;
    margin-top: 12px;
    color: var(--slate-600);
}

.transfer-info {
    margin-top: 25px;
    background: var(--slate-50);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid var(--slate-200);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--slate-200);
    transition: background 0.3s ease;
}

.info-row:hover {
    background: rgba(59, 130, 246, 0.05);
    margin: 0 -25px;
    padding: 16px 25px;
    border-radius: 8px;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--slate-500);
    font-size: 14px;
    font-weight: 500;
}

.info-value {
    font-weight: 700;
    color: var(--slate-800);
    font-size: 16px;
}

.note {
    background: linear-gradient(135deg, var(--amber-100) 0%, var(--amber-200) 100%);
    padding: 20px;
    border-radius: 16px;
    margin-top: 25px;
    border: 2px solid rgba(245, 158, 11, 0.3);
    font-size: 14px;
    line-height: 1.6;
}

.note strong {
    color: var(--amber-700);
    font-weight: 700;
}

.download-btn {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.download-qr {
    margin-top: 20px;
    text-align: center;
}

.status-text {
    margin-top: 20px;
    font-size: 14px;
    color: var(--amber-500);
    font-weight: 600;
    padding: 10px 20px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 20px;
    display: inline-block;
}

.status-text.checking {
    animation: pulse 1s infinite;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    color: var(--blue-500);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 24px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 25px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateX(-5px);
}

.back-link::before {
    content: "←";
    font-size: 18px;
}

/* QR Transfer Error Page Styles */
.qr-container .error-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    color: white;
    font-size: 48px;
    font-weight: bold;
    box-shadow: 0 15px 35px rgba(245, 158, 11, 0.3);
    animation: pulse 2s infinite;
}

.qr-container .error-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 15px;
    text-align: center;
}

.qr-container .error-code {
    font-size: 14px;
    color: var(--slate-500);
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
    padding: 8px 16px;
    background: var(--slate-100);
    border-radius: 20px;
    display: inline-block;
}

.qr-container .error-message {
    background: linear-gradient(135deg, var(--amber-100) 0%, var(--amber-200) 100%);
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: center;
}

.qr-container .error-message h3 {
    color: var(--amber-700);
    font-size: 18px;
    margin-bottom: 15px;
}

.qr-container .error-message p {
    color: var(--amber-800);
    font-size: 16px;
    line-height: 1.6;
}

.qr-container .possible-reasons {
    background: var(--slate-50);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
}

.qr-container .possible-reasons h4 {
    color: var(--slate-800);
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 600;
}

.qr-container .reason-list {
    list-style: none;
    padding: 0;
}

.qr-container .reason-list li {
    color: var(--slate-600);
    font-size: 14px;
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
}

.qr-container .reason-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--amber-500);
    font-weight: bold;
    font-size: 20px;
}

/* ============================================
   SUCCESS PAGE STYLES
   ============================================ */
body.page-success {
    background: var(--gradient-success);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.success-container {
    max-width: 600px;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    animation: slideUp 0.6s var(--anim-ease);
}

.success-header {
    background: linear-gradient(135deg, var(--green-50) 0%, var(--green-100) 100%);
    padding: 40px;
    text-align: center;
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

.success-icon-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    position: relative;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--green-500), var(--green-600));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    font-weight: bold;
    box-shadow: 0 15px 35px rgba(34, 197, 94, 0.3);
    animation: checkmark 0.8s var(--anim-ease) 0.2s both;
}

.success-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border: 3px solid var(--green-500);
    border-radius: 50%;
    animation: pulse-ring 1.5s var(--anim-ease) infinite;
}

.success-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--green-700);
    margin-bottom: 10px;
    animation: fadeIn 0.8s var(--anim-ease) 0.4s both;
}

.success-message {
    color: var(--green-800);
    font-size: 18px;
    font-weight: 500;
    animation: fadeIn 0.8s var(--anim-ease) 0.6s both;
}

.order-details {
    padding: 40px;
    animation: fadeIn 0.8s var(--anim-ease) 0.8s both;
}

.confirmation-info {
    background: linear-gradient(135deg, var(--green-50) 0%, var(--green-100) 100%);
    border: 2px solid rgba(34, 197, 94, 0.2);
    border-radius: 16px;
    padding: 25px;
    margin: 0 40px 30px;
    text-align: center;
    animation: fadeIn 0.8s var(--anim-ease) 1s both;
}

.confirmation-text {
    color: var(--green-700);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.email-notice {
    color: var(--green-800);
    font-size: 14px;
    font-style: italic;
}

.action-buttons {
    padding: 0 40px 40px;
    display: flex;
    gap: 15px;
    animation: fadeIn 0.8s var(--anim-ease) 1.2s both;
}

.action-buttons .btn {
    flex: 1;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fbbf24;
    animation: confetti-fall 3s var(--anim-ease) infinite;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================
   FAILED PAGE STYLES
   ============================================ */
body.page-failed {
    background: var(--gradient-failed);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.failed-container {
    max-width: 600px;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    animation: shake 0.5s ease-out;
}

.failed-header {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    padding: 40px;
    text-align: center;
    border-bottom: 1px solid rgba(239, 68, 68, 0.1);
}

.failed-icon-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    position: relative;
}

.failed-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--red-500), var(--red-600));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    font-weight: bold;
    box-shadow: 0 15px 35px rgba(239, 68, 68, 0.3);
    animation: pulse-error 2s ease-out infinite;
}

@keyframes pulse-error {
    0% {
        box-shadow: 0 15px 35px rgba(239, 68, 68, 0.3);
    }

    50% {
        box-shadow: 0 15px 50px rgba(239, 68, 68, 0.5);
    }

    100% {
        box-shadow: 0 15px 35px rgba(239, 68, 68, 0.3);
    }
}

.warning-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border: 3px solid var(--red-500);
    border-radius: 50%;
    animation: pulse-ring-error 1.5s ease-out infinite;
}

@keyframes pulse-ring-error {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.failed-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--red-700);
    margin-bottom: 10px;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.error-details {
    padding: 40px;
    animation: fadeIn 0.8s ease-out 0.6s both;
}

.error-info {
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    border-left: 4px solid var(--red-500);
}

.error-reason {
    color: var(--red-700);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-description {
    color: var(--red-800);
    font-size: 14px;
    line-height: 1.6;
}

.help-section {
    background: linear-gradient(135deg, var(--amber-100) 0%, var(--amber-200) 100%);
    border: 2px solid rgba(245, 158, 11, 0.2);
    border-radius: 16px;
    padding: 25px;
    margin: 0 40px 30px;
    animation: fadeIn 0.8s ease-out 0.8s both;
}

.help-title {
    color: var(--amber-700);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-list {
    list-style: none;
    padding: 0;
}

.help-item {
    color: var(--amber-800);
    font-size: 14px;
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
}

.help-item::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--amber-500);
    font-weight: bold;
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 1024px) {
    .payment-form {
        grid-template-columns: repeat(4, 1fr);
    }

    .form-group {
        grid-column: span 2;
    }

    .form-group.half-width {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .payment-form {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-group {
        grid-column: span 2;
    }

    .form-group.half-width {
        grid-column: span 2;
    }

    .demo-container {
        max-width: 95vw;
        padding: 20px;
    }

    .features {
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {

    .success-container,
    .failed-container {
        margin: 20px;
    }

    .success-header,
    .failed-header {
        padding: 30px 20px;
    }

    .success-title,
    .failed-title {
        font-size: 26px;
    }

    .success-message {
        font-size: 16px;
    }

    .order-details,
    .error-details {
        padding: 30px 20px;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .confirmation-info,
    .help-section {
        margin: 0 20px 25px;
        padding: 20px;
    }

    .action-buttons {
        padding: 0 20px 30px;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .qr-main-content {
        padding: 30px 20px;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }

    .qr-header {
        flex-direction: column;
        text-align: center;
        padding: 25px;
    }

    .success-icon {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .qr-header-content h1 {
        font-size: 24px;
    }

    .payment-method {
        padding: 20px;
    }

    .qr-code {
        width: 180px;
        height: 180px;
    }

    .transfer-info {
        padding: 20px;
    }

    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .info-row:hover {
        margin: 0 -20px;
        padding: 16px 20px;
    }

    .countdown-time {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .qr-header-content h1 {
        font-size: 20px;
    }

    .payment-method {
        padding: 15px;
    }

    .qr-code {
        width: 150px;
        height: 150px;
    }

    .transfer-info {
        padding: 15px;
    }

    .info-row:hover {
        margin: 0 -15px;
        padding: 16px 15px;
    }

    .countdown-time {
        font-size: 24px;
    }
}

@media (max-width: 1024px) {
    .qr-main-content {
        padding: 30px;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }

    .qr-header-content h1 {
        font-size: 28px;
    }
}

/* ============================================
   FREE QR GENERATOR PAGE STYLES
   ============================================ */
body.page-free-qr {
    background: var(--gradient-qr);
    min-height: 100vh;
    padding: 20px;
}

.free-qr-container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
}

.free-qr-header {
    text-align: center;
    padding: 30px 20px 20px;
    background: linear-gradient(135deg, #f6f9fc 0%, #e9ecef 100%);
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.free-qr-header img {
    margin-bottom: 10px;
}

.free-qr-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.free-qr-subtitle {
    color: var(--slate-600);
    font-size: 16px;
    margin: 0;
}

.free-qr-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 40px;
    min-height: 500px;
}

.qr-form-section {
    padding-right: 20px;
    border-right: 2px solid var(--slate-200);
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--slate-200);
}

.qr-generator-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.qr-generator-form .form-group {
    margin-bottom: 0;
}

.form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
}

.qr-generator-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 8px;
}

.qr-generator-form input,
.qr-generator-form select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--slate-300);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.qr-generator-form input:focus,
.qr-generator-form select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-generate {
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 700;
    background: white;
    color: #667eea;
    border: 3px solid #667eea;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.15);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.btn-generate::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.4s ease;
    z-index: 0;
}

.btn-generate:hover::before {
    width: 100%;
}

.btn-generate:hover {
    color: white;
    border-color: #764ba2;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3), 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.btn-generate:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-generate svg,
.btn-generate span {
    position: relative;
    z-index: 1;
}

.btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-actions .btn-download {
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 700;
    background: white;
    color: var(--green-600);
    border: 3px solid var(--green-600);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(34, 197, 94, 0.15);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.form-actions .btn-download::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--green-500), var(--green-600));
    transition: width 0.4s ease;
    z-index: 0;
}

.form-actions .btn-download:hover::before {
    width: 100%;
}

.form-actions .btn-download:hover {
    color: white;
    border-color: var(--green-700);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3), 0 0 0 4px rgba(34, 197, 94, 0.1);
    transform: translateY(-2px);
}

.form-actions .btn-download:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.form-actions .btn-download svg,
.form-actions .btn-download span {
    position: relative;
    z-index: 1;
}

.form-actions .btn-download:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.qr-result-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 20px;
}

.qr-placeholder {
    text-align: center;
    padding: 60px 40px;
    color: var(--slate-500);
}

.placeholder-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.qr-placeholder p {
    margin: 10px 0;
    font-size: 16px;
    font-weight: 600;
}

.placeholder-desc {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: var(--slate-400) !important;
}

.qr-card {
    width: 100%;
    max-width: 450px;
    background: white;
    border: 2px solid var(--slate-200);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: fadeIn 0.5s ease-out;
}

.qr-card-header {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
    padding: 20px;
    text-align: center;
}

.qr-card-header h3 {
    color: white;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.qr-card-body {
    padding: 30px 30px 40px;
}

.qr-code-display {
    background: var(--slate-50);
    border: 3px solid var(--slate-200);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code-display img {
    width: 100%;
    max-width: 280px;
    height: auto;
    display: block;
}

.qr-card-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--slate-50);
    border-radius: 10px;
    border: 1px solid var(--slate-200);
}

.info-label {
    color: var(--slate-600);
    font-size: 14px;
    font-weight: 500;
}

.info-value {
    color: var(--slate-800);
    font-size: 14px;
    font-weight: 700;
    text-align: right;
}

.info-value.amount {
    color: var(--green-600);
    font-size: 16px;
}

.free-qr-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 30px 40px;
    background: linear-gradient(135deg, #f6f9fc 0%, #e9ecef 100%);
    border-top: 2px solid rgba(102, 126, 234, 0.1);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--slate-200);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.feature-item .feature-icon {
    font-size: 40px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
    border-radius: 12px;
    flex-shrink: 0;
}

.feature-text {
    flex: 1;
}

.feature-item .feature-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 4px;
}

.feature-item .feature-desc {
    font-size: 13px;
    color: var(--slate-600);
}

/* Responsive for Free QR Generator */
@media (max-width: 1024px) {
    .free-qr-content {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 30px;
    }

    .qr-form-section {
        padding-right: 0;
        border-right: none;
        border-bottom: 2px solid var(--slate-200);
        padding-bottom: 30px;
    }

    .qr-result-section {
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    .free-qr-header h1 {
        font-size: 22px;
    }

    .free-qr-content {
        padding: 20px;
    }

    .free-qr-features {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .form-actions {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   BANK SELECTOR (for free-qr-generator)
   ============================================ */
.bank-selector {
    position: relative;
}

.bank-select-button {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--slate-300);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.bank-select-button:hover {
    border-color: #667eea;
}

.bank-select-button.active {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.bank-placeholder {
    color: var(--slate-500);
}

.bank-selected {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--slate-800);
}

.bank-selected img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.bank-select-button.active .dropdown-arrow {
    transform: rotate(180deg);
}

.bank-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--slate-300);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-height: 400px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bank-search {
    padding: 12px;
    border-bottom: 2px solid var(--slate-200);
}

.bank-search input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--slate-300);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.bank-search input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.bank-list {
    overflow-y: auto;
    max-height: 320px;
}

.bank-list::-webkit-scrollbar {
    width: 6px;
}

.bank-list::-webkit-scrollbar-track {
    background: var(--slate-100);
}

.bank-list::-webkit-scrollbar-thumb {
    background: var(--slate-400);
    border-radius: 3px;
}

.bank-list::-webkit-scrollbar-thumb:hover {
    background: var(--slate-500);
}

.bank-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--slate-100);
}

.bank-item:hover {
    background: var(--slate-50);
}

.bank-item.selected {
    background: rgba(102, 126, 234, 0.1);
    border-left: 4px solid #667eea;
}

.bank-item .bank-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.bank-item .bank-info {
    flex: 1;
    min-width: 0;
}

.bank-item .bank-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--slate-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bank-item .bank-short-name {
    font-size: 12px;
    color: var(--slate-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bank-with-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bank-with-logo img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* ============================================
   BANK TICKER (for landing page)
   ============================================ */
.bank-ticker {
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #f6f9fc 0%, #ffffff 100%);
    padding: 20px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.ticker-wrapper {
    width: 100%;
    overflow: hidden;
}

.ticker-content {
    display: flex;
    gap: 40px;
    animation: ticker-scroll 30s linear infinite;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-33.333%);
    }
}

.ticker-content .bank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--slate-700);
}

.ticker-content .bank-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.ticker-content .bank-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.bank-ticker:hover .ticker-content {
    animation-play-state: paused;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}