:root {
    --color-sage: #9CAF88;
    --color-sage-light: rgba(156, 175, 136, 0.5);
    --color-yellow: #F7D060;
    --color-yellow-hover: #E5BE50;
    --color-bg-dark: #121212;
    --color-text-light: #F5F5F5;
    --color-text-dark: #333333;

    --font-main: 'Smooch Sans', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* GLOBALNY STYL SCROLLBARÓW */
* {
    scrollbar-width: thin;
    scrollbar-color: #555555 transparent;
    transition: scrollbar-color 0.3s ease;
}

*:hover {
    scrollbar-color: var(--color-yellow) transparent;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #555555; /* Solidny, nieprzezroczysty szary domyślnie */
    border-radius: 4px;
    transition: background 0.3s ease;
}

/* Aktywowanie koloru suwaka po najechaniu na kontener przewijalny */
*:hover::-webkit-scrollbar-thumb {
    background: var(--color-yellow);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-yellow);
    box-shadow: 0 0 5px var(--color-yellow);
}

body {
    font-family: var(--font-main);
    background: url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=80&w=2564&auto=format&fit=crop') no-repeat center center fixed;
    background-size: cover;
    color: var(--color-text-light);
    overflow: hidden;
    /* prevents standard scrolling to keep 2-part layout */
}

/* Base Layout */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

.part-a {
    flex: 0 0 25%;
    max-width: 450px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    position: relative;
    z-index: 10;
    overflow-y: scroll; /* Wymuszenie paska przewijania dla lepszej intuicyjności UX */
    -webkit-overflow-scrolling: touch;
}

.part-b {
    flex: 1;
    min-width: 0;
    min-height: 0;
    height: 100vh;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    overflow: hidden;
}

/* Mobile Layout */
@media (max-width: 1200px) {
    .app-container {
        position: relative;
        width: 100vw;
        height: 100vh;
        overflow: hidden; /* Blokujemy scroll kontenera, układamy warstwami */
    }

    .part-a {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: 450px;
        height: auto;
        max-height: calc(97vh - 140px); /* Uwzględniono dodatkowe przesunięcie 15px, zapas 3% i dashboard */
        margin-top: 15px; /* Przesunięcie w dół, aby widać było przełącznik języków PL/EN */
        padding: 1.5rem 1rem;
        overflow-y: scroll; /* Własny scroll lewego panelu */
        z-index: 10;
        background: transparent !important;
        -webkit-overflow-scrolling: touch;
    }

    .part-a .glass-panel {
        margin-top: 15px !important;
    }

    .part-b {
        position: absolute;
        inset: 0;
        width: 100vw;
        height: 100vh;
        z-index: 1; /* Pod spodem part-a */
    }

    body {
        overflow: hidden; /* Blokujemy scroll body na desktopie/mobilu */
    }

    /* Wyśrodkowanie przycisków part-b-dashboard na dole ekranu */
    .part-b-dashboard {
        position: absolute;
        bottom: 12px;
        left: 50%;
        transform: translateX(-50%) translateY(100px) !important;
        display: flex;
        flex-direction: row; /* Zapewnia ułożenie w jednym wierszu */
        flex-wrap: nowrap !important; /* Blokujemy zawijanie przycisków! */
        gap: 6px; /* Zmniejszamy gap z 10px */
        align-items: center;
        justify-content: center;
        z-index: 50;
        opacity: 0;
        visibility: hidden;
        transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        width: 98%; /* Zajmuje prawie całą szerokość ekranu */
        box-sizing: border-box;
    }

    .part-b-dashboard.show {
        transform: translateX(-50%) translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Dopasowanie koła i przycisków na telefonach */
    .memory-circle {
        width: 64px !important; /* Zmniejszono z 80px */
        height: 64px !important;
        padding: 2px !important;
        border-radius: 50%;
        border: 1px solid rgba(255, 255, 255, 0.15);
        flex-shrink: 0; /* Zabezpieczenie przed ściśnięciem */
    }

    .memory-circle svg {
        width: 58px !important;
        height: 58px !important;
    }

    .memory-circle .mem-text {
        font-size: 0.75rem !important; /* Mniejszy, czytelny tekst */
        line-height: 1.1;
    }

    .part-b-dashboard .dash-btn {
        padding: 6px 10px !important; /* Mniejsze paddingi */
        font-size: 0.85rem !important; /* Mniejszy font */
        border-radius: 6px !important;
        white-space: nowrap; /* Blokujemy łamanie tekstu w przyciskach */
        flex: 1; /* Przyciski rosną równomiernie */
        text-align: center;
        text-transform: uppercase;
        min-width: 0; /* Pozwala na poprawne flex-shrink w razie potrzeby */
    }

    /* Eksplorator plików gościa na mobilach jako modal nadrzędny */
    #guestExplorerPanel {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        z-index: 100000 !important; /* Na samym wierzchu */
        background: rgba(18, 18, 18, 0.8) !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        display: none;
        padding: 15px !important;
        box-sizing: border-box !important;
    }



    #guestExplorerPanel .my-files-modal {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 600px !important;
        margin: 0 auto !important;
        display: flex !important;
        flex-direction: column !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Glassmorphism Panel now uses theme-glass-panel vars injected from index.php but here are fallbacks */
.glass-panel {
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    margin: auto 0; /* Wyśrodkowanie w pionie, gdy jest miejsce. Chroni przed obcięciem z góry. */
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-sage);
}
.preview-toolbar span, .preview-toolbar button
{
    color: var(--color-bg-dark) !important;
}
a {
    color: var(--color-bg-dark);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover, a:active {
    color: var(--color-bg-dark);
}

/* Typography & Forms */
.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-container img {
    max-width: 100%;
    height: auto;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    font-weight: 400;
}

input[type="email"],
input[type="text"],
textarea,
select {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--color-text-light);
    font-family: var(--font-main);
    font-size: 1.3rem;
    transition: all 0.3s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-yellow);
    background: rgba(0, 0, 0, 0.5);
}

select option {
    background-color: var(--color-bg-dark);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    font-size: 1.4rem;
    font-weight: 600;
    font-family: var(--font-main);
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn.primary {
    background-color: var(--color-sage);
    /* Usunięto narzucony kolor: var(--color-text-dark); aby dziedziczył z motywu lub był kontrolowany elastycznie */
}

.btn.primary:hover, .btn.primary:active, .btn.primary.selected {
    background-color: var(--color-yellow);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px color-mix(in srgb, var(--color-yellow) 90%, black);
}


.btn.outline {
    background: transparent;
    border: 1px solid var(--color-yellow);
    color: var(--color-yellow) !important;
}

.btn.outline:hover, .btn.outline:active, .btn.outline.selected {
    background: var(--color-yellow);
    transform: translateY(-2px);
    color: var(--color-text-dark) !important;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--color-yellow) 90%, black);
    /* Usunięto narzucony biały/ciemny kolor przy najeżdżaniu, żeby zachować spójność - ewentualnie color: var(--color-text-dark) zalezy od preferencji. Tą linię zostawiam odkomentowaną by tekst po prostu ciemniał/jaśniał na tle. */
}

.full-width {
    width: 100%;
}

.mt-3 {
    margin-top: 1.5rem;
}

/* Dropzone */
.dropzone {
    border: 2px dashed var(--color-sage);
    border-radius: 12px;
    padding: 2rem 1rem;
    text-align: center;
    background: rgba(156, 175, 136, 0.1);
    transition: all 0.3s;
}

.dropzone.dragover {
    background: rgba(156, 175, 136, 0.4);
    border-color: var(--color-yellow);
}

.dropzone p {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.dropzone .dropzone-info {
    font-size: 1.2rem;
    opacity: 0.7;
    margin-bottom: 1rem;
}

.buttons-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* File list preview */
.file-list-preview {
    margin-top: 1rem;
    font-size: 1.2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 6px;
}

.file-list-items {
    max-height: 200px;
    overflow-y: scroll; /* Wymuszenie paska przewijania dla lepszej intuicyjności UX */
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: y mandatory; /* Włączenie scroll snappingu */
    scrollbar-width: thin;
    scrollbar-color: rgb(231, 231, 231) transparent;
    transition: transform 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94), scrollbar-color 0.3s ease;
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 5px;
    text-align: left;
}

.file-list-items:hover {
    scrollbar-color: var(--color-yellow) transparent;
}

.file-list-items.bounce-top {
    transform: translateY(8px);
}

.file-list-items.bounce-bottom {
    transform: translateY(-8px);
}



.file-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    scroll-snap-align: start; /* Wyrównanie elementu do początku kontenera */
    scroll-snap-stop: always; /* Zatrzymanie na każdym kolejnym elemencie */
}

.file-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
}

.file-icon {
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    font-size: 24px;
    margin-right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.file-info {
    flex: 1;
    overflow: hidden;
}

.file-name {
    font-weight: bold;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.file-meta {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Upload Stats */
#uploadStats {
    font-size: 1.1rem;
    color: var(--color-text-light);
    opacity: 0.8;
    margin-bottom: 5px;
    text-align: center;
}

/* Kopiowanie linku & Toast */
.copy-link-box {
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-family: inherit;
    font-size: 1.3rem;
    color: var(--color-yellow);
    border: 1px dashed var(--color-yellow);
    cursor: pointer;
    word-break: break-all;
    transition: all 0.3s;
    position: relative;
}

.copy-link-box:hover {
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 10px rgba(247, 208, 96, 0.3);
}

.copy-link-box::after {
    content: 'Skopiuj do schowka';
    font-size: 0.9rem;
    color: var(--color-text-light); opacity: 0.7;
    display: block;
    margin-top: 5px;
}

#copyToast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(50px);
    background: var(--color-sage);
    color: var(--color-text-light);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10000;
}

#copyToast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Progress Bars */
.progress-wrap {
    margin-top: 1.5rem;
}

.progress-wrap p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar.global .fill {
    background-color: var(--color-yellow);
}

.progress-bar.file .fill {
    background-color: var(--color-sage);
}

.progress-bar .fill {
    height: 100%;
    width: 0%;
    transition: width 0.2s linear;
}

/* Beauty Alert Modal */
.beautyalert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.beautyalert-overlay.show {
    opacity: 1;
    visibility: visible;
}

.beautyalert-box {
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(-20px);
    transition: all 0.3s;
    position: relative;
}

.beautyalert-overlay.show .beautyalert-box {
    transform: translateY(0);
}

.beautyalert-header {
    padding: 15px;
    font-weight: bold;
    font-size: 1.4rem;
    color: #111;
    text-align: center;
}

.beautyalert-header.info {
    background: var(--color-sage);
}

.beautyalert-header.warning {
    background: var(--color-yellow);
}

.beautyalert-header.error {
    background: #E74C3C;
    color: var(--color-text-light);
}

.beautyalert-body {
    padding: 20px;
    font-size: 1.2rem;
    text-align: center;
    color: var(--color-text-light); opacity: 0.8;
}

.beautyalert-footer {
    padding: 10px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.beautyalert-footer button {
    background: transparent;
    border: 1px solid #777;
    color: var(--color-text-light);
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 1.2rem;
}

.beautyalert-footer button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Weryfikacja Live E-mail */
.email-input-wrap {
    position: relative;
}

.email-status-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

.email-loading-bar {
    height: 2px;
    width: base;
    background: var(--color-sage);
    position: absolute;
    bottom: -2px;
    left: 0;
    border-radius: 2px;
    animation: loader 1s infinite alternate;
    display: none;
}

@keyframes loader {
    from {
        width: 0%;
        left: 0;
    }

    to {
        width: 100%;
        left: 0;
    }
}

#timerDisplay {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-yellow);
    text-align: center;
    margin-top: 10px;
}

/* Success Step */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.success-checkmark svg {
    width: 40px;
    height: 40px;
}

.checkmark-circle {
    stroke: var(--color-sage);
    stroke-width: 4;
}

.checkmark-check {
    stroke: var(--color-sage);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) 0.5s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

/* Dashboard we wnetrzu Part-B */
.part-b-dashboard {
    position: absolute;
    right: 20px;
    bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    z-index: 50;
    transform: translateY(100px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.part-b-dashboard.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.part-b-dashboard>* {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.part-b-dashboard.show>* {
    opacity: 1;
    transform: translateY(0);
}

.part-b-dashboard.show>*:nth-child(1) {
    transition-delay: 0.2s;
}

.part-b-dashboard.show>*:nth-child(2) {
    transition-delay: 0.35s;
}

.part-b-dashboard.show>*:nth-child(3) {
    transition-delay: 0.5s;
}

.part-b-dashboard .dash-btn {
    color: var(--color-text-light);
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 1.2rem;
    font-family: var(--font-main);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.part-b-dashboard .dash-btn:hover {
    background: var(--color-sage);
    border-color: var(--color-sage);
    transform: translateY(-5px);
}

.memory-circle {
    width: 120px;
    height: 120px;
    position: relative;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    cursor: help;
}

.memory-circle svg {
    transform: rotate(-90deg);
    width: 100px;
    height: 100px;
}

.mem-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 6;
    cx: 50;
    cy: 50;
    r: 45;
}

.mem-circle-fill {
    fill: none;
    stroke: var(--color-yellow);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease-out;
    cx: 50;
    cy: 50;
    r: 45;
}

.memory-circle .mem-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--color-yellow);
    text-align: center;
    line-height: 1.2;
}

/* Modal "Moje Pliki" nakladajacy sie na part-b */
.my-files-modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s;
    padding: 30px;
    overflow: hidden;
    min-height: 0;
    min-width: 0;
}


.my-files-modal.show {
    opacity: 1;
    visibility: visible;
}

#managerModal.show
{
    z-index: 99999999 !important;
    background: rgba(255,255,255,0.85) !important;
    backdrop-filter: blur(35px) !important;
}

.my-files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 1);
    flex-shrink: 0;
    padding: 20px;
    width: calc(100% - 18px);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    margin-bottom: 15px;
}

.my-files-header h2 {
    font-size: 2.5rem;
    color: var(--color-yellow);
    margin: 0;
}

.my-files-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 15px;
    min-height: 0;
    min-width: 0;
}

/* Sortowanie naglowkow w starym CSS ale z dodaniem cursor pointer */
table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.3s;
    position: relative;
    padding-right: 20px !important;
}

table th.sortable:hover {
    color: var(--color-yellow);
}

table th.sortable::after {
    content: '⇅';
    position: absolute;
    right: 5px;
    opacity: 0.3;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
}

table th.sortable.asc::after {
    content: '↑';
    opacity: 1;
    color: var(--color-yellow);
}

table th.sortable.desc::after {
    content: '↓';
    opacity: 1;
    color: var(--color-yellow);
}



/* Faza 4: Preview Mode for BeautyAlert */
.beautyalert-box.preview-mode {
    max-width: calc(100vw - 30px);
    width: 1200px;
    max-height: calc(100vh - 30px);
    display: flex;
    flex-direction: column;
}

.beautyalert-box.preview-mode .beautyalert-body {
    flex: 1 1 auto;
    overflow: auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
    display: block;
    scroll-behavior: smooth;
    min-height: 60vh;
}

.beautyalert-box.preview-mode .beautyalert-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 15px;
    background: #111;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: var(--color-yellow);
    animation: spin 1s ease-in-out infinite;
    position: absolute;
    top: calc(50% - 25px);
    left: calc(50% - 25px);
    z-index: 10;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Faza 5: System Operacyjny w Przeglądarce (Grid View & Toolbars) */
.file-grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 10px 0;
}

.file-grid-item {
    width: 140px;
    height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 15px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: all 0.2s ease-in-out;
}

.file-grid-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--color-yellow);
}

.file-grid-item.selected {
    background: rgba(var(--color-yellow-rgb), 0.15) !important;
    border-color: var(--color-yellow) !important;
}

.file-grid-icon {
    font-size: 3.5rem;
    margin-bottom: 5px;
    line-height: 1;
}

.file-grid-name {
    font-size: 1rem;
    text-align: center;
    word-break: break-all;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.1;
}

.file-grid-meta {
    font-size: 0.8rem;
    opacity: 0.5;
    margin-top: auto;
}

/* Custom Animated Checkbox for Grid Items */
.grid-checkbox-wrapper {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 34px;
    height: 34px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: border-color 0.2s;
}

.grid-checkbox-wrapper:hover {
    border-color: var(--color-yellow);
}

.grid-checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.grid-checkbox-svg {
    width: 22px;
    height: 22px;
}

.grid-checkbox-svg path {
    fill: none;
    stroke: var(--color-yellow);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    transition: stroke-dashoffset 0.3s ease-in-out;
}

.grid-checkbox-wrapper input[type="checkbox"]:checked+.grid-checkbox-svg path {
    stroke-dashoffset: 0;
}

/* Toolbar Toolbar */
.file-grid-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    margin-bottom: 15px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.file-grid-toolbar select {
    padding: 8px 15px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-light);
    border: none;
    font-family: inherit;
    font-size: 1.1rem;
    cursor: pointer;
    outline: none;
}

.file-grid-toolbar select option {
    background: #222;
    color: var(--color-text-light);
}

.grid-selection-info {
    color: var(--color-yellow);
    font-weight: bold;
    font-size: 1.1rem;
    padding: 0 10px;
}

.btn.disabled {
    opacity: 0.5;
    pointer-events: none;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: color-mix(in srgb, var(--color-text-light) 50%, transparent) !important;
}

#guestExplorerPanel.show {
    display: flex !important;
}
