:root {
    /* Colores principales */
    --color-primary: #0cd664;
    --color-primary-hover: #0bbd59;
    --color-primary-transparent: rgba(12, 214, 100, 0.05);
    --color-primary-glow: rgba(12, 214, 100, 0.08);
    /* Colores de fondo */
    --color-bg-main: #1A1A1A;
    --color-bg-card: #222222;
    --color-bg-nav: #222222;
    --color-bg-nav-hover: #1e1e1e;
    --color-bg-overlay: rgba(0, 0, 0, 0.5);
    /* Colores de texto */
    --color-text-primary: #ffffff;
    --color-text-secondary: #B8B9BD;
    --color-text-dark: #000000;
    /* Colores de bordes */
    --color-border: rgba(155, 155, 155, 0.1);
    /* Dimensiones */
    --footer-height: 60px;
    --color-white: #ffffff;
}

#accountProfileModal {
    background: #11111126; /* Transparencia para el fondo del modal */
    backdrop-filter: blur(10px);
    border-radius: 10px; /* Opcional: bordes redondeados */
}

    /* Modal Styles */
    #accountProfileModal .modal-dialog {
        max-width: 500px;
        margin: 1.75rem auto;
    }

    #accountProfileModal .modal-content {
        background: transparent;
        border: none;
    }

.profile-container {
    background-color: var(--color-bg-main);
    background-image: radial-gradient(800px circle at -40% -35%, rgb(12 214 100 / 77%) 0%, #04040459 50%);
    color: var(--color-text-primary);
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    max-height: 800px;
}

    /* Swiper Styles */
    .profile-container .profileSwiper {
        width: 100%;
    }

    .profile-container .swiper-wrapper {
        /* min-height: 100%; */
    }

    .profile-container .swiper-slide {
        /* padding: 5px 17px; */
        display: flex;
        flex-direction: column;
        background-color: transparent;
        opacity: 1;
        transition: opacity 0.3s ease;
        will-change: transform, opacity;
        padding-bottom: calc(var(--footer-height) + 6px);
    }

    .profile-container .profileSwiper.transitioning .swiper-slide {
        transition: transform 0.25s ease-out, opacity 0.25s ease-out;
    }

    /* Profile Header */
    .profile-container .profile-header {
        margin-top: 15px;
        margin-bottom: 0.8rem;
        text-align: right;
        padding: 0px 15px 0 15px;
    }

    .profile-container .greeting {
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    .profile-container .hello {
        color: var(--color-primary);
        font-size: 18px;
        font-weight: 500;
    }

    .profile-container .name {
        font-size: 18px;
        font-weight: 500;
        margin-left: 2px;
        text-transform: capitalize;
    }

    .profile-container .greeting i {
        color: var(--color-primary);
        font-size: 25px;
        margin-left: 4px;
        stroke-width: 1;
        position: relative;
    }

    /* Balance Details */
    .profile-container .balance-details {
        background-color: var(--color-bg-card);
        border-radius: 12px;
        padding: 16px;
        margin: 1rem;
    }

    /* Balance Section */
    .profile-container .balance-section {
        text-align: center;
        margin-bottom: 12px;
    }

        .profile-container .balance-section h2 {
            font-size: 18px;
            font-weight: normal;
            color: var(--color-text-secondary);
            margin-bottom: 4px;
        }

    .profile-container .total-balance {
        font-size: 32px;
        font-weight: bold;
        color: var(--color-primary);
        letter-spacing: -0.5px;
        line-height: 35px;
    }

        .profile-container .total-balance .real-amount {
            font-size: inherit;
            font-weight: inherit;
            color: inherit;
            letter-spacing: inherit;
        }

            .profile-container .total-balance .real-amount .decimal-part {
                color: #686868;
            }

    /* Balance Items */
    .profile-container .balance-items {
        margin-bottom: 14px;
    }

    .profile-container .detail-item {
        display: flex;
        justify-content: space-between;
        padding: 4px 0;
    }

        .profile-container .detail-item .label {
            color: var(--color-text-secondary);
            font-size: 16px;
            line-height: 19px;
        }

        .profile-container .detail-item .value {
            font-weight: bold;
            font-size: 16px;
            line-height: 19px;
            min-width: 90px;
            text-align: right;
            color: var(--color-text-secondary);
        }

            .profile-container .detail-item .value .decimal-part {
                color: #686868;
            }

    /* Action Buttons */
    .profile-container .action-buttons {
        display: flex;
        gap: 16px;
        margin-top: 14px;
    }

    .profile-container .btn {
        flex: 1;
        height: 48px;
        border-radius: 8px;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-size: 16px;
        font-weight: 500;
        transition: all 0.2s ease;
    }

        .profile-container .btn i {
            stroke-width: 2;
        }

    .profile-container .withdraw {
        background-color: var(--color-bg-card);
        color: var(--color-text-secondary);
        border: 1px solid var(--color-text-secondary);
        /* border-radius: 100px; */
        box-shadow: 0 0 0 1px rgba(12, 214, 100, 0.05);
        transition: all 0.2s ease;
        text-transform: capitalize;
        font-weight: bold;
        font-size: 15px;
        line-height: 21px;
    }

        .profile-container .withdraw i {
            color: var(--color-text-secondary);
            font-size: 1.7rem;
            transition: color 0.2s ease;
        }

        .profile-container .withdraw:hover {
            border-color: var(--color-primary);
            box-shadow: 0 0 0 1px var(--color-primary);
        }

            .profile-container .withdraw:hover i,
            .profile-container .withdraw:hover {
                color: var(--color-primary);
            }

        .profile-container .withdraw:active {
            background-color: var(--color-primary);
            color: var(--color-text-primary);
            border: 1px solid var(--color-white) !important;
        }

    .profile-container .deposit:active {
        background-color: var(--color-primary);
        color: var(--color-text-primary);
        border: 1px solid var(--color-white);
    }


    .profile-container .withdraw:active i {
        color: var(--color-text-primary);
    }

    .profile-container .deposit {
        background-color: var(--color-primary);
        color: var(--color-text-primary);
        box-shadow: 0 0 0 1px rgba(12, 214, 100, 0.05);
        text-transform: capitalize;
        font-weight: bold;
        font-size: 15px;
        transition: none;
        border: 1px solid var(--color-bg-card);
        line-height: 22px;
    }

        .profile-container .deposit i, .profile-container .deposit:active i {
            color: var(--color-primary);
            /* font-size: 20px; */
            color: var(--color-white);
            /* border-radius: 0.52rem; */
            /* padding: 0.35rem; */
            /* font-size: 0.8rem; */
            /* font-weight: bold; */
        }

        .profile-container .deposit:hover {
            background-color: var(--color-primary-hover);
            color: var(--color-text-dark);
        }

            .profile-container .deposit:hover i {
                color: var(--color-text-dark);
            }

    /* Balance Info */
    .profile-container .balance-info {
        text-align: center;
        margin: 0rem 0;
        color: var(--color-text-secondary);
    }

        .profile-container .balance-info a {
            color: var(--color-text-secondary);
            text-decoration: none;
            margin-left: 4px;
            opacity: 0.8;
            font-size: 16px;
            text-decoration: underline;
            font-style: italic;
            line-height: 20px;
        }

        .profile-container .balance-info i {
            font-size: 18px;
            stroke-width: 1.5;
        }

    /* Navigation Buttons */
    .profile-container .nav-buttons {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        margin: 20px 0;
        padding: 0 17px;
    }

    .profile-container .nav-btn {
        flex: 1;
        border: 1px solid var(--color-text-secondary);
        border-radius: 20px;
        padding: 20px 10px;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        text-align: center;
        transition: all 0.2s ease;
        min-width: 105px;
        background-color: var(--color-bg-card);
        color: var(--color-text-secondary);
    }

        .profile-container .nav-btn:hover {
            background-color: var(--color-bg-nav-hover);
            border-color: var(--color-primary);
            color: var(--color-primary);
        }

        .profile-container .nav-btn:active {
            background-color: var(--color-primary);
            border-color: var(--color-primary);
            color: var(--color-text-primary);
        }

        .profile-container .nav-btn i {
            font-size: 35px;
            stroke-width: 1;
        }

        .profile-container .nav-btn span {
            font-size: 14px;
            font-weight: 500;
            line-height: 14px;
            margin-top: -4px;
        }

    /* Footer */
    .profile-container .footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 20px;
        border-top: 1px solid var(--color-border);
        /* background-color: var(--color-bg-main); */
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--footer-height);
        z-index: 3;
    }

    .profile-container .session-time {
        color: var(--color-text-secondary);
        font-size: 12px !important;
        opacity: 0.8;
        display: flex;
        gap: 0.5rem;
    }

        .profile-container .session-time .time {
            margin-left: 6px;
            font-size: 15px;
            margin-right: 8px;
        }

.session-time .actualizarValor {
    color: var(--color-text-secondary) !important;
    font-size: 12px !important;
}

.profile-container .logout-btn {
    background: none;
    border: none;
    color: var(--color-text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    opacity: 0.8;
}

    .profile-container .logout-btn i {
        font-size: 20px;
        stroke-width: 1.5;
    }

    .profile-container .logout-btn:hover {
        opacity: 1;
    }

/* Vista de Perfil y Balance Detail */
.profile-container .profile-view-header,
.profile-container .balance-detail-view .profile-view-header {
    display: flex;
    flex-direction: column;
    padding: 15px 17px 0px 17px;
}

.profile-container .back-btn {
    background: none;
    border: none;
    color: var(--color-text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    padding: 0;
    margin-bottom: 12px;
}

    .profile-container .back-btn:focus {
        outline: none;
    }

    .profile-container .back-btn i {
        font-size: 24px;
    }

.profile-container .profile-view-header h1 {
    color: var(--color-primary);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 7px;
    padding-top: 0;
    margin-top: 7px;
}

/* Balance Detail Content */
.profile-container .balance-detail-content {
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding: 0 1.2rem;
    padding-top: 1rem;
}

.profile-container .balance-detail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .profile-container .balance-detail-item h2 {
        font-size: 16px;
        font-weight: 600;
        color: var(--color-text-primary);
        margin-bottom: 0px;
        line-height: 20px;
    }

    .profile-container .balance-detail-item p {
        font-size: 14px;
        line-height: 19px;
        color: var(--color-text-secondary);
        margin-bottom: 0rem;
    }

.profile-container .understood {
    background-color: var(--color-primary);
    color: var(--color-text-primary);
    margin-top: 16px;
    align-self: flex-end;
    padding: 8px 0px;
    border-radius: 10px;
    min-width: 140px;
    text-transform: capitalize;
    font-weight: 600;
    margin: 1rem;
}

    .profile-container .understood:hover {
        background-color: var(--color-primary-hover);
    }

/* Profile Menu */
.profile-container .profile-menu {
    display: flex;
    flex-direction: column;
    /* margin-top: 20px; */
}

.profile-container .menu-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background-color: transparent;
    text-decoration: none;
    color: var(--color-text-secondary);
    transition: color 0.2s ease;
    border-bottom: 1px solid var(--color-border);
}

    .profile-container .menu-item:hover, .profile-container .menu-item:hover i {
        color: var(--color-primary) !important;
    }

        .profile-container .menu-item:hover i {
            color: var(--color-primary);
        }

    .profile-container .menu-item i:first-child {
        font-size: 24px;
        margin-right: 16px;
        /* color: var(--color-text-secondary); */
        transition: color 0.2s ease;
    }

    .profile-container .menu-item span {
        flex: 1;
        font-size: 16px;
    }

    .profile-container .menu-item i:last-child {
        font-size: 20px;
        color: var(--color-text-secondary);
    }

    .profile-container .menu-item:active,
    .profile-container .menu-item:active i {
        background: var(--color-primary-hover);
        color: white !important;
    }

/* Vista de Historial */
.profile-container .history-view {
    display: flex;
    flex-direction: column;
}

.profile-container .history-menu {
    display: flex;
    flex-direction: column;
    /* margin-top: 20px; */
}

.profile-modal {
    position: relative;
    width: 100%;
    font-family: 'Inter', sans-serif !important;
}

    /* Asegurarse que todos los elementos dentro de profile-modal hereden la fuente */
    .profile-modal * {
        font-family: inherit;
    }

/* Loader Styles */
.profile-container .profile-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 26, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: inherit;
}

.profile-loader.active {
    display: flex;
}

.profile-loader .spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--color-text-secondary);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Close Button */
.profile-modal .close-button {
    position: absolute;
    top: -27px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    z-index: 10;
    padding: 8px;
    transition: opacity 0.2s ease;
    font-size: 0.5rem;
}

    .profile-modal .close-button span {
        padding: 3px !important;
        font-size: 20px;
    }

    .profile-modal .close-button .ti-x {
        background: white;
        color: black;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        font-weight: bold;
        padding: 3px;
    }

.profile-container .close-modal span {
    font-size: 16px;
    font-weight: 500;
}

.profile-container .close-modal i {
    font-size: 20px;
    stroke-width: 2;
}

.profile-container .close-modal:hover {
    opacity: 0.8;
}

i.ti.ti-user-square::after {
    content: '.';
    position: absolute;
    left: -4px;
    top: -51px;
    font-size: 65px;
    text-shadow: 0px 0px 3px #d3d3d3;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    #accountProfileModal {
        padding: 0 !important;
    }

        #accountProfileModal .modal-dialog {
            margin: 0;
            max-width: 100%;
            height: 100%;
        }

    .profile-modal {
        /* margin-top: 5rem; */
        margin: 0;
        padding: 0;
        height: 100%;
        padding: 0px 0.5rem;
    }

    .profile-container {
        border-radius: 0.8rem;
        min-height: auto;
    }

        .profile-container .hello {
            font-size: 16px;
            line-height: 28px;
        }

        .profile-container .name {
            font-size: 16px;
            line-height: 28px;
        }

        .profile-container .nav-buttons {
            gap: 0.3rem;
            padding: 0;
            margin: 1.6rem 0px;
            padding: 0 1rem;
        }

    .deposit-button .deposit-button__text {
        display: none;
    }

    .deposit-button {
        padding: 9px 10px;
        margin-left: 0.5rem;
    }

    .profile-container .balance-detail-content {
        max-height: 60vh;
        overflow: auto;
    }

    .profile-container .nav-btn {
        min-width: auto !important;
        padding: 10px 15px;
        max-width: 106px;
        min-height: 106px;
        padding-top: 1.5rem;
        border: none;
    }

    .profile-container .balance-info {
        margin: 0;
    }

    .profile-container .swiper-slide {
        padding-bottom: 0px;
    }

    .profile-modal .close-button {
        margin: 0;
        top: -2.9rem;
        font-size: 12px !important;
    }

        .profile-modal .close-button span {
            font-size: 16px !important;
        }

        .profile-modal .close-button .ti-x {
            font-size: 20px;
            padding: 2px;
        }
}

@media (max-height: 700px) {
    .profile-container .swiper-slide {
        /* padding-bottom: 4rem; */
        /* overflow: auto; */
        /* max-height: 28rem; */
    }

    .profile-container .balance-details {
        margin-bottom: 1.5rem;
    }

    .profile-container .total-balance {
        font-size: 1.8rem;
    }

    .profile-container .detail-item .label, .profile-container .detail-item .value {
        font-size: 13px;
    }

    .profile-container .profile-header {
        margin: 12px 0px;
    }

    .profile-container .btn {
        height: 2.5rem;
        font-size: 0.8rem;
    }

    .profile-modal .close-button {
        top: -2.6rem;
    }

        .profile-modal .close-button span {
            font-size: 1rem !important;
        }
}
