* {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: rgb(125, 99, 233);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgb(100, 80, 200);
}

.app-container {
    background-image: linear-gradient(215deg, rgb(116, 84, 249) 0%, rgb(115, 17, 176) 85%);
    width: 100%;
    height: 100vh;
}

.background-texture {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background-image: url('https://garticphone.com/images/textura.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.center-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 10px;
}

.main-content {
    width: 1082px;
    height: 698px;
    border: 4px solid rgba(29, 29, 27, 0.15);
    border-radius: 12px;
    box-shadow: rgba(255, 255, 255, 0.15) 0px 2px 0px 0px inset, rgba(255, 255, 255, 0.15) 0px 3px 0px 0px;
    display: flex;
    flex-direction: column;
    position: relative;
    transform: scale(0.75);
    overflow: hidden;
    min-height: 0;
}

.content-layout {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 18px;
    min-height: 0;
}

.logo {
    width: 160px;
    height: 92px;
    background-image: url('assets/logo.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    flex-shrink: 0;
}

.app-layout {
    width: 100%;
    flex: 1;
    margin-top: 18px;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    min-height: 0;
}

.sidebar {
    width: 356px;
    background-color: rgba(38, 28, 92, 0.5);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    min-height: 0;
}

.sidebar-title {
    margin: 13px 0 0;
    font-size: 22px;
    color: rgb(92, 255, 182);
    text-transform: uppercase;
    text-align: center;
    text-shadow: rgb(23, 5, 87) 3px 0px 0px, rgb(23, 5, 87) 2.83487px 0.981584px 0px, rgb(23, 5, 87) 2.35766px 1.85511px 0px, rgb(23, 5, 87) 1.62091px 2.52441px 0px, rgb(23, 5, 87) 0.705713px 2.91581px 0px, rgb(23, 5, 87) -0.287171px 2.98622px 0px, rgb(23, 5, 87) -1.24844px 2.72789px 0px, rgb(23, 5, 87) -2.07227px 2.16926px 0px, rgb(23, 5, 87) -2.66798px 1.37182px 0px, rgb(23, 5, 87) -2.96998px 0.42336px 0px, rgb(23, 5, 87) -2.94502px -0.571704px 0px, rgb(23, 5, 87) -2.59586px -1.50383px 0px, rgb(23, 5, 87) -1.96093px -2.27041px 0px, rgb(23, 5, 87) -1.11013px -2.78704px 0px, rgb(23, 5, 87) -0.137119px -2.99686px 0px, rgb(23, 5, 87) 0.850987px -2.87677px 0px, rgb(23, 5, 87) 1.74541px -2.43999px 0px, rgb(23, 5, 87) 2.44769px -1.73459px 0px, rgb(23, 5, 87) 2.88051px -0.838247px 0px;
}

.folder-list, .folder-list-wrapper, .folder-list-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.folder-scroll-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    width: 100%;
    padding-bottom: 10px;
    min-height: 0;
}

.folder {
    width: calc(100% - 20px);
    height: 58px;
    min-height: 58px;
    margin: 5px 10px;
    background-color: rgba(76, 46, 172, 0.6);
    border: 2px solid rgb(99, 75, 201);
    border-radius: 100px 25px 25px 100px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: 0.2s;
    user-select: none;
}

.folder:hover {
    background-color: rgba(99, 75, 201, 0.8);
}

.folder-icon-container {
    width: 46px;
    height: 46px;
    margin: 0 5px;
    border-radius: 50%;
    border: 2px solid rgb(60, 17, 152);
    display: flex;
    justify-content: center;
    align-items: center;
}

.folder-icon {
    font-size: 24px;
    color: rgb(122, 99, 218);
}

.folder-details {
    flex: 1;
    margin: 0 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.folder-name {
    color: rgb(122, 99, 218);
    font-size: 16px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.folder-count {
    width: 24px;
    height: 24px;
    margin: 0 10px;
    background-color: #e7e1ff;
    border: 2px solid rgb(99, 75, 201);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    color: rgb(122, 99, 218);
}

.folder.active {
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    height: 62px;
    min-height: 62px;
    margin: 10px 10px 5px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 7px 0px;
}

.folder.active .folder-icon-container {
    border: 2px solid rgb(1, 36, 66);
    background-color: rgb(234, 241, 253);
}

.folder.active .folder-icon {
    color: #FFC000;
}

.folder.active .folder-name {
    color: rgb(48, 26, 107);
}

.folder.active .folder-count {
    background-color: rgb(118, 97, 201);
    border-color: rgb(118, 97, 201);
    color: white;
}

.gallery {
    flex: 1;
    margin-left: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.gallery-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.gallery-header {
    background-color: rgba(38, 28, 92, 0.5);
    border-radius: 10px 10px 0 0;
    display: flex;
}

.gallery-title {
    flex: 1;
    margin: 13px 0 0;
    font-size: 22px;
    color: rgb(92, 255, 182);
    text-transform: uppercase;
    text-align: center;
    padding: 0 8px;
    text-shadow: rgb(23, 5, 87) 3px 0px 0px, rgb(23, 5, 87) 2.83487px 0.981584px 0px, rgb(23, 5, 87) 2.35766px 1.85511px 0px, rgb(23, 5, 87) 1.62091px 2.52441px 0px, rgb(23, 5, 87) 0.705713px 2.91581px 0px, rgb(23, 5, 87) -0.287171px 2.98622px 0px, rgb(23, 5, 87) -1.24844px 2.72789px 0px, rgb(23, 5, 87) -2.07227px 2.16926px 0px, rgb(23, 5, 87) -2.66798px 1.37182px 0px, rgb(23, 5, 87) -2.96998px 0.42336px 0px, rgb(23, 5, 87) -2.94502px -0.571704px 0px, rgb(23, 5, 87) -2.59586px -1.50383px 0px, rgb(23, 5, 87) -1.96093px -2.27041px 0px, rgb(23, 5, 87) -1.11013px -2.78704px 0px, rgb(23, 5, 87) -0.137119px -2.99686px 0px, rgb(23, 5, 87) 0.850987px -2.87677px 0px, rgb(23, 5, 87) 1.74541px -2.43999px 0px, rgb(23, 5, 87) 2.44769px -1.73459px 0px, rgb(23, 5, 87) 2.88051px -0.838247px 0px;
}

.gallery-content {
    flex: 1;
    background-color: rgba(38, 28, 92, 0.5);
    border-radius: 0 0 10px 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.gallery-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
    width: 100%;
    min-height: 0;
}

.image-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-content: flex-start;
    gap: 20px;
    padding: 10px;
    width: 100%;
    overflow-y: auto;
    position: relative;
    min-height: 100%;
    padding-bottom: 20px;
}

.image-card {
    flex: 1 1 250px;
    max-width: 350px;
    aspect-ratio: 16 / 9;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
    animation: fadeScale 0.4s ease-out forwards;
}

.image-card:hover {
    transform: scale(1.03);
    z-index: 10;
}

@keyframes fadeScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.modal-content {
    margin: 0 auto;
    width: 60%;
    max-width: 600px;
    height: 33vw;
    max-height: 400px;
    aspect-ratio: 16 / 9;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    animation: zoom 0.3s;
}

.modal-caption {
    margin-top: 20px;
    text-align: center;
    color: rgb(92, 255, 182);
    font-size: 24px;
    text-transform: uppercase;
    text-shadow: rgb(23, 5, 87) 2px 0px 0px, rgb(23, 5, 87) 1.89px 0.65px 0px, rgb(23, 5, 87) 1.57px 1.24px 0px, rgb(23, 5, 87) 1.08px 1.68px 0px, rgb(23, 5, 87) 0.47px 1.94px 0px, rgb(23, 5, 87) -0.19px 1.99px 0px, rgb(23, 5, 87) -0.83px 1.82px 0px, rgb(23, 5, 87) -1.38px 1.45px 0px, rgb(23, 5, 87) -1.78px 0.91px 0px, rgb(23, 5, 87) -1.98px 0.28px 0px, rgb(23, 5, 87) -1.96px -0.38px 0px, rgb(23, 5, 87) -1.73px -1px 0px, rgb(23, 5, 87) -1.31px -1.51px 0px, rgb(23, 5, 87) -0.74px -1.86px 0px, rgb(23, 5, 87) -0.09px -2px 0px, rgb(23, 5, 87) 0.57px -1.92px 0px, rgb(23, 5, 87) 1.16px -1.63px 0px, rgb(23, 5, 87) 1.63px -1.16px 0px, rgb(23, 5, 87) 1.92px -0.56px 0px;
}

.close-button {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    font-family: sans-serif;
    z-index: 1001;
}

.close-button:hover {
    color: #bbb;
    transform: scale(1.1);
}

@keyframes zoom {
    from { transform: scale(0.1); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .main-content {
        width: 100%;
        height: 100vh;
        border: none;
        border-radius: 0;
        transform: scale(1);
        margin: 0;
    }

    .content-layout {
        padding: 10px;
    }

    .app-layout {
        flex-direction: column;
        margin-top: 10px;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
        margin-bottom: 10px;
    }

    .gallery {
        margin-left: 0;
        flex: 1;
    }

    .logo {
        width: 120px;
        height: 69px;
    }

    .sidebar-title {
        font-size: 18px;
    }

    .gallery-title {
        font-size: 18px;
    }

    .modal-content {
        width: 95%;
        max-width: 95%;
        height: 50vw;
        max-height: 500px;
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 480px) {
    .content-layout {
        padding: 5px;
    }

    .folder {
        height: 50px;
        min-height: 50px;
    }

    .folder-icon-container {
        width: 40px;
        height: 40px;
    }

    .folder-name {
        font-size: 14px;
    }

    .sidebar-title, .gallery-title {
        font-size: 16px;
    }

    .image-grid {
        gap: 10px;
        padding: 5px;
    }

    .image-card {
        aspect-ratio: 16 / 9;
    }
}