/* Ẩn thanh cuộn cho danh sách filter */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

/* Hiệu ứng chớp đèn flash và shutter */
@keyframes flash-anim {
    0% { opacity: 0; }
    20% { opacity: 0.8; }
    100% { opacity: 0; }
}

@keyframes shutter-view {
    0% { opacity: 1; transform: scale(1); }
    20% { opacity: 0.3; transform: scale(0.995); }
    100% { opacity: 1; transform: scale(1); }
}

.shutter-view-active {
    animation: shutter-view 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.flash-active {
    animation: flash-anim 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Nút chụp ảnh */
.shutter-btn {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shutter-btn:active {
    transform: scale(0.92);
}

.shutter-btn div {
    transition: all 0.2s ease;
}

.shutter-btn:active div {
    transform: scale(0.88);
    background: #f3f4f6;
}

/* Chữ dập ngày tháng trên live view */
.date-stamp-live {
    font-family: 'Courier New', Courier, monospace;
    color: #ff9900;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    font-weight: bold;
    letter-spacing: 2px;
}

/* Khung viền phim live view */
.frame-polaroid {
    box-shadow: inset 0 0 0 20px white, inset 0 -80px 0 20px white;
}

.frame-film {
    border-left: 20px dashed #111;
    border-right: 20px dashed #111;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
}

/* Fix chiều cao động cho trình duyệt mobile */
.h-dvh {
    height: 100vh;
    height: 100dvh;
}

/* Phân bố lưới Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    padding: 20px;
}

.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 16px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #111;
}

.gallery-item:active {
    transform: scale(0.96);
}

/* Glassmorphism Premium */
.glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-panel {
    background: rgba(10, 10, 10, 0.65);
    backdrop-filter: blur(45px) saturate(210%);
    -webkit-backdrop-filter: blur(45px) saturate(210%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.7);
}

.glass-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-btn:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.2);
}

/* Animations */
.modal-animate-up {
    animation: slideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

#tab-filters, #tab-frames {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pb-safe {
    padding-bottom: env(safe-area-inset-bottom);
}