/* ============================================
   NqdPay PWA - PREMIUM ULTRA-MODERN THEME
   Astonishing High-End Design
   ============================================ */

:root {
    /* Premium Gradient Palette */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-gold: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    --gradient-ocean: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --gradient-sunset: linear-gradient(135deg, #ff9a56 0%, #ff6a88 100%);
    --gradient-royal: linear-gradient(135deg, #5f2c82 0%, #49a09d 100%);
    --gradient-neon: linear-gradient(135deg, #fa709a 0%, #fee140 100%);

    /* Customizable Brand Colors */
    --brand-primary: #667eea;
    --brand-secondary: #764ba2;
    --brand-accent: #f093fb;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);

    /* Advanced Shadows */
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-large: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xlarge: 0 16px 48px rgba(0, 0, 0, 0.16);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.5);
    --shadow-glow-accent: 0 0 40px rgba(240, 147, 251, 0.5);

    /* Typography */
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing Scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
    --space-9: 96px;

    /* Border Radius */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-pill: 999px;

    /* Z-Index */
    --z-base: 1;
    --z-elevated: 10;
    --z-sticky: 100;
    --z-fixed: 1000;
    --z-modal: 10000;
}

/* ============================================
   Reset & Base
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: #f0f2f5;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(240, 147, 251, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(117, 75, 162, 0.08) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes gradientShift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(5%, 5%) rotate(120deg); }
    66% { transform: translate(-5%, 5%) rotate(240deg); }
}

/* ============================================
   App Container
   ============================================ */

.premium-app {
    position: relative;
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    background: #ffffff;
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ============================================
   Stunning Header
   ============================================ */

.premium-header {
    position: relative;
    background: var(--gradient-primary);
    padding: var(--space-6) var(--space-5) var(--space-8);
    overflow: hidden;
}

.premium-header::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite;
}

.premium-header::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, -20px) scale(1.1); }
}

.header-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.merchant-info {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.merchant-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    padding: var(--space-2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.merchant-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.merchant-text h6 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0 0 4px 0;
}

.merchant-text h4 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.header-menu-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-menu-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   Main Content Area
   ============================================ */

.premium-content {
    position: relative;
    background: #f8f9fa;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    margin-top: -24px;
    /*padding: var(--space-6) var(--space-5) calc(80px + var(--space-6));*/
    min-height: calc(100vh - 180px);
    z-index: 2;
}

/* ============================================
   Glass Card Components
   ============================================ */

.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-large);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xlarge);
}

.gradient-card {
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: var(--shadow-glow);
}

/* ============================================
   Premium Buttons
   ============================================ */

.btn-premium {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-7);
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    z-index: 1;
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn-premium:active::before {
    width: 400px;
    height: 400px;
}

.btn-gradient {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
}

.btn-gradient:active {
    transform: translateY(-1px);
}

.btn-large {
    padding: var(--space-6) var(--space-8);
    font-size: 1.25rem;
    min-height: 64px;
}

.btn-block {
    width: 100%;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 999;
}

.fab:hover {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
}

.fab:active {
    transform: translateX(-50%) scale(0.95);
}

/* ============================================
   Form Elements
   ============================================ */

.input-premium {
    width: 100%;
    padding: var(--space-5);
    font-size: 1.125rem;
    font-family: var(--font-body);
    font-weight: 600;
    color: #1a1a1a;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    outline: none;
}

.input-premium:focus {
    border-color: var(--brand-primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-amount {
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    padding: var(--space-6);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    border: 3px solid rgba(102, 126, 234, 0.15);
    border-radius: var(--radius-xl);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.04);
}

.input-amount:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 6px rgba(102, 126, 234, 0.1), inset 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Quick Amount Buttons */
.quick-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
    margin: var(--space-5) 0;
}

.quick-amount-btn {
    padding: var(--space-4) var(--space-3);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(102, 126, 234, 0.15);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--brand-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-amount-btn:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

/* ============================================
   Bottom Navigation
   ============================================ */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: var(--space-3) var(--space-4);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2);
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: var(--radius-sm);
    position: relative;
}

.nav-item.active {
    color: var(--brand-primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 0 0 var(--radius-pill) var(--radius-pill);
}

.nav-icon {
    font-size: 1.5rem;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item.active .nav-icon {
    transform: scale(1.15);
}

.nav-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Center FAB in Nav */
.nav-fab {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    border: 4px solid rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-top: -40px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
}

/* ============================================
   Animations
   ============================================ */

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.animate-slide-up {
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-fade-in {
    animation: fadeIn 0.4s ease;
}

.animate-scale-in {
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================
   Utility Classes
   ============================================ */

.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }

.p-0 { padding: 0; }

/* Responsive */
@media (max-width: 375px) {
    .input-amount {
        font-size: 2.5rem;
    }

    .btn-large {
        font-size: 1.125rem;
        padding: var(--space-5) var(--space-6);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
