/* ========================================
   BOOST MODAL - MODERN REDESIGN
   ======================================== */

/* Modal Close Button */
.close {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
    color: var(--text);
    font-weight: 700;
    top: -12px;
    right: -12px;
    position: absolute;
    font-size: 28px;
    border-radius: var(--radius);
    padding: 4px 12px;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 100;
    line-height: 1;
}

.close:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 32px rgba(14, 165, 233, 0.5);
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--primary-light) 100%);
}

/* Decorative Elements */
.star {
    max-width: 200px;
    position: absolute;
    width: 100%;
    top: -35px;
    left: -15px;
    z-index: 10;
    filter: drop-shadow(0 4px 12px rgba(14, 165, 233, 0.4));
    animation: starPulse 2s infinite ease-in-out;
}

@keyframes starPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 4px 12px rgba(14, 165, 233, 0.4));
    }
    50% {
        transform: scale(1.05) rotate(5deg);
        filter: drop-shadow(0 8px 24px rgba(14, 165, 233, 0.6));
    }
}

.pulse {
    animation: pulse 1.8s infinite alternate;
    -webkit-animation: pulse 1.8s infinite alternate;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
}

@keyframes pulse {
    0% {
        transform: scale3d(1, 1, 1);
        opacity: 0.9;
    }
    50% {
        transform: scale3d(1.05, 1.05, 1.05);
        opacity: 1;
    }
    100% {
        transform: scale3d(1, 1, 1);
        opacity: 0.9;
    }
}

.petir-modal {
    position: absolute;
    width: 170px;
    top: -5px;
    left: -15px;
    filter: drop-shadow(0 4px 16px rgba(20, 184, 166, 0.5));
    animation: lightningFlash 3s infinite ease-in-out;
}

@keyframes lightningFlash {
    0%, 100% {
        opacity: 0.8;
        filter: drop-shadow(0 4px 16px rgba(20, 184, 166, 0.5));
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 8px 32px rgba(20, 184, 166, 0.8));
    }
}

/* Modal Positioning */
#boost_modal {
    top: 2%;
    z-index: 9999;
}

/* Modern Modal Content */
.modal-content {
    position: relative;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
    border-radius: var(--radius-lg);
    outline: 0;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 0 64px rgba(14, 165, 233, 0.2);
    color: var(--text);
    border: 2px solid rgba(14, 165, 233, 0.3);
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary));
    background-size: 200% 100%;
    animation: gradientShift 3s linear infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* Modal Image */
#img-modal {
    width: 100%;
    border-radius: var(--radius) var(--radius) 0 0;
    border: 3px solid;
    object-fit: cover;
    transition: var(--transition);
}

.pc-green {
    border-color: var(--success);
    box-shadow: 0 4px 24px rgba(16, 185, 129, 0.3);
}

.pc-red {
    border-color: var(--danger);
    box-shadow: 0 4px 24px rgba(239, 68, 68, 0.3);
}

.pc-yellow {
    border-color: var(--warning);
    box-shadow: 0 4px 24px rgba(245, 158, 11, 0.3);
}

/* Modern Progress Bar */
.percent_modal {
    height: 36px;
    display: flex;
    overflow: hidden;
    line-height: 0;
    font-size: 0.875rem;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.1));
    position: relative;
    z-index: 1;
    border-radius: 0 0 var(--radius) var(--radius);
    margin: 0 auto;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.percent_modal p {
    z-index: 15;
    position: absolute;
    text-align: center;
    width: 100%;
    font-size: 17px;
    font-weight: 700;
    transform: translateY(18px);
    color: var(--text);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

/* Modal Layout */
.kiri-modal {
    float: left;
    position: relative;
    width: 30%;
    padding-right: 0;
}

.kanan-modal {
    float: left;
    width: 70%;
    height: 100%;
    padding-left: 0;
}

.frame-kanan-modal {
    margin-left: 12px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Game Name Display */
.name-modal-game {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
}

.game-modal-green,
.game-modal-red,
.game-modal-yellow {
    margin: 0 0 8px 0;
    text-align: center;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.game-modal-green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(52, 211, 153, 0.2));
    border: 2px solid var(--success);
    color: var(--text);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}

.game-modal-red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(248, 113, 113, 0.2));
    border: 2px solid var(--danger);
    color: var(--text);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.2);
}

.game-modal-yellow {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 191, 36, 0.2));
    border: 2px solid var(--warning);
    color: var(--text);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.2);
}

.game-modal-green:hover,
.game-modal-red:hover,
.game-modal-yellow:hover {
    transform: scale(1.02);
}

/* RTP Live Display */
.rtp-live-frame {
    width: 100%;
    flex: 1;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rtp-live-green,
.rtp-live-red,
.rtp-live-yellow {
    border-radius: var(--radius);
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.rtp-live-green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(52, 211, 153, 0.2));
    border: 3px solid var(--success);
    color: var(--text);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    text-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.rtp-live-red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(248, 113, 113, 0.2));
    border: 3px solid var(--danger);
    color: var(--text);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
    text-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.rtp-live-yellow {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 191, 36, 0.2));
    border: 3px solid var(--warning);
    color: var(--text);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
    text-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* Animated shimmer effect for RTP display */
.rtp-live-green::before,
.rtp-live-red::before,
.rtp-live-yellow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmerSlide 3s infinite;
}

@keyframes shimmerSlide {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* RTP Name Badge */
.rtp-name {
    border: 4px solid rgba(14, 165, 233, 0.3) !important;
    border-radius: var(--radius-sm);
    font-size: 18px;
    font-weight: 600;
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition);
}

#rtp-name {
    margin-bottom: 0;
    height: 100%;
    padding-top: 7%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#rtp-name p {
    margin: 0 !important;
    line-height: 1.4;
}

#img-modal {
    height: 153px;
}

#percent-berhasil-di-boost-txt-modal {
    font-size: 72px !important;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: numberPulse 1.5s ease-in-out infinite;
}

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

/* Border Styles */
.border-isi-modal {
    border: 3px solid;
    border-radius: var(--radius);
    padding: 16px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition);
}

.border-green {
    border-color: var(--success) !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(52, 211, 153, 0.1));
    color: var(--text);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}

.border-red {
    border-color: var(--danger) !important;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(248, 113, 113, 0.1));
    color: var(--text);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.2);
}

.border-yellow {
    border-color: var(--warning) !important;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.1));
    color: var(--text);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.2);
}

/* Background Colors */
.bg-green {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-light) 100%);
    border: 3px solid var(--success);
    color: var(--text);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.bg-red {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-light) 100%);
    border: 3px solid var(--danger);
    color: var(--text);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

.bg-yellow {
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning-light) 100%);
    border: 3px solid var(--warning);
    color: var(--text-dark);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}

/* Modal Content Area */
.isi-modal {
    width: 100%;
    padding: 16px;
}

/* Button Layout */
.flex-button-last {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.button-last-kiri,
.button-last-kanan {
    flex: 1;
}

/* Gradient Button Styles */
.lg-green {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-light) 100%);
    color: var(--text);
    position: relative;
    overflow: hidden;
}

.lg-green::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--success-light) 0%, var(--success) 100%);
    opacity: 0;
    transition: var(--transition);
}

.lg-green:hover::before {
    opacity: 1;
}

.lg-red {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-light) 100%);
    color: var(--text);
    position: relative;
    overflow: hidden;
}

.lg-red::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--danger-light) 0%, var(--danger) 100%);
    opacity: 0;
    transition: var(--transition);
}

.lg-red:hover::before {
    opacity: 1;
}

.lg-yellow {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
    color: var(--text);
    position: relative;
    overflow: hidden;
}

.lg-yellow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--primary-light) 100%);
    opacity: 0;
    transition: var(--transition);
}

.lg-yellow:hover::before {
    opacity: 1;
}

/* Modern Action Button */
.login {
    border-radius: var(--radius);
    display: inline-block;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    font-weight: 700;
    padding: 14px 24px;
    margin: 12px 0 4px 0;
    border: none;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn {
    font-weight: 700;
    padding-left: 0;
    padding-right: 0;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

/* Mobile Link */
.link-mobile {
    display: block;
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-muted);
    font-size: 14px;
    margin: 12px auto 0 auto;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    border: 1px solid var(--glass-border);
    text-decoration: none;
    transition: var(--transition);
}

.link-mobile:hover {
    background: rgba(14, 165, 233, 0.1);
    border-color: var(--primary);
    color: var(--primary-light);
}

/* Snackbar Notification */
#snackbar-modal-pp {
    width: 90%;
    visibility: hidden;
    min-width: 250px;
    color: var(--text);
    text-align: center;
    border-radius: var(--radius);
    z-index: 1;
    font-size: 13px;
    font-weight: 600;
    position: absolute;
    bottom: 0;
    left: 50%;
    z-index: -1;
    transform: translate(-50%, 100%);
}

#snackbar-modal-pp.show-modal-pp {
    visibility: visible;
    -webkit-animation: fadeinTop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeinTop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#snackbar-modal-pp.hide-modal-pp {
    visibility: hidden;
    -webkit-animation: fadeoutTop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeoutTop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.frame-snackbar-modal-pp {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-light) 100%);
    padding: 12px 16px;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid rgba(239, 68, 68, 0.5);
}

@keyframes fadeinTop {
    from {
        bottom: 20px;
        opacity: 0;
        transform: translate(-50%, 100%) scale(0.95);
    }
    to {
        bottom: 0;
        opacity: 1;
        transform: translate(-50%, 100%) scale(1);
    }
}

@keyframes fadeoutTop {
    from {
        bottom: 0;
        opacity: 1;
        transform: translate(-50%, 100%) scale(1);
    }
    to {
        bottom: 20px;
        opacity: 0;
        transform: translate(-50%, 100%) scale(0.95);
    }
}

/* Information Text Sections */
.pola-text,
.apa-itu-boost-rtp-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

.pola-rtp,
.apa-itu-boost-rtp-rtp {
    font-weight: 900;
    color: var(--text);
}

/* Frame RTP Status */
.frame-rtp-yellow,
.frame-rtp-red,
.frame-rtp-green {
    font-size: 14px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition);
    display: inline-block;
    margin: 4px 0;
}

.frame-rtp-yellow {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 191, 36, 0.2));
    border: 2px solid var(--warning);
    color: var(--text);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.frame-rtp-red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(248, 113, 113, 0.2));
    border: 2px solid var(--danger);
    color: var(--text);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.frame-rtp-green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(52, 211, 153, 0.2));
    border: 2px solid var(--success);
    color: var(--text);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.frame-rtp-yellow:hover,
.frame-rtp-red:hover,
.frame-rtp-green:hover {
    transform: translateY(-2px);
}

/* Text Colors */
.text-green {
    color: var(--success-light);
    font-weight: 700;
}

.text-yellow {
    color: var(--warning-light);
    font-weight: 700;
}

.text-red {
    color: var(--danger-light);
    font-weight: 700;
}

/* Card Color Variants */
.card-green {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-light) 100%);
    padding: 12px;
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    border: 2px solid var(--success-light);
}

.card-red {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-light) 100%);
    padding: 12px;
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
    border: 2px solid var(--danger-light);
}

.card-yellow {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
    padding: 12px;
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.3);
    border: 2px solid var(--accent-light);
}

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

@media (max-width: 991.98px) {
    #boost_modal {
        top: 12%;
    }

    .modal-content {
        margin: 0 16px;
    }

    .rtp-live-frame {
        font-size: 28px;
    }
}

@media (max-width: 767.98px) {
    #boost_modal {
        top: 10%;
    }

    .modal-content {
        margin: 0 12px;
    }

    .rtp-name {
        font-size: 14px;
    }

    .rtp-live-frame {
        font-size: 24px;
    }

    .star {
        max-width: 120px;
        top: 12px;
        left: 18px;
    }

    #percent-txt-modal {
        font-size: 16px !important;
    }

    #percent-berhasil-di-boost-txt-modal {
        font-size: 64px !important;
    }

    #img-modal {
        height: 109px;
    }

    .petir-modal {
        width: 150px;
        top: 0;
    }

    .close {
        font-size: 24px;
        padding: 2px 10px;
    }

    .flex-button-last {
        flex-direction: column;
        gap: 8px;
    }

    .button-last-kiri,
    .button-last-kanan {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    #boost_modal {
        top: 10%;
    }

    .modal-content {
        margin: 0 8px;
    }

    .rtp-name {
        font-size: 12px;
    }

    .rtp-live-frame {
        font-size: 20px;
    }

    .star {
        max-width: 100px;
        top: 12px;
        left: 18px;
    }

    #percent-txt-modal {
        font-size: 14px !important;
    }

    #percent-berhasil-di-boost-txt-modal {
        font-size: 48px !important;
    }

    #img-modal {
        height: 109px;
    }

    .petir-modal {
        width: 130px;
        top: 0;
        left: -10px;
    }

    .pola-text,
    .apa-itu-boost-rtp-text {
        font-size: 12px;
    }

    .frame-rtp-yellow,
    .frame-rtp-red,
    .frame-rtp-green {
        font-size: 12px;
        padding: 6px 12px;
    }

    .close {
        font-size: 20px;
        padding: 2px 8px;
        top: -8px;
        right: -8px;
    }

    .name-modal-game {
        font-size: 14px;
    }

    .kiri-modal {
        width: 35%;
    }

    .kanan-modal {
        width: 65%;
    }

    .frame-kanan-modal {
        margin-left: 8px;
    }

    .login {
        font-size: 14px;
        padding: 12px 20px;
    }

    .isi-modal {
        padding: 12px;
    }
}

/* ========================================
   ACCESSIBILITY & PREFERENCES
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .star,
    .petir-modal,
    .pulse,
    .close,
    #percent-berhasil-di-boost-txt-modal {
        animation: none !important;
    }

    .modal-content::before,
    .rtp-live-green::before,
    .rtp-live-red::before,
    .rtp-live-yellow::before {
        animation: none !important;
    }
}

@media (prefers-contrast: high) {
    .modal-content {
        border-width: 3px;
    }

    .game-modal-green,
    .game-modal-red,
    .game-modal-yellow,
    .rtp-live-green,
    .rtp-live-red,
    .rtp-live-yellow {
        border-width: 3px;
    }

    .border-isi-modal {
        border-width: 4px;
    }
}

/* Print Styles */
@media print {
    .close,
    .star,
    .petir-modal {
        display: none;
    }

    .modal-content {
        box-shadow: none;
        border: 2px solid #000;
    }
}
