/* topup.css - Complete Modern Game Store Style with Header */

/* 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: 1400px;
    margin: 0 auto;
    padding: 40px 30px;
    position: relative;
    z-index: 1;
}

/* Hero Section */
.topup-container h1 {
    font-family: 'Orbitron', monospace;
    font-size: 3.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #a855f7 40%, #ec4899 70%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 45px;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    animation: fadeInDown 0.8s ease;
}

.topup-container h1::before {
    content: '⚡';
    font-size: 2.5rem;
    background: none;
    -webkit-text-fill-color: #fbbf24;
    position: absolute;
    left: -50px;
    top: 10px;
    opacity: 0;
    animation: slideInLeft 0.5s ease 0.3s forwards;
}

.topup-container h1::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #a855f7, #ec4899, #fbbf24);
    border-radius: 2px;
    animation: expandWidth 0.8s ease 0.5s forwards;
    transform: scaleX(0);
    transform-origin: left;
}

@keyframes expandWidth {
    to {
        transform: scaleX(1);
    }
}

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

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

.topup-container > p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 60px;
    padding-left: 0;
    max-width: 600px;
    line-height: 1.7;
    border-left: 3px solid #a855f7;
    padding-left: 20px;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

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

/* Platform Selection Grid */
.platform-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Platform Cards */
.platform-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(10px);
    border-radius: 28px;
    padding: 35px 20px;
    text-align: center;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    display: block;
    animation: fadeInScale 0.6s ease backwards;
}

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

/* Card Glow Effect on Hover */
.platform-card::before {
    content: '';
    position: absolute;
    top: var(--y, 50%);
    left: var(--x, 50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.4), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    pointer-events: none;
}

.platform-card:hover::before {
    width: 300px;
    height: 300px;
}

/* Card Border Animation */
.platform-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    padding: 2px;
    background: linear-gradient(135deg, #a855f7, #ec4899, #fbbf24);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.platform-card:hover::after {
    opacity: 1;
}

.platform-card:hover {
    transform: translateY(-10px) scale(1.03);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(236, 72, 153, 0.1));
    border-color: rgba(168, 85, 247, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(168, 85, 247, 0.4);
}

/* Platform Images */
.platform-card img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
    transition: all 0.4s ease;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.3));
}

.platform-card:hover img {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 15px rgba(168, 85, 247, 0.6));
}

/* Platform Title */
.platform-card h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #ffffff;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.platform-card:hover h3 {
    background: linear-gradient(135deg, #ffffff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

/* Platform Type Badge */
.platform-type {
    display: inline-block;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2));
    color: #c084fc;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.platform-card:hover .platform-type {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
    border-color: transparent;
    transform: scale(1.05);
}

/* Card Animation Delays */
.platform-card:nth-child(1) { animation-delay: 0.05s; }
.platform-card:nth-child(2) { animation-delay: 0.1s; }
.platform-card:nth-child(3) { animation-delay: 0.15s; }
.platform-card:nth-child(4) { animation-delay: 0.2s; }
.platform-card:nth-child(5) { animation-delay: 0.25s; }
.platform-card:nth-child(6) { animation-delay: 0.3s; }
.platform-card:nth-child(7) { animation-delay: 0.35s; }
.platform-card:nth-child(8) { animation-delay: 0.4s; }
.platform-card:nth-child(9) { animation-delay: 0.45s; }
.platform-card:nth-child(10) { animation-delay: 0.5s; }

/* Empty State */
.platform-selection:empty::after {
    content: "🎮 No platforms available";
    display: block;
    text-align: center;
    padding: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    grid-column: 1 / -1;
}

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

/* Desktop (1200px - 1400px) */
@media screen and (max-width: 1400px) {
    .container {
        max-width: 1200px;
        padding: 0 25px;
    }
    
    .topup-container {
        max-width: 1200px;
        padding: 35px 25px;
    }
    
    .platform-selection {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 25px;
    }
}

/* Laptop (1024px - 1199px) */
@media screen and (max-width: 1199px) {
    .topup-container h1 {
        font-size: 3.2rem;
    }
    
    .platform-selection {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
        gap: 22px;
    }
    
    .platform-card {
        padding: 30px 15px;
    }
    
    .platform-card img {
        width: 85px;
        height: 85px;
    }
    
    .platform-card h3 {
        font-size: 1.1rem;
    }
}

/* Tablet Landscape (768px - 1023px) */
@media screen and (max-width: 1023px) {
    .header-content {
        flex-direction: revert;
        text-align: center;
        padding: 15px 0;
    }
    
    .main-nav {
        justify-content: center;
    }
    
    .topup-container h1 {
        font-size: 2.8rem;
    }
    
    .topup-container h1::before {
        font-size: 2rem;
        left: -35px;
        top: 5px;
    }
    
    .topup-container > p {
        font-size: 1rem;
        margin-bottom: 45px;
    }
    
    .platform-selection {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 20px;
    }
    
    .platform-card {
        padding: 25px 12px;
        border-radius: 24px;
    }
    
    .platform-card img {
        width: 75px;
        height: 75px;
        margin-bottom: 15px;
    }
    
    .platform-card h3 {
        font-size: 1rem;
    }
    
    .platform-type {
        font-size: 0.7rem;
        padding: 5px 12px;
    }
}

/* Tablet Portrait (600px - 767px) */
@media screen and (max-width: 767px) {
    .container {
        padding: 0 20px;
    }
    
    .header-content {
        padding: 5px 0;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .main-nav {
        gap: 12px;
        display: none;
    }
    
    .hamburger-menu {
        display: block;
    }
    
    .main-nav a {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .btn-login, .btn-logout {
        padding: 6px 18px;
    }
    
    .topup-container {
        padding: 30px 20px;
    }
    
    .topup-container h1 {
        font-size: 2.3rem;
    }
    
    .topup-container h1::before {
        display: none;
    }
    
    .topup-container h1::after {
        width: 70px;
        bottom: -10px;
    }
    
    .topup-container > p {
        font-size: 0.95rem;
        margin-bottom: 35px;
        padding-left: 15px;
    }
    
    .platform-selection {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 18px;
    }
    
    .platform-card {
        padding: 22px 10px;
        border-radius: 20px;
    }
    
    .platform-card img {
        width: 65px;
        height: 65px;
        margin-bottom: 12px;
    }
    
    .platform-card h3 {
        font-size: 0.9rem;
    }
    
    .platform-type {
        font-size: 0.65rem;
        padding: 4px 10px;
    }
}

/* Mobile Large (425px - 599px) */
@media screen and (max-width: 599px) {
    .main-nav {
        gap: 8px;
    }
    
    .main-nav a {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    .topup-container {
        padding: 25px 16px;
    }
    
    .topup-container h1 {
        font-size: 2rem;
    }
    
    .topup-container > p {
        font-size: 0.9rem;
        margin-bottom: 30px;
    }
    
    .platform-selection {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 15px;
    }
    
    .platform-card {
        padding: 18px 8px;
        border-radius: 18px;
    }
    
    .platform-card img {
        width: 55px;
        height: 55px;
        margin-bottom: 10px;
    }
    
    .platform-card h3 {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }
    
    .platform-type {
        font-size: 0.6rem;
        padding: 3px 8px;
    }
}

/* Mobile Medium (375px - 424px) */
@media screen and (max-width: 424px) {
    .main-nav {
        gap: 6px;
    }
    
    .main-nav a {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .btn-login, .btn-logout {
        padding: 4px 14px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .topup-container h1 {
        font-size: 1.8rem;
    }
    
    .platform-selection {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .platform-card {
        padding: 15px 6px;
        border-radius: 16px;
    }
    
    .platform-card img {
        width: 48px;
        height: 48px;
    }
    
    .platform-card h3 {
        font-size: 0.8rem;
    }
}

/* Mobile Small (320px - 374px) */
@media screen and (max-width: 374px) {
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .platform-selection {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }
    
    .platform-card img {
        width: 42px;
        height: 42px;
    }
    
    .platform-card h3 {
        font-size: 0.75rem;
    }
    
    .platform-type {
        font-size: 0.55rem;
        padding: 2px 6px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .platform-card {
        transition: all 0.2s ease;
    }
    
    .platform-card:active {
        transform: scale(0.97);
        background: rgba(168, 85, 247, 0.15);
    }
    
    .platform-card::before {
        display: none;
    }
    
    .main-nav a:hover {
        transform: none;
    }
}

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

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #0a0f1f 0%, #0f172a 50%, #1e1b4b 100%);
    }
}

/* 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;
    }
    
    .platform-card:hover {
        transform: none;
    }
    
    .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;
}