:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent-color: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.2);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(56, 189, 248, 0.05) 0%, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 500px;
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.qr-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
}

.qr-container {
    position: relative;
    background: white;
    padding: 15px;
    border-radius: 16px;
    margin: 0 auto 30px;
    width: 240px;
    height: 240px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.qr-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.details h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.details p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

footer {
    margin-top: 3rem;
    font-size: 0.85rem;
    color: #475569;
}


.qr-section {
    animation: fadeIn 1s ease-out 0.15s both;
    margin-bottom: 2rem;
}

.qr-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: 12px;
    transition: background 0.3s ease;
    user-select: none;
}

.qr-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.qr-header .method-label {
    margin-bottom: 0;
}

.dropdown-icon {
    color: var(--text-secondary);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
}

.qr-header.expanded .dropdown-icon {
    transform: rotate(180deg);
}

.qr-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.qr-dropdown-content.expanded {
    max-height: 800px;
    opacity: 1;
    margin-top: 1rem;
}

.divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--glass-border), transparent);
    margin: 2.5rem 0;
}

.amount-selection {
    margin-top: 1rem;
    animation: fadeIn 1s ease-out 0.1s both;
}

.amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 1.5rem;
}

.amount-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 5px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.amount-btn:nth-child(n+4) {
    grid-column: span 1.5;
}

/* Adjust grid for better 5-item layout */
.amount-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.amount-btn {
    flex: 1 0 calc(33.333% - 10px);
    min-width: 80px;
}

.amount-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.amount-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--accent-glow);
}

.primary-btn {
    width: 100%;
    background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    border: none;
    border-radius: 16px;
    padding: 16px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(56, 189, 248, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(56, 189, 248, 0.4);
    filter: brightness(1.1);
}

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


.method-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}


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

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

.loader {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(56, 189, 248, 0.1);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    header h1 {
        font-size: 2rem;
    }

    .qr-card {
        padding: 30px 20px;
    }
}