/* ================================
   FunTopUp - Main Stylesheet
   ================================ */

/* Base Styles */
body {
    font-family: 'Fredoka', sans-serif;
    background-color: #fff8f0;
    color: #4a4a4a;
}

/* ================================
   Hidden Scrollbar (All Elements)
   ================================ */
/* Hide scrollbar for Chrome, Safari and Opera */
*::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
* {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* ================================
   3D Card Component
   ================================ */
.card-3d {
    background: white;
    border-radius: 24px;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 0 #e5e7eb;
    border: 2px solid #e5e7eb;
    position: relative;
    top: 0;
}

.card-3d:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 0 #d1d5db;
    border-color: #d1d5db;
}

.card-3d:active {
    transform: translateY(4px);
    box-shadow: 0 4px 0 #d1d5db;
}

/* Static Card (no hover effect) */
.card-static {
    background: white;
    border-radius: 24px;
    box-shadow: 0 8px 0 #e5e7eb;
    border: 2px solid #e5e7eb;
}

/* ================================
   Button Styles
   ================================ */
.btn-action {
    background-color: #3b82f6;
    color: white;
    box-shadow: 0 4px 0 #2563eb;
    transition: all 0.1s;
}

.btn-action:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #2563eb;
}

.btn-3d {
    transition: all 0.1s;
}

.btn-3d:active {
    transform: translateY(4px);
    box-shadow: none !important;
}

/* ================================
   Badge Styles
   ================================ */
.badge-hot {
    background-color: #ff4757;
    color: white;
    box-shadow: 0 2px 0 #c0392b;
}

.badge-new {
    background-color: #2ed573;
    color: white;
    box-shadow: 0 2px 0 #1e9c50;
}

.badge-sale {
    background-color: #ffa502;
    color: white;
    box-shadow: 0 2px 0 #cc8402;
}

/* ================================
   Game Card Component
   ================================ */
.game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.game-card {
    background: white;
    border-radius: 16px;
    overflow: visible;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    top: 0;
    transform-style: preserve-3d;
}

.game-card .card-image-wrapper {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card tilt up (miring ke atas) saat hover */
.game-card:hover {
    transform: perspective(800px) rotateX(15deg) translateY(-20px) scale(1.02);
    box-shadow:
        0 35px 60px rgba(0, 0, 0, 0.3),
        0 15px 25px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Banner blur saat hover */
.game-card:hover .card-image-wrapper {
    filter: blur(4px) brightness(0.6);
}

.game-card:hover .card-image {
    transform: scale(1.1);
}

.game-card:active {
    transform: perspective(800px) rotateX(10deg) translateY(-10px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.game-card .card-image {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.game-card:hover .card-image {
    transform: scale(1.08);
}

.game-card .card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    transform: translateY(0);
    opacity: 1;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 0 16px 16px;
    z-index: 2;
}

/* Hide card info on hover when hero image exists */
.game-card:hover .card-info {
    opacity: 0;
    transform: translateY(10px);
}

/* Hero Character 3D Pop-out Effect */
.game-card .card-hero-wrapper {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 110%;
    transform: translateX(-50%) translateY(40px) scale(0.7);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    pointer-events: none;
}

.game-card:hover .card-hero-wrapper {
    transform: translateX(-50%) translateY(5%) scale(1.1);
    opacity: 1;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
}

.game-card .card-hero {
    width: 100%;
    max-width: none;
    height: auto;
    object-fit: contain;
    object-position: bottom center;
}

@media (min-width: 640px) {
    .game-card:hover {
        transform: perspective(800px) rotateX(18deg) translateY(-25px) scale(1.03);
    }

    .game-card:hover .card-image-wrapper {
        filter: blur(6px) brightness(0.5);
    }

    .game-card:hover .card-hero-wrapper {
        transform: translateX(-50%) translateY(0%) scale(1.15);
    }
}

.game-card .card-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    margin-bottom: 2px;
    line-height: 1.2;
}

.game-card .card-publisher {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
}

@media (min-width: 640px) {
    .game-card .card-title {
        font-size: 1rem;
    }
    .game-card .card-publisher {
        font-size: 0.8rem;
    }
}

/* ================================
   Flash Sale Card
   ================================ */
.flash-card {
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.flash-card:hover {
    transform: translateY(-6px) scale(1.02);
    z-index: 10;
}

.flash-card:active {
    transform: translateY(2px) scale(0.98);
}

.flash-sale-container {
    overflow: visible !important;
    padding-top: 10px;
    padding-bottom: 10px;
    margin-top: -10px;
}

.flash-sale-container .swiper-wrapper {
    overflow: visible;
    padding: 10px 0;
}

.flash-sale-container .swiper-slide {
    overflow: visible;
}

/* ================================
   Custom Scrollbar
   ================================ */
.scroll-container::-webkit-scrollbar {
    height: 8px;
}

.scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

/* ================================
   Animations
   ================================ */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(59, 130, 246, 0.5); }
    50% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.8); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

/* ================================
   Utility Classes
   ================================ */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-card {
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.9);
}

/* ================================
   Swiper Customization
   ================================ */
.swiper {
    width: 100%;
    padding-bottom: 40px;
    --swiper-navigation-size: 0;
}

.swiper-wrapper {
    display: flex;
}

.swiper-slide {
    flex-shrink: 0;
}

.swiper-tabs .swiper-slide {
    width: auto;
}

.swiper-pagination-bullet {
    background: #cbd5e1;
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: #3b82f6;
    width: 24px;
    border-radius: 4px;
}

.swiper-hero .swiper-slide {
    height: auto;
}

/* ================================
   Responsive - Mobile Only Swiper
   ================================ */
@media (max-width: 767px) {
    .md\:hidden {
        display: block !important;
    }
    .hidden.md\:flex {
        display: none !important;
    }
    .hidden.md\:grid {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .md\:hidden {
        display: none !important;
    }
    .hidden.md\:flex {
        display: flex !important;
    }
    .hidden.md\:grid {
        display: grid !important;
    }
}

/* ================================
   Form Styles
   ================================ */
.form-input {
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px 16px;
    transition: all 0.2s;
    box-shadow: 0 4px 0 #e5e7eb;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 4px 0 #93c5fd;
}

/* ================================
   Page Specific - Product Detail
   ================================ */
.product-image-main {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 0 #e5e7eb;
    border: 3px solid #e5e7eb;
}

.denomination-card {
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 0 #e5e7eb;
}

.denomination-card:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.denomination-card.selected {
    border-color: #3b82f6;
    background-color: #eff6ff;
    box-shadow: 0 4px 0 #93c5fd;
}

/* New Option Card Styles */
.option-card {
    position: relative;
    display: block;
}

.option-card-inner {
    position: relative;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 0 #e5e7eb;
    overflow: hidden;
}

.option-card:hover .option-card-inner {
    border-color: #93c5fd;
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #93c5fd, 0 6px 20px rgba(59, 130, 246, 0.12);
}

.option-card:has(input:checked) .option-card-inner {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 3px 0 #3b82f6, 0 6px 15px rgba(59, 130, 246, 0.18);
}

.option-card:has(input:checked) .option-name {
    color: #1e40af;
}

.option-card .option-price {
    color: #3b82f6;
    transition: color 0.25s;
}

.option-card:has(input:checked) .option-price {
    color: #1d4ed8;
}

.option-strike {
    min-height: 14px;
    display: flex;
    align-items: center;
}

.option-strike--placeholder {
    visibility: hidden;
}

/* Icon wrapper animation */
.option-icon-wrapper {
    transition: transform 0.25s;
}

.option-card:hover .option-icon-wrapper {
    transform: scale(1.05);
}

.option-card:has(input:checked) .option-icon-wrapper {
    transform: scale(1.1);
}

.option-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(145deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.4), 0 5px 12px rgba(37, 99, 235, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
}

.option-icon img {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

.option-icon i {
    color: #ffffff;
    font-size: 20px;
}

@media (max-width: 1024px) {
    .option-icon {
        width: 52px;
        height: 52px;
        border-radius: 15px;
    }
}

@media (max-width: 768px) {
    .option-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }
}

@media (max-width: 480px) {
    .option-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .option-icon i {
        font-size: 18px;
    }
}

.option-check {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 9px;
    opacity: 0;
    transform: scale(0.7);
    transition: all 0.2s ease;
    z-index: 10;
}

.option-card:has(input:checked) .option-check {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: #fff;
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 2px 6px rgba(29, 78, 216, 0.35);
}

/* Payment Card Styles */
.payment-card {
    position: relative;
    display: block;
}

.payment-card-inner {
    position: relative;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    background: #ffffff;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 0 #e5e7eb;
    height: 100%;
}

.payment-card:hover .payment-card-inner {
    border-color: #86efac;
    transform: translateY(-2px);
    box-shadow: 0 4px 0 #86efac, 0 6px 15px rgba(34, 197, 94, 0.1);
}

.payment-card:has(input:checked) .payment-card-inner {
    border-color: #22c55e;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    box-shadow: 0 3px 0 #22c55e, 0 6px 15px rgba(34, 197, 94, 0.15);
}

.payment-check {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    opacity: 0;
    transform: scale(0.5);
    z-index: 10;
}

.payment-check i {
    color: white;
    font-size: 8px;
}

.payment-card:has(input:checked) .payment-check {
    opacity: 1;
    transform: scale(1);
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.4);
}

/* Dark Denomination Card (like image reference) */
/* Removed old dark denomination overrides to keep default styling */

/* ================================
   Page Specific - Checkout
   ================================ */
.payment-method {
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 0 #e5e7eb;
}

.payment-method:hover {
    border-color: #d1d5db;
}

.payment-method.selected {
    border-color: #22c55e;
    background-color: #f0fdf4;
    box-shadow: 0 4px 0 #86efac;
}

/* ================================
   Page Specific - History
   ================================ */
.history-item {
    border-radius: 16px;
    border: 2px solid #e5e7eb;
    box-shadow: 0 4px 0 #e5e7eb;
    transition: all 0.2s;
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #d1d5db;
}

.status-success {
    background-color: #dcfce7;
    color: #15803d;
}

.status-pending {
    background-color: #fef3c7;
    color: #b45309;
}

.status-failed {
    background-color: #fee2e2;
    color: #b91c1c;
}
