/* TopUp Page Styles - Enhanced Glossy */
@import url('home.css');

.header {
    justify-content: flex-start;
    gap: 12px;
}

.back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-radius: 50%;
    color: var(--text-primary);
    text-decoration: none;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.back-btn:hover {
    border-color: var(--purple);
    box-shadow: 0 0 12px var(--purple-glow);
}

.page-title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.main-content {
    padding: 16px;
    padding-bottom: 140px;
}

/* Category Header Branding */
.category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.category-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--glossy-overlay);
    pointer-events: none;
}

.category-logo {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    overflow: hidden;
    background: transparent;
    position: relative;
    z-index: 1;
}

.category-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

[data-theme="dark"] .category-logo img {
    filter: drop-shadow(0 4px 8px rgba(139, 92, 246, 0.3));
}

.category-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.category-info h1 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.category-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Step Sections - Glossy */
.step-section {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out backwards;
}

.step-section:nth-child(2) {
    animation-delay: 0.1s;
}

.step-section:nth-child(3) {
    animation-delay: 0.2s;
}

.step-section:nth-child(4) {
    animation-delay: 0.3s;
}

.step-section:nth-child(5) {
    animation-delay: 0.4s;
}

.step-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--glossy-overlay);
    pointer-events: none;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 12px var(--purple-glow);
}

.step-header h2 {
    font-size: 16px;
    font-weight: 600;
}

/* Package Grid - Enhanced */
.package-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    position: relative;
    z-index: 1;
}

.package-card {
    position: relative;
    background: var(--bg-card-solid);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 12px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.package-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--glossy-overlay);
    pointer-events: none;
    opacity: 0.5;
}

.package-card input {
    display: none;
}

.package-card.selected {
    border-color: var(--purple);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(99, 102, 241, 0.08) 100%);
    box-shadow: 0 0 20px var(--purple-glow), 0 4px 15px rgba(139, 92, 246, 0.2);
}

.package-card:hover:not(.selected) {
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
}

.package-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.package-name {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.package-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--purple);
}

.package-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    box-shadow: 0 2px 8px var(--purple-glow);
}

.package-card.selected .package-check {
    display: flex;
}

/* Info Notice */
.info-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(99, 102, 241, 0.08) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--purple);
    position: relative;
    z-index: 1;
}

.info-notice i {
    font-size: 20px;
}

/* UID Input - Fixed Alignment */
.uid-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.uid-input {
    width: 100%;
    padding: 16px 18px;
    background: var(--bg-card-solid);
    border: 2px solid var(--border);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
}

.uid-input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 15px var(--purple-glow);
}

.uid-input::placeholder {
    color: var(--text-muted);
}

.btn-check {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px var(--purple-glow);
    transition: all 0.3s ease;
}

.btn-check:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--purple-glow);
}

.btn-check:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ri-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Player Result */
.player-result {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(34, 197, 94, 0.06) 100%);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 14px;
    font-size: 14px;
    color: #22c55e;
    position: relative;
    z-index: 1;
}

.player-result i {
    font-size: 22px;
}

/* Rules Section - Moved Above Payment */
.rules-section {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 20px 24px;
    margin-bottom: 16px;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.rules-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--glossy-overlay);
    pointer-events: none;
}

.rules-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rules-section h3 i {
    color: var(--purple);
}

.rules-list {
    list-style: none;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.9;
    position: relative;
    z-index: 1;
}

.rules-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.rules-list li::before {
    content: "•";
    color: var(--purple);
    font-weight: bold;
    flex-shrink: 0;
}

/* Payment Options - Enhanced */
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: var(--bg-card-solid);
    border: 2px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.payment-option::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--glossy-overlay);
    pointer-events: none;
    opacity: 0.5;
}

.payment-option input {
    display: none;
}

.payment-option:has(input:checked) {
    border-color: var(--purple);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(99, 102, 241, 0.08) 100%);
    box-shadow: 0 0 20px var(--purple-glow);
}

.option-content {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    position: relative;
    z-index: 1;
}

.option-content i {
    font-size: 28px;
    color: var(--purple);
    width: 40px;
    text-align: center;
}

.option-info {
    display: flex;
    flex-direction: column;
}

.option-title {
    font-weight: 600;
    font-size: 15px;
}

.option-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.option-check {
    width: 26px;
    height: 26px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.payment-option:has(input:checked) .option-check {
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
    border-color: var(--purple);
    color: white;
    box-shadow: 0 2px 8px var(--purple-glow);
}

/* Confirm Button */
.btn-confirm {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 24px var(--purple-glow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-confirm::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
}

.btn-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-confirm:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px var(--purple-glow);
}

/* Empty State */
.empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

/* Responsive */
@media (max-width: 380px) {
    .package-grid {
        grid-template-columns: 1fr;
    }

    .uid-input-group {
        flex-direction: column;
    }
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card-solid);
    border-radius: 16px;
    border: 2px solid var(--border);
    position: relative;
    z-index: 1;
}

.qty-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--purple-glow);
}

.qty-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px var(--purple-glow);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-input {
    width: 80px;
    height: 48px;
    text-align: center;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.quantity-total {
    text-align: center;
    margin-top: 16px;
    font-size: 18px;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.quantity-total strong {
    color: var(--purple);
    font-size: 24px;
    font-weight: 700;
}