/* topups.css - Complete Modern Game Store Style for Package Selection */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0a0f1f 0%, #0f172a 50%, #1e1b4b 100%);
    min-height: 100vh;
    color: #ffffff;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ==================== */
/* HEADER STYLES */
/* ==================== */

.main-header {
    background: rgba(10, 15, 31, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(168, 85, 247, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    gap: 20px;
    flex-wrap: wrap;
}

/* Logo */
.logo {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #a855f7, #ec4899);
    transition: width 0.3s ease;
}

.logo:hover::after {
    width: 100%;
}

.logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.5));
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 25px;
    align-items: center;
    flex-wrap: wrap;
}

.main-nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.95rem;
}

.main-nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #a855f7, #ec4899);
    transition: width 0.3s ease;
}

.main-nav a:hover::before {
    width: 80%;
}

.main-nav a:hover {
    color: #ffffff;
    background: rgba(168, 85, 247, 0.1);
    transform: translateY(-2px);
}

/* Cart Badge */
.cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 50px;
    margin-left: 5px;
    animation: pulse 2s infinite;
}

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

/* Login/Logout Buttons */
.btn-login, .btn-logout {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    border: none;
    padding: 8px 24px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-login:hover, .btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(168, 85, 247, 0.4);
    background: linear-gradient(135deg, #c084fc, #a855f7);
}

.btn-login::before, .btn-logout::before {
    display: none;
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 80px);
}

/* ==================== */
/* TOPUP CONTAINER */
/* ==================== */

.topup-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 30px;
    position: relative;
    z-index: 1;
}

/* Back Button */
.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(168, 85, 247, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 45px;
}

.btn-secondary:hover {
    background: rgba(168, 85, 247, 0.2);
    border-color: #a855f7;
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(168, 85, 247, 0.2);
}

/* Hero Section */
.topup-container h1 {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    letter-spacing: 1px;
    animation: fadeInLeft 0.8s ease;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.topup-container > p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
    line-height: 1.6;
    border-left: 3px solid #a855f7;
    padding-left: 20px;
    animation: fadeInRight 0.8s ease 0.2s backwards;
}

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

/* Alert Messages */
.alert {
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 30px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.alert-warning {
    background: rgba(245, 158, 11, 0.2);
    border-left: 4px solid #f59e0b;
    color: #fbbf24;
}

/* ==================== */
/* FORM STYLES */
/* ==================== */

form {
    background: rgba(20, 25, 45, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 35px;
    border: 1px solid rgba(168, 85, 247, 0.2);
    animation: fadeInUp 0.8s ease 0.3s backwards;
}

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

/* Package Grid */
.package-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1.5fr));
    gap: 20px;
    margin-bottom: 40px;
}

.package-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border-radius: 20px;
    padding: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(168, 85, 247, 0.2);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.package-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.1), transparent);
    transition: left 0.5s ease;
}

.package-item:hover::before {
    left: 100%;
}

.package-item:hover {
    transform: translateY(-5px);
    border-color: #a855f7;
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.2);
}

.package-item input[type="radio"] {
    display: none;
}

.package-item label {
    display: block;
    cursor: pointer;
    text-align: center;
}

.package-item label strong {
    font-size: 1.1rem;
    display: block;
    margin-bottom: 10px;
    color: #d8d8d8;
    font-weight: 600;
}

.package-item:has(input:checked) {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.15));
    border-color: #a855f7;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
    transform: scale(1.02);
}

.package-item:has(input:checked) label strong {
    background: linear-gradient(135deg, #ffffff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.field-group {
    margin-bottom: 20px;
}

.field-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: #c084fc;
}

.field-group input,
.field-group select {
    width: 100%;
    padding: 14px 18px;
    background: rgba(10, 15, 31, 0.8);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 14px;
    color: #e9e9e9;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.field-group input:focus,
.field-group select:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
    background: rgba(10, 15, 31, 0.95);
}

.field-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Payment Options */
.payment-options {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(10, 15, 31, 0.5);
    border-radius: 20px;
}

.payment-options h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #ffffff;
    font-weight: 600;
}

.payment-options label {
    display: inline-flex;
    align-items: center;
    margin-right: 25px;
    cursor: pointer;
    padding: 10px 24px;
    background: rgba(30, 35, 55, 0.8);
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.payment-options label:hover {
    background: rgba(168, 85, 247, 0.2);
    transform: translateY(-2px);
}

.payment-options input[type="radio"] {
    margin-right: 10px;
    accent-color: #a855f7;
    width: 18px;
    height: 18px;
}

/* Payment Info Panels */
.payment-info {
    margin-bottom: 30px;
}

.payment-panel {
    background: linear-gradient(135deg, rgba(20, 25, 45, 0.9), rgba(15, 20, 35, 0.9));
    border-radius: 24px;
    padding: 30px;
    border: 1px solid rgba(168, 85, 247, 0.3);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.payment-panel h4 {
    font-size: 1.3rem;
    color: #a855f7;
    margin-bottom: 15px;
    font-family: 'Orbitron', monospace;
}

.payment-panel p {
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.payment-detail {
    background: rgba(168, 85, 247, 0.1);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 3px solid #a855f7;
}

.payment-panel img {
    max-width: 200px;
    margin-top: 20px;
    border-radius: 16px;
    border: 2px solid rgba(168, 85, 247, 0.5);
    padding: 10px;
    background: white;
    transition: transform 0.3s ease;
}

.payment-panel img:hover {
    transform: scale(1.05);
}

.hidden {
    display: none;
}

/* Receipt Upload */
.receipt-upload {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(10, 15, 31, 0.5);
    border-radius: 20px;
}

.receipt-upload label {
    display: block;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 1rem;
}

.receipt-upload input[type="file"] {
    width: 100%;
    padding: 12px;
    background: rgba(10, 15, 31, 0.8);
    border: 2px dashed #a855f7;
    border-radius: 14px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.receipt-upload input[type="file"]:hover {
    background: rgba(168, 85, 247, 0.1);
    border-color: #c084fc;
}

.receipt-upload small {
    display: block;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

/* Submit Button */
.btn-primary {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: white;
    border: none;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn-primary::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;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.4);
}

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

/* ==================== */
/* RESPONSIVE DESIGN */
/* ==================== */

/* Tablet Landscape (768px - 1023px) */
@media screen and (max-width: 1023px) {
    .container {
        padding: 0 20px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .main-nav {
        justify-content: center;
    }
    
    .topup-container {
        padding: 30px 20px;
    }
    
    .topup-container h1 {
        font-size: 2rem;
    }
    
    form {
        padding: 25px;
    }
    
    .package-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 15px;
    }
}

/* Tablet Portrait (600px - 767px) */
@media screen and (max-width: 767px) {
    .logo {
        font-size: 1.5rem;
    }
    
    .main-nav {
        gap: 12px;
    }
    
    .main-nav a {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .btn-login, .btn-logout {
        padding: 6px 18px;
    }
    
    .topup-container h1 {
        font-size: 1.8rem;
    }
    
    .topup-container > p {
        font-size: 0.9rem;
    }
    
    form {
        padding: 20px;
    }
    
    .package-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .package-item {
        padding: 15px;
    }
    
    .package-item label strong {
        font-size: 0.95rem;
    }
    
    .payment-options label {
        display: flex;
        margin-bottom: 10px;
        width: 100%;
        color: #ffffff;
    }
    
    .payment-panel {
        padding: 20px;
    }
    
    .payment-panel img {
        max-width: 150px;
    }
}

/* Mobile Large (425px - 599px) */
@media screen and (max-width: 599px) {
    .topup-container {
        padding: 20px 15px;
    }
    
    .topup-container h1 {
        font-size: 1.5rem;
    }
    
    .btn-secondary {
        font-size: 0.85rem;
        padding: 8px 18px;
    }
    
    .package-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
    
    .package-item {
        padding: 12px;
    }
    
    .package-item label strong {
        font-size: 0.85rem;
    }
    
    .field-group input,
    .field-group select {
        padding: 12px 14px;
        font-size: 0.9rem;
    }
    
    .btn-primary {
        padding: 14px 30px;
        font-size: 1rem;
    }
}

/* Mobile Medium (375px - 424px) */
@media screen and (max-width: 424px) {
    .main-nav {
        gap: 8px;
    }
    
    .main-nav a {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .topup-container h1 {
        font-size: 1.3rem;
    }
    
    .package-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .package-item label strong {
        font-size: 0.8rem;
    }
    
    .package-item label br + br {
        display: none;
    }
}

/* Mobile Small (320px - 374px) */
@media screen and (max-width: 374px) {
    .main-nav {
        flex-wrap: wrap;
    }
    
    .package-grid {
        grid-template-columns: 1fr;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .package-item:active {
        transform: scale(0.98);
    }
    
    .btn-primary:active {
        transform: scale(0.98);
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .package-item label,
    .payment-panel img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .cart-badge {
        animation: none;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #c084fc, #f472b6);
}

/* Selection Color */
::selection {
    background: rgba(168, 85, 247, 0.3);
    color: #ffffff;
}

::-moz-selection {
    background: rgba(168, 85, 247, 0.3);
    color: #ffffff;
}