/* OutOfPointsModal.css */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999999;
    backdrop-filter: blur(4px);
}

.out-of-points-modal {
    background: white;
    border-radius: 20px;
    max-width: 1140px;
    width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.3s ease-out;
    max-height: 95vh;
    overflow-y: auto;
}
.hide-banner {
    display: block;
}
.show-banner{
    display: none;
}
.out-of-points-modal.overHide .hide-banner{
    display: none;
}
.out-of-points-modal.overHide  .show-banner{
    display: block;
}

.out-of-points-modal.overHide{
    max-width: 900px;
}

.out-of-points-modal.overHide .banner-ads{
    justify-content: center;
    align-items: center;
}

.out-of-points-modal.overHide .banner-ads-img{
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
}

.out-of-points-modal.overHide .premium-ai-container{
    padding: 15px;
}
.out-of-points-modal.overHide .divider{
    opacity: 0;
}
.out-of-points-modal.overHide .premium-ai-container{
    gap: 10px;
    grid-template-columns: 1fr 1px 1.1fr;
}


@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#outOfPointsModal .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s;
    border: 1px solid #f1f1f1;
    z-index: 99999;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#outOfPointsModal .close-btn:hover {
    background-color: #f5f5f5;
}



/* Character Section */
.character-section {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    height: 90px;
}

.character-container-modal {
    position: relative;
    display: inline-block;
}

.character {
    position: relative;
    z-index: 2;
}

.character-body {
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-60%);
}

.character-head img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.character-cloud img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.character-head {
    width: 320px;
    position: relative;
    z-index: 2;
}

.character-cloud {
    position: absolute;
    top: 30px;
    left: 45%;
    width: 280px;
    z-index: 1;
}

/* Content Styles */

.out-of-points-modal .modal-title {
    font-size: 30px;
    font-weight: 600;
    color: #12afe4;
    margin-bottom: 0px;
    line-height: normal;
    margin-bottom: 20px;
}

.out-of-points-modal .modal-subtitle {
    font-size: 18px;
    color: #5E6278;
    padding-top: 15px;
    line-height: 1.4;
    border-top: 1px solid #eee;
    margin-bottom: 10px;
}

.out-of-points-modal .info-section {
    text-align: left;
}

.out-of-points-modal .info-item {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    font-size: 20px;
    line-height: normal;
    color: #5E6278;
    font-weight: 400;
}

.info-dot {
    width: 10px;
    height: 10px;
    background: #12afe4;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

.highlight-text {
    color: #12afe4 !important;
    font-weight: 600;
}

.copy-container {
    display: flex;
    align-items: center;
    /* background: #fff; */
    border-radius: 500px;
    padding: 4px;
    border: 1px solid #C4C4C7;
}

.copy-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 20px;
    outline: none;
    color: #12afe4;
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: auto;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
}

.copy-btn {
    border: none;
    border-radius: 50%;
    padding: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
}

.copy-btn:hover {
    background: #4a9bc7;
}

.copy-btn:hover svg path {
    fill: white;
}

.copy-btn svg {
    fill: white;
}

/* Animation shake nhẹ cho character */
.character-head {
    animation: gentleShake 2s ease-in-out infinite;
    transform-origin: center bottom;
}

.character-head img {
    width: 100%;
    height: auto;
    display: block;
}

/* Keyframes cho shake nhẹ */
@keyframes gentleShake {

    0%,
    100% {
        transform: translateX(0) rotate(0deg);
    }

    10% {
        transform: translateX(-2px) rotate(-1deg);
    }

    20% {
        transform: translateX(2px) rotate(1deg);
    }

    30% {
        transform: translateX(-1px) rotate(-0.5deg);
    }

    40% {
        transform: translateX(1px) rotate(0.5deg);
    }

    50% {
        transform: translateX(0) rotate(0deg);
    }

    60% {
        transform: translateX(-1px) rotate(-0.5deg);
    }

    70% {
        transform: translateX(1px) rotate(0.5deg);
    }

    80% {
        transform: translateX(-2px) rotate(-1deg);
    }

    90% {
        transform: translateX(2px) rotate(1deg);
    }
}

/* Animation cho cloud cũng shake nhẹ */
.character-cloud {
    animation: cloudFloat 3s ease-in-out infinite;
    animation-delay: 0.5s;
}

@keyframes cloudFloat {

    0%,
    100% {
        transform: translateY(0px) translateX(0px);
    }

    25% {
        transform: translateY(-3px) translateX(-1px);
    }

    50% {
        transform: translateY(-5px) translateX(1px);
    }

    75% {
        transform: translateY(-3px) translateX(-1px);
    }
}

.bubble-1 {
    animation-delay: 0s;
}

.bubble-2 {
    animation-delay: 0.8s;
}

.bubble-3 {
    animation-delay: 1.6s;
}

.bubble-4 {
    animation-delay: 2.4s;
}

.bubble-5 {
    animation-delay: 3.2s;
}



/* Hover effect cho character - shake mạnh hơn */
.character-head:hover {
    animation: strongShake 0.5s ease-in-out;
}

@keyframes strongShake {

    0%,
    100% {
        transform: translateX(0) rotate(0deg);
    }

    10% {
        transform: translateX(-5px) rotate(-2deg);
    }

    20% {
        transform: translateX(5px) rotate(2deg);
    }

    30% {
        transform: translateX(-4px) rotate(-1.5deg);
    }

    40% {
        transform: translateX(4px) rotate(1.5deg);
    }

    50% {
        transform: translateX(-3px) rotate(-1deg);
    }

    60% {
        transform: translateX(3px) rotate(1deg);
    }

    70% {
        transform: translateX(-2px) rotate(-0.5deg);
    }

    80% {
        transform: translateX(2px) rotate(0.5deg);
    }

    90% {
        transform: translateX(-1px) rotate(-0.2deg);
    }
}

/* Animation cho modal xuất hiện */
.out-of-points-modal {
    animation: modalAppear 0.4s ease-out;
}

@keyframes modalAppear {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }

    50% {
        opacity: 0.8;
        transform: translateY(-10px) scale(1.02);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Animation cho close button */
.close-btn {
    transition: all 0.3s ease;
}

.close-btn:hover {
    transform: rotate(90deg) scale(1.1);
    background-color: rgba(107, 211, 255, 0.1);
}

/* Animation cho copy button */
.copy-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.copy-btn:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #5db8e8, #4a9bc7);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* Ripple effect cho copy button */
.copy-btn::after {
    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;
}

.copy-btn:active::after {
    width: 300px;
    height: 300px;
}




.package-card .star-icon svg {
    width: auto;
    height: auto;
}

.package-card .star-icon {
    width: 60px;
    height: 60px;
}

/* Performance optimization */
.character-head,
.character-cloud,
.bubble {
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}


.divider {
    background-color: #e0e0e0;
    width: 100%;
    height: 100%;
}

.premium-ai-container {
    display: grid;
    grid-template-columns: 1fr 1px 1.4fr;
    gap: 20px;
    margin: 0 auto;
    width: 100%;
    padding: 30px;
    position: relative;
}

/* Premium Section (Left side) */
.premium-section {
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: start;
    flex-direction: column;
}

.premium-section .premium-pricing {
    width: 100%;
}

.premium-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.crown-icon {
    font-size: 24px;
}

.premium-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #5e6278;
}

.premium-text {
    color: #12afe4;
    font-weight: 700;
}

.premium-features {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.4;
    font-weight: 400;
    font-size: 16px;
    color: #5e6378;
}

.check-icon {
    color: #28a745;
    font-weight: 600;
    font-size: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}


.price-text {
    font-size: 24px;
    color: #5e6278;
    margin-bottom: 16px;
}

.price-amount {
    font-weight: 700;
    font-size: 27px;
    color: #12afe4;
}


.price-text small {
    font-size: 16px;
    color: #5e6278;
    margin-bottom: 16px;
}

.upgrade-btn {
    background: linear-gradient(90deg, #04c8e0 0%, #0491e1 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-bottom: 12px;
    transition: all 0.2s linear;
    height: 52px;
}

.upgrade-btn:hover {
    background: linear-gradient(90deg, #04c8e0 0%, #12afe4 50%, #0491e1 100%);
    background-size: 200% 100%;
    animation: buttonGradientShift 2s ease infinite;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(4, 200, 224, 0.3);
}

.note-text {
    font-style: italic;
    font-weight: 400;
    font-size: 13px;
    color: #5e6278;
    margin: 0;
    text-align: center;
    line-height: 20px;
}

/* AI Points Section (Right side) */
.ai-points-section {
    flex: 1;
    background: #ffffff;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
}

.ai-points-section h3 {
    margin: 0 0 0 0;
    font-size: 20px;
    font-weight: 600;
    color: #5e6278;
    line-height: 40px;
    margin-bottom: 10px;
}

.ai-text {
    color: #12afe4;
    font-weight: 700;
}

.points-info {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}


.points-packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.package-card {
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
    flex: 1;
}

.package-card:hover {
    transform: translateY(-2px);
}

.package-card:hover .package-point,
.package-card.selected .package-point {
    background: linear-gradient(180deg, #f2e3f5 0%, #e1faff 100%);
}

.package-card:hover .package-price,
.package-card.selected .package-price {
    background: #e3f8fe;
}

.package-point {
    padding: 16px 12px;
    height: 120px;
    border-radius: 16px;
    background: #f7f7f7;
}

.package-price {
    padding: 4px 12px;
    border-radius: 16px;
    background-color: #f7f7f7;
}


.package-point .points-package-number {
    font-weight: 700;
    font-size: 27px;
    color: #12afe4;
    transform: translateY(10px);
}

.package-point .star-package-icon {
    height: 30px;
}

.package-point .star-package-icon svg {
    width: auto;
    height: auto;
    transform: translateY(-30px);
}

.price-label {
    font-weight: 400;
    font-size: 16px;
    color: #5e6278;
}

.price-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.price-value {
    font-weight: 700;
    font-size: 24px;
    color: #5e6278;
}

.price-value .price-sale {
    color: #12afe4;
    font-size: 22px;
}

.price-value small {
    font-size: 14px;
}

.payment-btn {
    background: linear-gradient(90deg, #04c8e0 0%, #0491e1 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-bottom: 32px;
    height: 52px;
    transition: all 0.2s linear;
}

.payment-btn:hover {
    background: linear-gradient(90deg, #04c8e0 0%, #12afe4 50%, #0491e1 100%);
    background-size: 200% 100%;
    animation: buttonGradientShift 2s ease infinite;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(4, 200, 224, 0.3);
}

@keyframes buttonGradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Referral Section */
.referral-section {
    text-align: center;
    padding: 30px;
    background-color: #edfdff;
    display: grid;
    grid-template-columns: 1fr 1.4fr;

}

.referral-section-left {
    display: grid;
    grid-template-columns: 45px auto;
    align-items: center;
    gap: 10px;
}

.referral-content {
    text-align: left;
}

.referral-text {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #5e6278;
    margin: 0;
}

.referral-desc {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
}


.highlight-points {
    color: #12afe4;
    font-weight: 600;
}

.intro-text {
    font-size: 16px;
    color: #5e6278;
}

.bonus-points {
    color: #12afe4;
    font-weight: 600;
}

.referral-section .copy-container {
    background: #fff;
    border: 1px solid #c4c4c7;
    border-radius: 50px;
    padding: 2px;
    display: flex;
    align-items: center;
}

.referral-section .copy-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    color: #12afe4 !important;
    text-decoration: underline;
}

.referral-section .copy-btn {
    border: none;
    background: transparent;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.referral-section .copy-btn:hover {
    background: rgba(7, 167, 204, 0.1);
}

#outOfPointsModal .modal-content {
    position: relative;
}

.referral-section-right {
    text-align: left;
}

.payment-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.payment-btn:disabled:hover {
    transform: none;
}

.upgrade-modal .price-info {
    font-weight: 400;
    font-size: 20px;
    color: #5e6278;
}

/* Responsive */
@media (max-width: 768px) {
    .sm-responsive {
        padding: 0 10px !important;
    }

    .out-of-points-modal {
        margin: 20px;
        max-width: 95%;
        max-height: 80vh !important;
    }

    .modal-title {
        font-size: 20px;
    }

    .modal-subtitle {
        font-size: 16px;
    }

    .info-item {
        font-size: 16px;
    }

    .copy-input {
        font-size: 14px;
    }

    .premium-ai-container {
        grid-template-columns: 1fr;
        gap: 5px;
        padding: 15px;
    }

    .divider {
        height: 1px !important;
    }

    .premium-section,
    .ai-points-section {
        padding: 10px;
    }

    .premium-header h3,
    .ai-points-section h3 {
        font-size: 18px;
    }

    .feature-item {
        font-size: 13px;
    }

    .points-packages {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 20px 10px;
    }

    .package-card {
        min-width: 70px;
    }

    .package-point {
        height: 100px;
        padding: 12px 8px;
    }

    .package-point .points-package-number {
        font-size: 24px;
        transform: translateY(5px);
    }

    .price-value {
        font-size: 20px;
    }

    .star-icon {
        width: 16px;
        height: 16px;
        font-size: 14px;
    }

    .payment-btn {
        font-size: 16px;
        padding: 12px 16px;
        margin-bottom: 0px;
    }

    .price-container {
        gap: 4px;
    }

    .price-value .price-sale {
        font-size: 20px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {

    .character-section {
        height: 55px;
    }

    .character-body {
        top: -110px;
        left: 50%;
        transform: translateX(-70%);
    }

    .character-head {
        animation-duration: 1.5s;
        width: 230px;
    }

    .character-cloud {
        width: 200px;
        top: 20px;
        left: 50%;
    }

    .out-of-points-modal::before {
        width: 100%;
        background-size: contain;
    }

    @keyframes gentleShake {

        0%,
        100% {
            transform: translateX(0) rotate(0deg);
        }

        25% {
            transform: translateX(-1px) rotate(-0.5deg);
        }

        50% {
            transform: translateX(0) rotate(0deg);
        }

        75% {
            transform: translateX(1px) rotate(0.5deg);
        }
    }

    .referral-section {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .intro-text {
        font-size: 14px;
        padding: 0 10px;
    }

    .referral-desc {
        font-size: 14px;
    }

    .upgrade-modal .price-info {
        font-size: 14px;
    }

    .price-amount {
        font-size: 20px;
    }
}