/* Gift Message Styling - GIFT SYSTEM */
.gift_message_box {
    background: rgba(98, 53, 53, 0.5) !important;
    border-left: 4px solid #FF6B6B !important;
    border-radius: 8px !important;
    padding: 12px 15px !important;
    margin: 5px 0 !important;
    display: inline-block !important;
    font-weight: 500 !important;
    color: #fff !important;
    max-width: 100%;
    word-wrap: break-word;
}

.gift_message_box .sys_sender {
    color: #D32F2F !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

.gift_message_box .sys_receiver {
    color: #1976D2 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

.gift_message_box .gift_chat_img {
    animation: gift_pulse 1.5s infinite;
    display: inline-block !important;
    margin: 0 5px !important;
}

@keyframes gift_pulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.15);
        filter: brightness(1.2);
    }
}

/* Cover Color Palette */
.cover_menu {
    position: relative;
}
.cover_color_btn {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.cover_palette_header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 2px 4px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 8px;
}
.cover_palette_title {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.5px;
    flex: 1;
}
.cover_palette_close {
    width: 22px;
    height: 22px;
    min-width: 22px;
    line-height: 22px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}
.cover_palette_close:hover {
    background: rgba(255,107,107,0.4);
    color: #fff;
}
.cover_palette {
    position: absolute;
    top: 42px;
    right: 0;
    width: 320px;
    max-height: 420px;
    overflow-y: auto;
    background: rgba(30, 30, 40, 0.97);
    border-radius: 12px;
    padding: 10px;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
}
.cover_palette::-webkit-scrollbar {
    width: 5px;
}
.cover_palette::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}
.cover_palette::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}
.cover_palette_section {
    margin-bottom: 8px;
}
.cover_palette_label {
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    padding-left: 2px;
    font-weight: 600;
}
.cover_palette_grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}
.cover_gradient_grid {
    grid-template-columns: repeat(4, 1fr);
}
.cover_color_dot {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}
.cover_color_dot:hover {
    transform: scale(1.2);
    border-color: rgba(255,255,255,0.6);
    box-shadow: 0 0 8px rgba(255,255,255,0.3);
    z-index: 2;
}
.cover_color_dot:active {
    transform: scale(0.95);
}
.cover_gradient {
    border-radius: 6px;
    aspect-ratio: auto;
    height: 28px;
}
.cover_palette_custom {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.cover_custom_color_wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cover_custom_input {
    width: 40px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: none;
    padding: 0;
}
.cover_custom_input::-webkit-color-swatch-wrapper {
    padding: 0;
}
.cover_custom_input::-webkit-color-swatch {
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 6px;
}
.cover_custom_btn {
    flex: 1;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.cover_custom_btn:hover {
    background: rgba(255,255,255,0.2);
}
.cover_palette_remove {
    margin-top: 8px;
    padding: 8px;
    text-align: center;
    font-size: 11px;
    color: #ff6b6b;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 10px;
}
.cover_palette_remove:hover {
    background: rgba(255,107,107,0.15);
}
@media screen and (max-width: 480px){
    .cover_item_wrap {
        overflow: visible;
        border-radius: 8px;
    }
    .cover_palette {
        position: fixed;
        top: 50%;
        left: 50%;
        bottom: auto;
        right: auto;
        width: calc(100vw - 40px);
        max-width: 340px;
        max-height: 60vh;
        border-radius: 12px;
        z-index: 99999;
        transform: translate(-50%, -50%);
    }
    .cover_palette_grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 6px;
    }
    .cover_gradient_grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .cover_color_dot {
        min-height: 32px;
    }
}

/* ==========================================================================
   ADMIN PANEL SOLID CLEAN BACKGROUND (Theme wallpaper disabled in admin)
   ========================================================================== */
body.page_admin,
body.page_admin #page_full_content,
body.page_admin .page_wrapper_in,
body.page_admin #page_full_global {
    background-color: #0d1117 !important;
    background-image: none !important;
}

body.page_admin::before,
body.page_admin::after {
    display: none !important;
    content: none !important;
    background: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

body.page_admin .page_element,
body.page_admin .back_box,
body.page_admin .back_menu,
body.page_admin .back_panel,
body.page_admin .admin_panel {
    background-color: #161b26 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

body.page_admin .page_menu,
body.page_admin .back_pmenu {
    background-color: #0f131c !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.page_admin .bhead {
    background: #0f131c !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* ==========================================================================
   VIP REMAINING TIME BADGE (User Profiles)
   ========================================================================== */
.vip_time_badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(185, 138, 28, 0.38));
    border: 1px solid rgba(255, 215, 0, 0.45);
    color: #ffd700;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
    margin: 3px 0 6px 0;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.vip_time_badge .vip_crown_icon {
    color: #ffd700;
    font-size: 12px;
    filter: drop-shadow(0 0 4px #ffd700);
}

.vip_time_badge span {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.3px;
}