/* Header styling - Elegant font with modern 3D effect */
h1 {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-weight: 900;
    letter-spacing: 3px;
    text-transform: uppercase;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #FFEB3B 30%, #ffffff 60%, #FFEB3B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1rem;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.3),
        0 2px 0 rgba(0, 0, 0, 0.2),
        0 3px 0 rgba(0, 0, 0, 0.15),
        0 4px 8px rgba(0, 0, 0, 0.3),
        0 0 25px rgba(255, 235, 59, 0.6),
        0 0 50px rgba(255, 235, 59, 0.4);
    transform: perspective(500px) rotateX(5deg);
    transform-style: preserve-3d;
    /* No transition - headers are not interactive */
    animation: headerGlow 3s ease-in-out infinite;
    filter: brightness(1.2);
}

h2 {
    font-family: 'Montserrat', 'Arial Black', sans-serif;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #FFEB3B 20%, #ffffff 40%, #FFEB3B 60%, #ffffff 80%, #FFEB3B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.3),
        0 2px 0 rgba(0, 0, 0, 0.2),
        0 3px 0 rgba(0, 0, 0, 0.15),
        0 4px 8px rgba(0, 0, 0, 0.3),
        0 0 25px rgba(255, 235, 59, 0.6),
        0 0 50px rgba(255, 235, 59, 0.4);
    transform: perspective(500px) rotateX(5deg);
    transform-style: preserve-3d;
    /* No transition - headers are not interactive */
    filter: brightness(1.2);
}

/* No hover effects - headers are not buttons, no interaction needed */

/* Logo header - Smaller size and centered */
header .logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

header img,
.logo-wrapper img,
header .img-fluid,
.logo-wrapper .img-fluid {
    max-width: 150px !important;
    width: 150px !important;
    height: auto !important;
    margin: 0 auto;
    display: block;
}

@keyframes headerGlow {

    0%,
    100% {
        filter: brightness(1) drop-shadow(0 0 15px rgba(255, 215, 0, 0.4));
    }

    50% {
        filter: brightness(1.25) drop-shadow(0 0 25px rgba(255, 215, 0, 0.6));
    }
}

/* Progress bar base styles - Only width and background transition */
.percent-bar {
    height: 100%;
    transition: width 1s ease-out, background 0.5s ease;
    border-radius: 999px;
    position: relative;
    overflow: hidden;
    will-change: width;
    backface-visibility: hidden;
    transform: translateZ(0);
    /* No transform or scale animations */
}

/* Striped pattern animation for progress bar */
.percent-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 8px,
            rgba(0, 0, 0, 0.15) 8px,
            rgba(0, 0, 0, 0.15) 16px);
    background-size: 24px 24px;
    animation: stripeMove 1s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes stripeMove {
    0% {
        background-position: -24px 0;
    }

    100% {
        background-position: 24px 0;
    }
}

/* Color classes for progress bars - Exact gradient match */
.percent-bar.red {
    background: linear-gradient(90deg, #ff4757 0%, #ff6b9d 50%, #ff8fab 100%);
}

.percent-bar.yellow {
    background: linear-gradient(90deg, #ffa502 0%, #ffb84d 50%, #ffc966 100%);
}

.percent-bar.blue {
    background: linear-gradient(90deg, #3742fa 0%, #5352ed 50%, #7474e8 100%);
}

.percent-bar.green {
    background: linear-gradient(90deg, #2ed573 0%, #5ee87f 50%, #7ef5a0 100%);
}

/* Percent container - No hover effects, only static */
.percent {
    position: relative;
    height: 20px;
    background: #f1f3f5;
    border-radius: 999px;
    overflow: hidden;
    cursor: default;
    will-change: width;
    backface-visibility: hidden;
    transform: translateZ(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.08);
    /* No hover effects - only bar width changes */
}

.percent p {
    position: absolute;
    width: 100%;
    text-align: center;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    font-weight: 700;
    font-size: 11px;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    z-index: 10;
    pointer-events: none;
    letter-spacing: 0.3px;
    transition: opacity 0.3s ease;
    /* Only text content changes, no movement */
}

/* Smooth transition for card - Semi transparent like screenshot - Override Bootstrap border-0 */
.card-game,
.card.card-game,
.card-game.border-0,
.card.card-game.border-0,
[class*="card-game"].border-0 {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, outline 0.3s ease !important;
    background: rgba(0, 0, 0, 0.3) !important;
    background-color: rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: none !important;
    background: rgba(0, 0, 0, 0.38) !important;
    overflow: visible;
    border: 1px dashed rgb(0, 0, 0) !important;
    border-width: 1px !important;
    border-style: dashed !important;
    border-color: rgb(0, 0, 0) !important;
    border-image: none !important;
    border-radius: 12px !important;
    position: relative;
    /* Gold outline using box-shadow - solid, not transparent */
    box-shadow:
        0 0 0 1px #e2cc4d,
        0 4px 8px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2) !important;
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
    /* Card itself doesn't move, only image */
}


/* Force border to show even with border-0 class - Higher specificity */
.card.card-game.border-0,
.card-game.border-0,
div.card.card-game.border-0,
div[class*="card-game"].border-0 {
    border: 1px dashed rgb(0, 0, 0) !important;
    border-width: 1px !important;
    border-style: dashed !important;
    border-color: rgb(0, 0, 0) !important;
    border-image: none !important;
    box-shadow: 0 0 0 1px #ffee00 !important;
}

/* Decorative glow effect at corners instead of corner markers */
.card-game::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

.card-game::after {
    content: '';
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

/* Hide corner markers created by JavaScript */
.corner-marker {
    display: none !important;
}

.card-game:hover {
    box-shadow:
        0 0 0 1px #FFD700,
        0 12px 24px rgba(0, 0, 0, 0.4),
        0 6px 12px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 215, 0, 0.2) !important;
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px dashed rgb(0, 0, 0) !important;
    border-color: rgb(0, 0, 0) !important;
    transform: scale(1.03);
    transform-style: preserve-3d;
}

/* Semi transparent cover for card background */
.bg-color-1,
.bg-color-2 {
    background: rgba(0, 0, 0, 0.25) !important;
    background-color: rgba(0, 0, 0, 0.25) !important;
}

.card-body.bg-transparent {
    background: rgba(0, 0, 0, 0.2) !important;
    background-color: rgba(0, 0, 0, 0.2) !important;
    position: relative;
    overflow: hidden;
    padding: 0;
    margin: 0;
    border-radius: 12px 12px 0 0;
}

/* IMAGE IS CLICKABLE */
.card-game a {
    display: block;
}

.card-game a img {
    cursor: pointer;
}

/* Image zoom effect - only image moves, not the card - Contained within card-body */
.card-game .card-img-top,
.card-game .card-body img {
    transition: transform 0.5s ease;
    transform-origin: center;
    will-change: transform;
    border-radius: 10px 10px 0 0;
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: cover;
    border: 2px solid #FFD700;
    border-bottom: none;
    box-shadow:
        0 0 0 1px #FFD700,
        0 0 10px rgba(255, 215, 0, 0.3),
        inset 0 0 10px rgba(255, 215, 0, 0.1);
    box-sizing: border-box;
}

.card-game:hover .card-img-top,
.card-game:hover img {
    transform: scale(1.07);
}

.card-footer.bg-transparent {
    background: rgba(0, 0, 0, 0.2) !important;
    background-color: rgba(0, 0, 0, 0.2) !important;
    border-top: 2px solid #FFD700;
    box-shadow:
        0 -2px 0 0 #FFD700,
        0 -3px 0 0 rgba(255, 215, 0, 0.5),
        0 -4px 8px rgba(255, 215, 0, 0.3);
}


/* Ripple effect - Simple and clean */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}


/* Provider card - Semi transparent like game card */
.btn-tab {
    display: block;
    margin: 10px 5px;
}

.card-provider {
    position: relative;
    background: rgba(0, 0, 0, 0.35) !important;
    border-radius: 8px;
    padding: 6px !important;

    /* Performance */
    will-change: transform;
    contain: layout paint;
    transform: translateZ(0);

    /* Only needed transitions */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-provider:hover {
    transform: scale(1);
    box-shadow: 0 6px 18px rgba(255, 215, 0, 0.35);
}

.card-provider .card-body {
    background: rgba(0, 0, 0, 0.2) !important;
    background-color: rgba(0, 0, 0, 0.2) !important;
    padding: 0.25rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    /* Pastikan di atas pseudo-element */
    z-index: 1;
}

.card-provider:hover .card-body {
    background: rgba(0, 0, 0, 0.3) !important;
}

/* Provider card image - Smaller size with smooth transition */
.card-provider img {
    max-height: 38px;
    object-fit: contain;
    transform: translateZ(0);
    will-change: transform;
    transition: transform 0.2s ease;
}

.card-provider:hover img {
    transform: scale(1.5);
}

/* Footer copyright - Attractive styling */
footer {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 100%);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
}

footer p {
    color: #ffffff;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
}

footer a {
    color: #ffffff !important;
    transition: all 0.3s ease;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    transition: width 0.3s ease;
}

footer a:hover {
    color: #FFD700 !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    transform: translateY(-2px);
}

footer a:hover::after {
    width: 100%;
}

footer span {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: inline-block;
}

footer span:hover {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    transform: translateY(-2px);
}

/* Copyright symbol with glow effect */
footer p span:nth-of-type(2) {
    display: inline-block;
    animation: copyrightGlow 2s ease-in-out infinite;
}

@keyframes copyrightGlow {

    0%,
    100% {
        opacity: 1;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    50% {
        opacity: 0.9;
        text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    }
}

/* Login button - Elegant styling with hover effect (only for login button, not Play Now) */
a.btn[href*="permata888"]:not(.btn-success),
a.btn[href*="permata888"]:visited:not(.btn-success) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%) !important;
    border: none !important;
    border-radius: 15px !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    box-shadow:
        0 4px 15px rgba(102, 126, 234, 0.4),
        0 2px 8px rgba(118, 75, 162, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden;
    transform: perspective(500px) translateZ(0);
}

a.btn[href*="permata888"]:not(.btn-success)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

a.btn[href*="permata888"]:not(.btn-success):hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 50%, #764ba2 100%) !important;
    box-shadow:
        0 8px 25px rgba(102, 126, 234, 0.6),
        0 4px 12px rgba(118, 75, 162, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 30px rgba(102, 126, 234, 0.4) !important;
    transform: perspective(500px) translateY(-3px) scale(1.02) !important;
    color: #ffffff !important;
}

a.btn[href*="permata888"]:not(.btn-success):hover::before {
    left: 100%;
}

a.btn[href*="permata888"]:not(.btn-success):active {
    transform: perspective(500px) translateY(-1px) scale(0.98) !important;
    box-shadow:
        0 2px 10px rgba(102, 126, 234, 0.4),
        0 1px 5px rgba(118, 75, 162, 0.3) !important;
}

a.btn[href*="permata888"]:not(.btn-success) span,
a.btn[href*="permata888"]:not(.btn-success) {
    position: relative;
    z-index: 2;
}

/* Optimize rendering performance */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Hide Play Now buttons inside cards, keep login button intact --- */
.card-game .card-footer .btn-success {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Anchor wrapper for images created by JS */
.card-image-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.card-image-link img {
    cursor: pointer;
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}