/* ==========================================================================
   LIQUID GLASS DESIGN SYSTEM - MVO AUTO GLASS
   ========================================================================== */

:root {
    --brand-red: #e50914;
    --brand-red-glow: rgba(229, 9, 20, 0.4);
    --brand-red-subtle: rgba(229, 9, 20, 0.15);
    
    --brand-grey: #808892;
    --brand-grey-border: rgba(160, 168, 180, 0.35);
    --brand-grey-hover: rgba(160, 168, 180, 0.5);
    
    --bg-dark: #0a0c10;
    --glass-bg: rgba(20, 24, 33, 0.65);
    --glass-bg-card: rgba(28, 33, 46, 0.55);
    --glass-bg-hover: rgba(45, 53, 72, 0.7);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.15);
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-subtle: #6b7280;
    
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
}

.glow-red {
    top: -10%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.25) 0%, transparent 70%);
}

.glow-grey {
    bottom: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(128, 136, 146, 0.18) 0%, transparent 70%);
}

.glow-accent {
    top: 40%;
    left: 45%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.1) 0%, transparent 70%);
}

.liquid-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-lg);
}

/* Header & 8-Second Shimmer Logo */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 28px;
    background: rgba(10, 12, 16, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-wrapper { display: flex; align-items: center; }

.logo-shimmer-box {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 2;
}

.shimmer-glare {
    position: absolute;
    top: 0;
    left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.03) 20%,
        rgba(255, 255, 255, 0.45) 50%,
        rgba(229, 9, 20, 0.4) 65%,
        transparent 100%
    );
    transform: skewX(-25deg);
    z-index: 3;
    pointer-events: none;
    animation: logoShimmerSweep 8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes logoShimmerSweep {
    0% { left: -150%; opacity: 0; }
    15% { opacity: 1; }
    35% { left: 150%; opacity: 1; }
    36%, 100% { left: 150%; opacity: 0; }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Trash Bin Header Button */
.btn-trash-header {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
}

.btn-trash-header:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.trash-badge-count {
    background: var(--brand-red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    margin-left: 4px;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.6);
}

/* 30 GB Storage Quota Badge */
.storage-badge-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.12);
    min-width: 185px;
    backdrop-filter: blur(14px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.storage-quota-bar-wrapper {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.storage-quota-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: var(--radius-full);
    transition: width 0.4s ease, background 0.4s ease;
}

.storage-quota-bar-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.storage-quota-bar-fill.danger {
    background: linear-gradient(90deg, #e50914, #ef4444);
}

.storage-badge-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-main);
}

.storage-badge-text .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    flex-shrink: 0;
}

.storage-badge-text .dot.warning {
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
}

.storage-badge-text .dot.danger {
    background: #e50914;
    box-shadow: 0 0 8px #e50914;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
    position: relative;
    z-index: 10;
}

/* Login View */
.login-view {
    min-height: calc(80vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 44px 36px;
    text-align: center;
    border: 1.5px solid var(--brand-grey-border);
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.key-icon-wrapper {
    width: 68px;
    height: 68px;
    margin: 0 auto 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.2), rgba(128, 136, 146, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-red);
    box-shadow: 0 10px 25px rgba(229, 9, 20, 0.2);
}

.login-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-subtext {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 52px 16px 20px;
    font-size: 16px;
    color: var(--text-main);
    background: rgba(15, 18, 26, 0.7);
    border: 1.5px solid var(--brand-grey-border);
    border-radius: var(--radius-md);
    outline: none;
    transition: all 0.25s ease;
}

.input-wrapper input:focus {
    border-color: var(--brand-red);
    background: rgba(20, 24, 34, 0.9);
    box-shadow: 0 0 0 4px rgba(229, 9, 20, 0.18);
}

.input-wrapper input::placeholder {
    color: var(--text-subtle);
}

.btn-toggle-eye {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.error-banner {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    font-size: 13px;
    text-align: left;
}

/* Buttons */
.glass-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
    user-select: none;
    white-space: nowrap;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.file-upload-label {
    position: relative;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #e50914, #b20710);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(229, 9, 20, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(229, 9, 20, 0.5);
}

.btn-submit-key {
    width: 100%;
    padding: 16px;
    font-size: 15px;
}

.btn-accent {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-accent:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-magic {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.25));
    color: #c4b5fd;
    border: 1px solid rgba(168, 85, 247, 0.4);
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.2);
}

.btn-magic:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(168, 85, 247, 0.4));
    transform: translateY(-2px);
    color: #fff;
}

.btn-zip {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

.btn-zip:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(5, 150, 105, 0.35));
    color: #fff;
    transform: translateY(-2px);
}

.btn-danger-subtle {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger-subtle:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

/* Toolbar & Breadcrumbs */
.toolbar-card {
    padding: 16px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.toolbar-left, .toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.crumb-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.crumb-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
}

.crumb-btn.active {
    color: var(--text-main);
    font-weight: 600;
}

.crumb-sep {
    color: var(--text-subtle);
    font-size: 12px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box svg {
    position: absolute;
    left: 14px;
    color: var(--text-subtle);
    pointer-events: none;
}

.search-box input {
    background: rgba(15, 18, 26, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    padding: 10px 16px 10px 40px;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    width: 200px;
    transition: all 0.25s ease;
}

.search-box input:focus {
    width: 240px;
    border-color: var(--brand-red);
    background: rgba(20, 24, 34, 0.85);
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Prominent Active Dropzone Box */
.active-dropzone-box {
    display: block;
    margin-bottom: 24px;
    border: 2px dashed rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.02);
    padding: 28px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    color: inherit;
}

.active-dropzone-box:hover, .active-dropzone-box.drag-over {
    border-color: var(--brand-red);
    background: rgba(229, 9, 20, 0.08);
    box-shadow: 0 0 35px rgba(229, 9, 20, 0.25);
    transform: scale(1.008);
}

.drop-box-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    pointer-events: none;
}

.drop-icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(229, 9, 20, 0.15);
    border: 1px solid rgba(229, 9, 20, 0.3);
    color: var(--brand-red);
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-text-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    text-align: left;
}

.drop-text-content p {
    font-size: 13px;
    color: var(--text-muted);
    text-align: left;
}

.drop-text-content .browse-link {
    color: var(--brand-red);
    font-weight: 600;
    text-decoration: underline;
}

/* Upload Progress Card */
.upload-progress-card {
    padding: 16px 20px;
    margin-bottom: 24px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.progress-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #e50914, #ff4b4b);
    border-radius: var(--radius-full);
    transition: width 0.2s ease;
}

/* File Grid */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 22px;
}

.grid-card {
    background: var(--glass-bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.grid-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}

.folder-card {
    cursor: pointer;
    padding: 20px;
}

.folder-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(229, 9, 20, 0.12);
    color: var(--brand-red);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.folder-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-info p {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.folder-date-badge {
    color: #93c5fd;
    font-size: 11px;
    font-weight: 500;
    background: rgba(59, 130, 246, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
}

.file-card {
    cursor: pointer;
}

.file-thumbnail-box {
    height: 190px;
    background: rgba(10, 12, 16, 0.6);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-thumbnail-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.file-card:hover .file-thumbnail-box img {
    transform: scale(1.06);
}

.file-generic-icon {
    color: var(--text-muted);
}

.file-info-bar {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-meta {
    overflow: hidden;
}

.file-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.file-size {
    font-size: 11px;
    color: var(--text-subtle);
}

.card-hover-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
    opacity: 0;
    transform: translateY(-6px);
    transition: all 0.2s ease;
    z-index: 10;
}

.grid-card:hover .card-hover-actions {
    opacity: 1;
    transform: translateY(0);
}

.action-chip {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(15, 18, 26, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.action-chip:hover {
    background: var(--brand-red);
    color: #fff;
    border-color: var(--brand-red);
}

.action-chip.btn-compress-chip:hover {
    background: #8b5cf6;
    border-color: #8b5cf6;
}

.action-chip.btn-zip-chip:hover {
    background: #10b981;
    border-color: #10b981;
}

.empty-state {
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    color: var(--text-subtle);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-muted);
}

/* New Folder Date Suggestion */
.date-suggestion-row {
    margin-top: 8px;
    display: flex;
}

.date-chip {
    font-size: 12px;
    padding: 6px 12px;
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.date-chip:hover {
    background: rgba(59, 130, 246, 0.3);
    color: #fff;
}

/* ==========================================================================
   TRASH BIN MODAL STYLING
   ========================================================================== */

.dialog-lg {
    max-width: 780px;
    width: 90vw;
}

.trash-header-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.trash-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(229, 9, 20, 0.15);
    color: var(--brand-red);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.trash-retention-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.trash-body-scroll {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 6px;
}

.trash-body-scroll::-webkit-scrollbar {
    width: 6px;
}

.trash-body-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.trash-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
    color: var(--text-muted);
}

.trash-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.trash-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.trash-item-row:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.trash-item-left {
    display: flex;
    align-items: center;
    gap: 14px;
    overflow: hidden;
}

.trash-item-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(15, 18, 26, 0.8);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.trash-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trash-item-info {
    overflow: hidden;
}

.trash-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
}

.trash-item-path {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.trash-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.trash-countdown-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.trash-countdown-badge.critical {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.trash-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-restore-chip {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-restore-chip:hover {
    background: #10b981;
    color: #fff;
}

.btn-delete-perm-chip {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete-perm-chip:hover {
    background: var(--brand-red);
    color: #fff;
}

.trash-empty-state {
    padding: 40px 20px;
}

/* ==========================================================================
   PRO FULLSCREEN PHOTO VIEWER
   ========================================================================== */

.lightbox-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.lightbox-fullscreen-viewer {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.viewer-top-bar {
    position: absolute;
    top: 16px;
    left: 20px;
    right: 20px;
    z-index: 100;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(20, 24, 34, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.viewer-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.viewer-counter {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.viewer-filename {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 350px;
}

.viewer-filesize {
    font-size: 12px;
    color: var(--text-subtle);
}

.viewer-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.viewer-tool-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.viewer-tool-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-magic-tool {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    border-color: rgba(139, 92, 246, 0.4);
}

.btn-magic-tool:hover {
    background: #8b5cf6;
    color: #fff;
}

.btn-primary-tool {
    background: var(--brand-red);
    color: #fff;
    border-color: var(--brand-red);
}

.btn-primary-tool:hover {
    background: #ff1e2b;
}

.btn-close-tool {
    border-radius: 50%;
    padding: 8px;
}

.viewer-stage-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 80px 20px 100px;
    overflow: hidden;
}

.viewer-img-container {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: grab;
}

.viewer-img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center center;
    user-select: none;
}

.stage-nav-btn {
    background: rgba(20, 24, 34, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(15px);
    transition: all 0.2s ease;
    z-index: 50;
}

.stage-nav-btn:hover {
    background: var(--brand-red);
    transform: scale(1.1);
}

.viewer-thumb-strip {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80vw;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    border-radius: var(--radius-lg);
    background: rgba(15, 18, 26, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 100;
}

.viewer-thumb-strip::-webkit-scrollbar {
    height: 4px;
}

.viewer-thumb-strip::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.viewer-thumb-item {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    opacity: 0.5;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.viewer-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.viewer-thumb-item:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

.viewer-thumb-item.active {
    opacity: 1;
    border-color: var(--brand-red);
    box-shadow: 0 0 12px rgba(229, 9, 20, 0.5);
    transform: scale(1.1);
}

/* Fullscreen Global Drag Overlay */
.global-drag-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 12, 16, 0.88);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.drag-overlay-card {
    padding: 60px 80px;
    text-align: center;
    border: 2px dashed rgba(229, 9, 20, 0.6);
    background: rgba(20, 24, 34, 0.9);
    box-shadow: 0 0 80px rgba(229, 9, 20, 0.35);
    border-radius: var(--radius-lg);
    transform: scale(1.02);
    pointer-events: none;
}

.drag-icon-pulse {
    color: var(--brand-red);
    margin-bottom: 20px;
    animation: bouncePulse 1.5s infinite ease-in-out;
}

@keyframes bouncePulse {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.08); }
}

.drag-overlay-card h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
}

.drag-overlay-card p {
    font-size: 15px;
    color: var(--text-muted);
}

/* Dialogs */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.dialog-card {
    width: 100%;
    max-width: 540px;
    padding: 28px;
    animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dialog-sm { max-width: 440px; }

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.dialog-header h3 { font-size: 18px; font-weight: 700; }

.btn-close-dialog {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
}

.dialog-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.format-chips { display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
    padding: 9px 14px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.chip.active {
    background: rgba(229, 9, 20, 0.2);
    border-color: var(--brand-red);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.25);
}

.slider-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.slider-label b { color: var(--brand-red); font-size: 14px; }

.glass-slider { width: 100%; accent-color: var(--brand-red); cursor: pointer; }

.slider-hints {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-subtle);
    margin-top: 4px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-main);
    cursor: pointer;
}

.glass-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(15, 18, 26, 0.7);
    border: 1.5px solid var(--brand-grey-border);
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 15px;
    outline: none;
}

.glass-input:focus {
    border-color: var(--brand-red);
    box-shadow: 0 0 0 4px rgba(229, 9, 20, 0.2);
}

.dialog-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.compress-result-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.savings-badge {
    text-align: center;
    padding: 8px 14px;
    background: rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-sm);
    min-width: 80px;
}

.savings-badge span {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #10b981;
}

.savings-badge small {
    font-size: 10px;
    color: #a7f3d0;
}

.savings-text {
    font-size: 13px;
    color: #d1fae5;
    line-height: 1.4;
}

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999999;
}

.toast {
    background: rgba(20, 24, 34, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 14px;
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast-success { border-left: 4px solid #10b981; }
.toast.toast-error { border-left: 4px solid var(--brand-red); }

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 768px) {
    .app-header { padding: 12px 16px; }
    .logo-img { height: 34px; }
    .main-content { padding: 20px 14px; }
    .toolbar-card { padding: 12px 16px; }
    .search-box input { width: 160px; }
    .search-box input:focus { width: 200px; }
    .file-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
    .file-thumbnail-box { height: 140px; }
    .viewer-filename { max-width: 140px; }
    .viewer-top-bar { top: 8px; left: 8px; right: 8px; padding: 8px 12px; }
    .viewer-tool-btn span { display: none; }
}


.viewer-img-container {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: default;
    user-select: none;
    touch-action: none;
}

.viewer-img-container.can-pan {
    cursor: grab !important;
}

.viewer-img-container.is-panning {
    cursor: grabbing !important;
}

.viewer-img-container img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    transform-origin: center center;
    will-change: transform;
    pointer-events: auto;
}

.viewer-img-container img.smooth-transition {
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
