:root {
    --liquid-blue: #63a4ff;
    --liquid-green: #7afcff;
    --liquid-red: #ff5e62;
    --liquid-yellow: #ffe985;
    --liquid-glass-bg: rgba(255, 255, 255, 0.26);
    --liquid-glass-border: rgba(255, 255, 255, 0.35);
}
/* ==== Thanh cuộn cho toàn bộ trang ==== */

/* WebKit (Chrome, Edge, Safari) */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 3px;                     /* độ dày thanh cuộn dọc */
  height: 3px;                    /* độ dày thanh cuộn ngang (nếu có) */
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: #f1f1f1;             /* màu rãnh */
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: #bbb;                /* màu tay nắm */
  border-radius: 3px;              /* bo tròn cho đẹp */
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: #999;                /* đậm hơn khi rê chuột */
}

/* Firefox */
html,
body {
  scrollbar-width: thin;           /* thin = mảnh, auto = mặc định */
  scrollbar-color: #bbb #f1f1f1;   /* thumb màu #bbb, track màu #f1f1f1 */
}

body {
    margin: 0;
    padding: 0;
    background: #f5f7fa;
}


.black-garadient {
    bottom: 0;
    height: 50vh;
    width: 100%;
    position: absolute;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    z-index: 9;
}
                                .thumbnail-bia{
                                    position: absolute;
                                    bottom: 10px !important;
                                    left: 10px;
                                }
.cover-info {
    position: absolute;
    bottom: 14%;
    left: 4%;
    color: #fff;
    transform: scale(1.2);
    z-index: 10;
    text-shadow: 0 1px 6px #0008;
}

.cover-info h5 {
    font-weight: bold;
    font-size: 1.2rem;
    font-style: italic;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.cover-info small {
    font-size: 1rem;
}

.cover-info img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    border: solid 2px white;
}

.cover-info .info-human {
    display: flex;
    align-items: start;
}

.social-icons a {
    color: #fff;
    font-size: 1.25rem;
    margin-right: 8px;
    transition: color 0.2s;
    filter: drop-shadow(0 1px 4px #0004);
}

.social-icons a:hover {
    color: var(--liquid-yellow);
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--liquid-yellow);
    color: #222;
    padding: 6px 15px;
    border-radius: 18px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 2px 8px #0002;
    transition: background 0.15s;
}

.back-btn:hover {
    background: #ffe985;
    color: #111;
}

.glass-info-bar {
    
    backdrop-filter: blur(10px) saturate(120%);
    position: sticky;
    top: 0;
    z-index: 30;
}

.glass-info-wrap {
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 4px;
    padding-bottom: 4px;
}

.glass-chip {
    background: rgba(255, 255, 255, 0.82);
    border-radius: 21px;
    box-shadow: 0 2px 8px #00e9ff1a;
    padding: 5px 13px 5px 9px;
    display: flex;
    align-items: center;
    min-width: 80px;
    font-weight: 500;
    font-size: 0.98rem;
    cursor: pointer;
}

.glass-chip .info-label {
    margin-left: 2px;
    margin-right: 4px;
    color: #222a;
    font-size: 0.96em;
}

.glass-chip .info-value {
    font-weight: bold;
    color: #333;
    min-width: 18px;
    display: inline-block;
    text-align: right;
}

.glass-btn {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(0, 255, 255, 0.11);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 1em;
    margin-right: 4px;
    box-shadow: 0 1px 4px #00e9ff16;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .16s, box-shadow .16s;
    padding: 0;
}

.glass-btn:active,
.glass-btn:focus {
    background: #b0f4ff44;
    box-shadow: 0 0 8px #63a4ff55;
}

.glass-btn:hover {
    background: #e1fbff;
    box-shadow: 0 1px 7px #63a4ff22;
}

/* =============== Masonry.js Layout =============== */
.gallery-masonry {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.grid-sizer,
.grid-item {
    width: 50%;
}

@media (min-width: 992px) {
    .gallery-masonry {
        max-width: 1920px;
    }

    .grid-sizer,
    .grid-item {
        width: 33%;
    }
    
}

@media (max-width: 991px) {
    .pad-0 {
        padding: 0 !important
    }
}

.grid-item {
    float: left;
    padding: 0 2.5px 5px 2.5px;
    /* 5px gap giữa các ảnh (horiz), 5px gap dưới */
    box-sizing: border-box;
}

.photo-card {
    width: 100%;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 16px 0 #0001;
    transition: box-shadow 0.18s;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 80px;
    /* SỬA: Để dropdown không bị cắt */
}

.photo-card:hover {
    box-shadow: 0 4px 24px 0 #00f2ff30;
}

.photo-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;

}

.photo-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 13px;
}

.pa-btn {
    width: 30px;
    height: 30px;
    min-width: 25px;
    min-height: 25px;
    border: none;
    background: var(--liquid-glass-bg);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    border-radius: 50%;
    /*box-shadow: 0 3px 13px 1px #8fd6ff66, 0 2px 6px #0001;*/
    font-size: 1.27rem;
    position: relative;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.18s, background 0.18s, color 0.18s, transform 0.1s, border 0.2s;
    cursor: pointer;
    border: 1.5px solid var(--liquid-glass-border);
    overflow: visible;
    opacity: 0.7;
    color: #000;
}
.pa-btn .size-label {
    display: block;
    position: absolute;
    left: 50%;
    bottom: -1.5em;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.92);
    color: #1976d2;
    font-size: 0.88em;
    font-weight: 600;
    border-radius: 5px;
    box-shadow: 0 1px 3px #0002;
    padding: 2px 8px;
    white-space: nowrap;
    z-index: 2;
    pointer-events: none;
    min-width: 38px;
    text-align: center;
    border: 1px solid #e0e6ef;
}

.pa-btn.active-select {
    color: #fff;
    background: linear-gradient(135deg, #4fba69 60%, #02ff06 100%);
    box-shadow: 0 0 16px 0 #00f918a0, 0 2px 8px #0001;
    border: 2.2px solid #0cbd00c0;
    opacity: 1;
}

.pa-btn.active-favorite {
    color: #fff;
    background: linear-gradient(135deg, var(--liquid-red) 60%, #ffb8b8 100%);
    box-shadow: 0 0 16px 0 #ff5e6290, 0 2px 8px #0002;
    border: 2.2px solid #ff5e6290;
    opacity: 1;
}

.pa-btn.active-print {
    color: #fff;
    background: linear-gradient(135deg, var(--liquid-blue) 60%, #7afcff 100%);
    box-shadow: 0 0 16px 0 #63a4ff90, 0 2px 8px #0001;
    border: 2.2px solid #63a4ff90;
    opacity: 1;
}

.pa-btn.active-note {
    color: #fff;
    background: linear-gradient(135deg, #fff6a7 60%, #ffe985 100%);
    box-shadow: 0 0 16px 0 #ffe98590, 0 2px 8px #0001;
    border: 2.2px solid #ffe98590;
    color: #a66c00;
    opacity: 1;
}

.pa-btn:active {
    transform: scale(0.95);
    filter: brightness(0.98);
    opacity: 1;
}

.pa-btn:focus {
    outline: 2px solid #71c8ff;
}

.dropdown-menu {
    min-width: 100px;
    padding: 0.3rem 0;
    border-radius: 14px;
    box-shadow: 0 2px 16px #63a4ff15;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    z-index: 999 !important;
}


.dropdown-menu.show {
    z-index: 999 !important;
}

.dropdown-menu .dropdown-item {
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 1rem;
}

.dropdown-menu .dropdown-item:hover {
    background: var(--liquid-blue);
    color: #fff;
}

.modal-cute .modal-content {
    border-radius: 18px;
    box-shadow: 0 2px 24px #00f2ff1a;
    border: 2px solid var(--liquid-yellow);
    background: rgba(255, 255, 255, 0.89);
    backdrop-filter: blur(14px);
    animation: popIn 0.21s;
}

@keyframes popIn {
    0% {
        transform: scale(0.88);
    }

    100% {
        transform: scale(1);
    }
}

.modal-cute .modal-header {
    border-bottom: 1px solid #ffe082;
    background: #fffde7;
    border-radius: 18px 18px 0 0;
}

.modal-cute .modal-footer {
    border-top: 1px solid #ffe082;
    border-radius: 0 0 18px 18px;
}

.modal-cute .btn-save {
    background: var(--liquid-yellow);
    color: #a66c00;
    border-radius: 14px;
    font-weight: bold;
    border: none;
}

.modal-cute .btn-cancel {
    background: #e0e0e0;
    border-radius: 14px;
    border: none;
}

.flex-center {
    display: flex;
    justify-content: center;
}

.attention-circle {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: blink-border 1s infinite;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: 0 0 10px #7afcff44;
}

@keyframes blink-arrow {

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

    50% {
        opacity: 0.5;
        transform: translateY(5px);
    }
}

.xem-anh {
    position: absolute;
    bottom: 15%;
    z-index: 9;
    width: 100%;
    height: 30px;
}
.info-download{
    font-size:0.9rem;
    display: flex;
    justify-content: flex-start;
    gap:5px;
    flex-wrap: nowrap;
}
/* Responsive info-bar: only icon+number on mobile */
@media (max-width: 600px) {
    .info-download{
        font-size:0.9rem;
        display: flex;
        justify-content: flex-start;
        gap:5px;
        flex-wrap: wrap;
    }
    .glass-info-bar .glass-chip .info-label {
        display: none !important;
    }

    .glass-info-bar .glass-chip {
        gap: 2px;
        padding: 6px 7px;
        min-width: unset;
        font-size: 0.9em;
    }

    .glass-info-bar .glass-chip .info-value {
        margin-left: 0;
    }

    .photo-actions {
        top: 5px;
        right: 5px;
        gap: 7px;
    }

    .pa-btn {
        width: 23px;
        height: 23px;
        min-width: 20px;
        min-height: 20px;
        font-size: 1.01rem;
        opacity: 0.5;
    }

    .pa-btn .size-label {
        font-size: 0.72rem;
        padding: 1.5px 4px;
        top: 22px;
        left: 50%;
        height:20px;
    }

    .cover-info {
        left: 10%;
        bottom: 25%;
        transform: scale(1);
    }

    .cover-info h5 {
        font-size: 1.07rem;
    }

    .black-garadient {
        height: 58vh;
    }
}
 /* Liquid glass style for modal background */
 .modal-photo-viewer .modal-content {
    background: rgba(30, 30, 40, 0.65);
    backdrop-filter: blur(18px) saturate(200%) brightness(1.1);
    -webkit-backdrop-filter: blur(18px) saturate(200%) brightness(1.1);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border-radius: 24px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    min-height: 100vh;
}

.modal-photo-viewer .modal-dialog {
    max-width: 100vw !important;
    margin: 0;
}

.modal-photo-viewer .modal-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#photoZoomContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
    background: transparent;
    user-select: none;
}

#photoZoomImg.loading {
    filter: blur(16px) grayscale(60%);
    transition: filter 0.4s cubic-bezier(.22, .68, .67, 1.55);
}

#photoLoadingOverlay {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.15);
    z-index: 3;
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0d6efd;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#photoZoomImg {
    max-width: 100vw;
    max-height: 100vh;
    user-select: none;
    touch-action: none;
    
    transition: transform .25s cubic-bezier(.22, .68, .67, 1.55);
    border-radius: 18px;
    background: rgba(50, 50, 60, 0.13);
    box-shadow: 0 4px 14px 0 rgba(31, 38, 135, 0.17);
}

/* .photo-viewer-actions .pa-btn {
    margin: 0 8px;
    font-size: 26px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.17);
    color: #fff;
    transition: background 0.2s, color 0.2s;
} */

/* .photo-viewer-actions .pa-btn.active-select,
.photo-viewer-actions .pa-btn.active-favorite,
.photo-viewer-actions .pa-btn.active-print,
.photo-viewer-actions .pa-btn.active-note {
    background: #fff3;
    color: #00e6b8;
} */
.glass-chip.active {
    background: #1e90ff !important; /* Nền xanh dương nổi bật */
    color: #fff !important;         /* Chữ trắng */
    border-radius: 21px;
    box-shadow: 0 2px 8px rgba(30,144,255,0.15);
    transition: background 0.2s;
}
.glass-chip.active .glass-btn,
.glass-chip.active .info-label,
.glass-chip.active .info-value,
.glass-chip.active {
    color: #fff !important;
}
.photo-viewer-note {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    min-height: 40px;
    font-size: 1.15rem;
    z-index: 4;
    margin-top: 8px;
    padding: 8px 16px;
    max-width: 96vw;
    word-break: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}

.photo-nav-btn {
    outline: none;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity .2s;
    background: rgba(30, 30, 50, 0.5);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    color: #fff;
}

.photo-nav-btn:hover {
    opacity: 1;
}

.modal-photo-viewer {
    z-index: 1054;
}

#noteModal {
    z-index: 1060;
}

@media (max-width: 767px) {
    #photoZoomContainer {
        height: 100vh;
    }

    #photoZoomImg {
        max-height: 100vh;
    }
    .liquid-bar{
        flex-wrap: wrap;
        gap: 10px !important;
    }
    #progressBox {
        position: fixed;
        bottom: 20px;          /* cách dưới màn hình 20px */
        left: 50%;             /* căn giữa theo ngang */
        transform: translateX(-50%); /* dịch sang trái 50% của chính nó để thực sự căn giữa */
        width: 330px;
        background: rgba(0,0,0,0.75);
        color: #fff;
        border-radius: 12px;
        padding: 12px;
        font-family: sans-serif;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        display: none;
        z-index: 99999999;
    }
    .liquid-glass-modal-content {
        background: rgba(255,255,255,0.96) !important;
        border-radius: 30px;
        margin: 60px auto;
        padding: 36px 30px;
        width: 90% !important;
        box-shadow: 0 8px 32px 0 rgba(31,38,135,0.12);
        backdrop-filter: blur(10px) saturate(160%);
        -webkit-backdrop-filter: blur(10px) saturate(160%);
        border: 1.5px solid rgba(200, 220, 255, 0.10);
        color: #222;
        position: relative;
        animation: popIn 0.6s cubic-bezier(.75,-0.1,.2,1.2);
        height: 100vh;
      }
    #gr_album_add{
        width: 100% !important;
    }
    .input-container {
        position: relative;
        display: inline-block; /* hoặc block tùy ý */
        border: #898989 2px solid;
        border-radius: 10px;
        background-color: #f9f9f9;
        width: 100% !important;
        margin-bottom: 10px;
    }
    .photo-card {
        width: 100%;
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 2px 16px 0 #0001;
        transition: box-shadow 0.18s;
        position: relative;
        display: flex;
        flex-direction: column;
        min-height: 100px;
        /* SỬA: Để dropdown không bị cắt */
    }
}
.liquid-bar {
    display: flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 14px;
    backdrop-filter: blur(9px);
    margin: 14px auto 18px auto;
    max-width: 220px;
    font-size: 0.98em;
    position: relative;
    z-index: 100;
    justify-content: center;
    gap: 40px;
}
.liquid-bar .liquid-select {
    appearance: none;
    border: 1px solid #c8e6ff;
    border-radius: 11px;
    padding: 5px 32px 5px 14px;
    font-size: 0.98em;
    color: #1669b2;
    font-weight: 500;
    outline: none;
    min-width: 110px;
    max-width: 278px;
    transition: border 0.18s;
    box-shadow: 0 1px 4px rgba(30,144,255,0.05);
    cursor: pointer;
    height: 32px;
    border: 1px solid #1e90ff;
    background: linear-gradient(135deg,rgba(255,255,255,0.93) 80%,rgba(255, 255, 255, 0.641));
}
.liquid-btn {
    appearance: none;
    border: 1px solid #1e90ff;
    border-radius: 11px;
    padding: 5px 18px 5px 14px;
    font-size: 0.98em;
    color: #1669b2;
    font-weight: 500;
    outline: none;
    transition: border 0.18s, box-shadow 0.18s, background 0.18s, color 0.18s;
    box-shadow: 0 1px 4px rgba(30,144,255,0.05);
    cursor: pointer;
    height: 32px;
    width: auto;
    background: linear-gradient(rgba(255,255,255,0.80) 80%,rgba(255, 255, 255, 0.811));
    backdrop-filter: blur(2.5px);
    display: inline-block;
    text-align: left;
    position: relative;
    user-select: none;
    white-space: nowrap;  /* QUAN TRỌNG: để chữ không xuống dòng */
}
.liquid-btn:hover,
.liquid-btn:focus {
    border: 1px solid #1e90ff;
    background: linear-gradient(135deg,rgba(255,255,255,0.93) 80%,rgba(30,144,255,0.15));
    color: #125b9c;
    box-shadow: 0 2px 8px rgba(30,144,255,0.10);
}

.liquid-btn:active {
    filter: brightness(0.98);
    color: #0a355c;
}
.liquid-bar .liquid-select:focus {
    border: 1px solid #1e90ff;
    background: linear-gradient(135deg,rgba(255,255,255,0.93) 80%,rgba(30,144,255,0.15));
}
.liquid-bar .select-arrow {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateX(80%) translateY(-40%);
    font-size: 0.97em;
    color: #5fc3ff;
    pointer-events: none;
}
@media (max-width: 500px) {
    .liquid-bar {
        padding: 7px 2vw;
        width: 100vw;
        max-width: 98vw;
        border-radius: 11px;
    }
    .liquid-bar .liquid-select {
        min-width: 0;
        width: 100%;

    }
    .liquid-bar .select-arrow {
        position: absolute;
        right: 5px;
        top: 50%;
        transform: translateX(-580%) translateY(-40%);
        font-size: 0.97em;
        color: #5fc3ff;
        pointer-events: none;
    }
}

/* Modal liquid glass loading */
#loadingLiquidGlass {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: linear-gradient(135deg,rgba(255,255,255,0.15) 70%,rgba(30,144,255,0.13)), rgba(0,0,0,0.15);
    backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
}
#loadingLiquidGlass.loading-active {
    display: flex;
}
.liquid-loading-content {
    min-width: 158px;
    max-width: 90vw;
    padding: 22px 16px 14px 16px;
    border-radius: 16px;
    background: linear-gradient(rgb(255 255 255 / 84%) 80%, rgb(255 255 255));
    box-shadow: 0 6px 24px rgba(30, 144, 255, 0.10), 0 1.5px 5px rgb(0 0 0 / 0%);
    backdrop-filter: blur(10px);
    position: relative;
    text-align: center;
    animation: fadeInUp 0.5s cubic-bezier(.23,1.35,.32,1) both;
}

.liquid-loading-content .loader {
    margin: 0 auto 10px auto;
    border: 3px solid #e3f1ff;
    border-top: 3px solid #1e90ff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    animation: spin 1.1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg);}}
.liquid-loading-content .loading-text {
    color: #1565c0;
    font-weight: 600;
    font-size: 1em;
    letter-spacing: 0.01em;
}
.liquid-loading-content .liquid-modal-btns {
    display: flex;
    justify-content: center;
    gap: 14px;
}
.liquid-loading-content .liquid-modal-btn {
    display: inline-block;
    background: linear-gradient(90deg, #1e90ff 70%, #0099f5);
    color: #fff;
    font-size: 0.97em;
    font-weight: bold;
    border: none;
    border-radius: 9px;
    padding: 7px 17px;
    margin-top: 3px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(30, 144, 255, 0.10);
    transition: background 0.2s;
    text-decoration: none;
}
.liquid-loading-content .liquid-modal-btn:hover {
    background: linear-gradient(90deg,#1565c0 70%,#3ca3e8);
    color: #fff;
}
.liquid-loading-content .result-icon {
    font-size: 2.3em;
    margin-bottom: 10px;
}
.liquid-loading-content .result-success {
    color: #16c784;
}
.liquid-loading-content .result-error {
    color: #e74c3c;
}
.liquid-loading-content .result-message {
    color: #1565c0;
    margin: 8px 0 12px 0;
    font-size: 1.04em;
    font-weight: 500;
    text-align: center;
}
.glass-guide-popup {
    position: fixed;
    z-index: 1100;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(38, 47, 80, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.22s;
}
.glass-guide-close-btn {
    position: absolute;
    top: 10px; right: 13px;
    background: rgba(255,255,255,0.34);
    border: none;
    border-radius: 50%;
    width: 40px; height: 40px;
    box-shadow: 0 2px 12px rgba(80,80,80,0.13);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s;
    color: #333;
    z-index: 2;
}
.glass-guide-popup-content {
    background: rgba(255,255,255,0.19);
    box-shadow: 0 8px 32px 0 rgba(31,38,135,0.26);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 24px;
    border: 1.2px solid rgba(255,255,255,0.35);
    max-width: 600px;   /* tăng chiều ngang */
    width: 95vw;
    max-height: 80vh;   /* giảm chiều dài trên PC */
    padding: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.glass-guide-img-wrap {
    overflow-y: auto;
    margin-top: 0;
    padding: 48px 12px 18px 12px;
    max-height: 80vh;  /* giảm chiều dài trên PC */
    box-sizing: border-box;
    scrollbar-width: none; /* ẩn thanh scroll trên Firefox */
}
.glass-guide-img-wrap::-webkit-scrollbar {
    display: none;     /* ẩn thanh scroll trên Chrome/Safari */
}
.glass-guide-img-wrap img {
    max-width: 100%;
    display: block;
    border-radius: 5px; /* bo góc cho ảnh */
    margin: 0 auto;
}
@media (max-width: 600px) {
    .glass-guide-popup-content {
        max-width: 99vw;
        border-radius: 12px;
        max-height: 65vh; /* ngắn chiều dài hơn trên mobile */
        padding: 0;
    }
    .glass-guide-img-wrap {
        padding: 36px 2vw 14px 2vw;
        max-height: 60vh;
    }
}
.liquid-glass-path {
    font-size: 0.97em;
    color: #1e90ff;
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    padding: 2px 10px;
    margin-left: 8px;
    word-break: break-all;
    max-width: 180px;
    display: inline-block;
    vertical-align: middle;
    border: 1px solid #e3ecfa;
  }
  .liquid-glass-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(30,144,255,0.23);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
  }
  @keyframes spin { to { transform: rotate(360deg); } }
  .liquid-glass-log {
    background: rgba(245, 247, 251, 0.95);
    border-radius: 10px;
    padding: 12px;
    min-height: 38px;
    max-height: 140px;
    overflow-y: auto;
    font-size: 1rem;
    color: #1e3557;
    font-family: 'Fira Mono', monospace;
    border: 1px solid #e3ecfa;
  }
  .liquid-glass-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    align-items: center;
  }
  .liquid-glass-modal {
    display: none; 
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; width: 100vw; height: 100vh;
    overflow: auto;
    background: rgba(35, 39, 47, 0.45);
    backdrop-filter: blur(3px);
    animation: fadeInBg 0.5s;
  }
  @keyframes fadeInBg { from { opacity: 0; } to { opacity: 1; } }
  
  .liquid-glass-modal-content {
    background: rgba(255,255,255,0.96) !important;
    border-radius: 30px;
    margin: 60px auto;
    padding: 36px 30px;
    width: 50%;
    box-shadow: 0 8px 32px 0 rgba(31,38,135,0.12);
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    border: 1.5px solid rgba(200, 220, 255, 0.10);
    color: #222;
    position: relative;
    animation: popIn 0.6s cubic-bezier(.75,-0.1,.2,1.2);
    
  }
  @keyframes popIn { 0% {transform:scale(.92) translateY(60px); opacity:0;} 100% {transform:scale(1) translateY(0); opacity:1;} }
  
  .liquid-glass-modal-close {
    color: #2e3a59;
    font-size: 2rem;
    font-weight: 700;
    position: absolute;
    top: 22px;
    right: 30px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s;
  }
  .liquid-glass-modal-close:hover { opacity: 1; }
  
  .liquid-glass-btn,
  .liquid-glass-btn-main {
    background: linear-gradient(90deg, #1e90ff 70%, #0099f5 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 18px 0 #1e90ff40 !important;
    text-shadow: 0 2px 8px #fff9;
    letter-spacing: 0.03em;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 14px;
    padding: 10px 22px;
    margin: 0 3px;
    cursor: pointer;
    outline: none;
    transition: background 0.2s, color 0.2s, box-shadow 0.18s, transform 0.18s;
  }
  .liquid-glass-btn:hover,
  .liquid-glass-btn-main:hover {
    background: linear-gradient(90deg, #0099f5 70%, #1e90ff 100%) !important;
    color: #183e3b !important;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 20px 0 #0099f540 !important;
  }
  
  .liquid-glass-input, textarea.liquid-glass-input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1.5px solid #d7ebfa;
    background: rgba(255,255,255,0.98);
    color: #1e3557;
    font-size: 1rem;
    margin: 8px 0 0 0;
    resize: vertical;
    font-family: inherit;
    outline: none;
    box-shadow: 0 1px 4px 0 rgba(31,38,135,0.07);
    transition: border 0.14s;
  }
  .liquid-glass-input:focus, textarea.liquid-glass-input:focus {
    border: 1.5px solid #1e90ff;
  }
  #progressBox {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 330px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    border-radius: 12px;
    padding: 12px;
    font-family: sans-serif;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: none;
    z-index: 99999999;
  }
  #progressHeader {
    font-weight: bold;
    margin-bottom: 4px;
    transition: color 0.3s ease;
  }
  #progressBarContainer {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
  }
  #progressBar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg,#4facfe,#00f2fe);
    transition: width 0.3s ease;
  }
  #progressText {
    margin-top: 6px;
    font-size: 14px;
    min-height: 18px;
    transition: all 0.2s ease;
  }
  .input-container {
    position: relative;
    display: inline-block; /* hoặc block tùy ý */
    border: #898989 2px solid;
    border-radius: 10px;
    background-color: #f9f9f9;
    width: 38%;
}
.input-label {
    position: absolute;
    top: -10px;        /* Đẩy label lên cao hơn input */
    left: 12px;        /* Dịch sang phải để đẹp */
    background: #f9f9f9; /* Nền trắng để che đường viền */
    padding: 0 6px;    /* Khoảng đệm để label không dính sát chữ */
    font-size: 14px;
    color: #3498db;
    pointer-events: none; /* Không chặn click vào input */
}
/* Lưới các album */
.gr-album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
    max-height: 58vh;
    overflow-y: scroll;
    padding: 10px;
}.gr-count {
    color: #666;
    font-size: 0.9em;
    margin-left: 10px;
    display: flex;
    gap: 2px;

  }
.gr-thumbnail{
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #f1f3f4;
    cursor: pointer;
}
/* Card album */
.gr-album-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}
.gr-album-card .album-actions-g{
    padding: 20px;
}
.gr-album-card:hover {
    transform: translateY(-4px);
}

.gr-album-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.gr-album-title {
    font-size: 18px;
    margin: 12px;
    flex-grow: 1;
    cursor: pointer;

    display: -webkit-box;        /* Tạo container ảo theo chiều dọc */
    -webkit-box-orient: vertical;/* Đặt hướng box theo chiều dọc */
    -webkit-line-clamp: 2;       /* Giới hạn 2 dòng */
    overflow: hidden;            /* Ẩn phần thừa */
    text-overflow: ellipsis;     /* Hiển thị … nếu tràn */
}

/* Hàng nút nằm ngang */
.gr-album-actions {
    display: flex;
    justify-content: space-around;
    padding: 10px 0 15px;
    border-top: 1px solid #ddd;
}

.gr-album-actions button {
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    background: #3498db;
    color: #fff;
    font-size: 14px;
    transition: background 0.2s;
}
.gr-album-actions button:hover {
    background: #2980b9;
}

/* Nút thêm album */
#gr-addAlbumBtn {
    padding: 10px 16px;
    background: #2ecc71;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}
#gr-addAlbumBtn:hover {
    background: #27ae60;
}
.gr-album-grid.blur-active {
    filter: blur(4px);
    pointer-events: none; /* không cho click khi đang sửa */
    transition: filter 0.3s ease;
}

  .gr-album-item {
    display:flex; align-items:center; gap:10px; padding:8px; cursor:pointer;
    border-bottom:1px solid #eee;
  }
  .gr-album-item img { width:60px; height:60px; object-fit:cover; border-radius:4px; }
  .gr-album-item.selected { background:#e6f9e6; }
  /* Nền mờ phủ toàn màn hình */
.gr-modal {
    position: fixed;
    inset: 0; /* top:0; right:0; bottom:0; left:0 */
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99000;
  }
  
  /* Khung nội dung modal nằm giữa */
/* Khung modal chính, không cuộn */
.gr-modal-content {
    position: relative;
    background: #fff;
    padding: 24px 20px 20px;    /* chừa khoảng trống cho nút X */
    border-radius: 8px;
    max-height: 80vh;
    max-width: 600px;
    width: 90%;
    overflow: hidden;           /* KHÔNG cuộn toàn bộ modal */
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  }
  
  /* Chỉ phần danh sách mới cuộn */
  #albumListContainer {
    max-height: calc(80vh - 80px); /* trừ chiều cao tiêu đề + padding */
    overflow-y: auto;
    margin-top: 12px;              /* cách tiêu đề 1 chút */
    padding-right: 8px; 
    scrollbar-width: thin;       /* “auto” | “thin” */
    scrollbar-color: #bbb #f1f1f1;           /* chừa chỗ cho thanh cuộn */
  }
  
  /* Nút X góc phải trên */
  .gr-close-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    line-height: 1;
    cursor: pointer;
    color: #2e3a59;
    font-size: 2rem;
    font-weight: 700;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s;
  }
  .gr-close-btn:hover {
    color: #000;
  }
/* --- Watermark phủ chéo khắp ảnh --- */
/* --- Watermark phủ chéo toàn ảnh --- */
.photo-card canvas {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    pointer-events: auto;
  }
  .wm-wrap {
    position: relative;
    display: block;
    width: 100%;
  }
  .wm-wrap img {
    width: 100%;
    height: auto;
    display: block;
  }
  .wm-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    pointer-events: none;
  }
  
  
  
  