:root {
    --cursor-default: url("./media/win95-arrow.png") 0 0, default;
    --cursor-pointer: url("./media/win95-pointer.png") 10 0, pointer;
    --cursor-grab: url("./media/win95-grab.png") 16 16, grab;
    --cursor-grabbing: url("./media/win95-grabbing.png") 16 16, grabbing;
}

.gesture-hidden-video {
    position: fixed;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    left: -9999px;
    top: 0;
}

.gesture-cursor {
    position: fixed;
    z-index: 99999;
    width: 64px;
    height: 64px;
    pointer-events: none;
    display: none;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    transform: translate(calc(-1 * var(--gx, 0px)), calc(-1 * var(--gy, 0px)));
    left: 0;
    top: 0;
}

html.gesture-cursor-active,
html.gesture-cursor-active * {
    cursor: none !important;
}

.gesture-fist-hud {
    position: fixed;
    width: 290px;
    left: 50%;
    bottom: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    min-width: 220px;
    max-width: 90vw;
    padding: 10px 14px;
    background: #fff;
    border: 3px solid #000;
    border-radius: 10px;
    color: #000;
    font-family: Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    pointer-events: none;
}

.gesture-fist-hud-label {
    margin-bottom: 8px;
}

.gesture-fist-hud-bar {
    height: 6px;
    border: 1px solid #000;
    border-radius: 3px;
    background: #fff;
    overflow: hidden;
}

.gesture-fist-hud-fill {
    height: 100%;
    width: 0%;
    background: #000;
}

body {
    cursor: var(--cursor-default);
    background-color: #f8f8f8;
    text-align: center;
    justify-items: center;
    align-content: center;
    align-items: center;
    background-repeat: no-repeat;
    padding-bottom: 150px;
    padding-top: 125px;
}

a, button {
    cursor: var(--cursor-pointer);
}

footer {
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 50px;
}

h1 {
    color: rgba(0, 0, 0, 0.5);
    font-size: 20px;
    font-style: italic;
    font-family: Helvetica;
    text-align: center;
}

h3 {
    color: rgb(0, 0, 0);
    font-size: 25px;
    font-family: Arial, Helvetica, sans-serif;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

h4  {
    color: rgb(0, 0, 0);
    font-size: 16px;
    font-style: Bold;
    font-family: Helvetica;
    text-align: center;
}

h4:hover {
    color: rgb(25, 144, 255);
}

p {
    font-size: 20px;
    font-family: Arial, Helvetica, sans-serif;
    text-align: justify;
    padding: 10px;
}

a {
    color: rgb(177, 11, 11);
    text-decoration: none;
    font-size: 30px;
}

a:hover {
    color: rgb(123, 1, 1);
}

.selector {
    display: grid;
    width: 95%;
    padding: auto;
    margin: 30px auto;
    grid-template-columns: repeat(auto-fill, minmax(200px, 500px));
    justify-content: center;
    align-content: center;
    align-items: center;
    text-align: center;
    gap: 20px 20px;
}

.topbar {
    background-image: url('./media/nickleoutwebsitebanner.jpg');
    background-size:cover;
    background-repeat: no-repeat;
    background-position: center;
    width: 100%;
    height: 400px;
    margin: -190px 0 0 0;
}

#galleryheader {
    background-image: url('./media/VGtransp.png');
    background-color: #f8f8f8f8;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    width: 30%;
    aspect-ratio: 6 / 1;
    margin: 25px auto;
    position: fixed;
    top: 3%;
    left: 35%;
    transform: translateX(-50%);
    z-index: 1000;
    box-shadow: 0 0 30px #f8f8f8d0, 0 0 50px #f8f8f8c4, 0 0 75px #f8f8f8a8;
    border-radius: 25px;
    animation: gentle-float 4s ease-in-out infinite;
}

/*
.desktop {
    border: 2px solid red;
}
*/

/*taskbar icons*/

.taskbar {
    overflow: hidden;
    box-sizing: border-box;
    position: fixed;
    bottom: 2%;
    left: 50%;
    transform: translateX(-50%);
    width: 206.25px;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgb(233, 233, 233);
    box-shadow: 6px 4.5px 6.75px rgba(170, 170, 170, 0.5);
    border: 1px solid rgb(150, 150, 150);
    border-radius: 7.5px;
    padding: 7.5px 9px;
    z-index: 2100;
    transition: all 0.5s ease;
}

/* Kill the inline-anchor descender gap so linked buttons (#back, #top, #ig)
   share the same vertical center as bare taskbar buttons (#search-toggle). */
.taskbar > a {
    display: flex;
    align-items: center;
    line-height: 0;
}

.taskbar.expanded {
    width: 483.75px;
}

/* image tools panel*/

.imgTools {
    display: none;
    position: fixed;
    box-sizing: border-box;
    height: 0;
    padding: 8px 12px 18px;
    background-color: rgb(233, 233, 233);
    box-shadow: 8px 6px 9px rgba(170, 170, 170, 0.5);
    border: 1px solid rgb(150, 150, 150);
    border-bottom: 0px;
    z-index: 2001;
    overflow: hidden;
    opacity: 0;
    transform: translateX(-50%);
    transition: height 0.5s ease, opacity 0.5s ease;
}

.imgTools.overlay-visible {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.imgTools.visible {
    opacity: 1;
}

.imgInfo {
    display: none;
    position: fixed;
    box-sizing: border-box;
    height: 0;
    padding: 4px 12px 18px;
    background-color: rgb(233, 233, 233);
    box-shadow: 8px 6px 9px rgba(170, 170, 170, 0.5);
    border: 1px solid rgb(150, 150, 150);
    border-bottom: none;
    border-radius: 0px;
    z-index: 2001;
    overflow: hidden;
    opacity: 0;
    transform: translateX(-50%);
    transition: height 0.5s ease, opacity 0.5s ease;
}

.imgInfo.overlay-visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

.imgInfo.visible {
    opacity: 1;
}

#imgInfoTitle {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    color: black;
    text-align: center;
}

#imgZoomOut,
#imgZoomIn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 3px solid rgb(170, 170, 170);
    border-style: outset;
    border-radius: 8px;
    background-color: rgb(233, 233, 233);
    color: black;
    font-size: 20px;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1;
    cursor: var(--cursor-pointer);
    display: flex;
    align-items: center;
    justify-content: center;
}

#imgZoomOut:hover,
#imgZoomIn:hover {
    border-style: inset;
}

#imgZoomOut:disabled,
#imgZoomIn:disabled {
    opacity: 0.4;
    border-style: outset;
    cursor: var(--cursor-default);
}

.imgZoomSlider {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    height: 32px;
    min-width: 0;
}

.imgZoomTicks {
    position: absolute;
    left: 9px;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 0;
}

.imgZoomTicks::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background-color: rgb(150, 150, 150);
    transform: translateY(-50%);
}

.imgZoomTicks span {
    position: relative;
    z-index: 1;
    width: 3px;
    height: 12px;
    background-color: rgb(150, 150, 150);
    border-radius: 1px;
}

#imgZoomRange {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    height: 32px;
    cursor: var(--cursor-pointer);
}

#imgZoomRange::-webkit-slider-runnable-track {
    height: 2px;
    background: transparent;
    border: none;
}

#imgZoomRange::-moz-range-track {
    height: 2px;
    background: transparent;
    border: none;
}

#imgZoomRange::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin-top: -8px;
    border: 3px solid rgb(170, 170, 170);
    border-style: outset;
    border-radius: 6px;
    background-color: rgb(233, 233, 233);
    cursor: var(--cursor-pointer);
}

#imgZoomRange::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 3px solid rgb(170, 170, 170);
    border-style: outset;
    border-radius: 6px;
    background-color: rgb(233, 233, 233);
    cursor: var(--cursor-pointer);
}

#imgZoomRange:active::-webkit-slider-thumb {
    border-style: inset;
}

#imgZoomRange:active::-moz-range-thumb {
    border-style: inset;
}

#img-tabs {
    display: flex;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    z-index: 2002;
    transform: translateX(-50%);
    transition: width 0.5s ease, opacity 0.5s ease;
}

#img-tabs.overlay-visible {
    opacity: 1;
    pointer-events: auto;
}

.img-tab {
    flex: 1;
    height: 50px;
    padding: 0;
    border: 1px solid rgb(150, 150, 150);
    border-bottom: none;
    background-color: rgb(233, 233, 233);
    color: rgb(80, 80, 80);
    font-size: 25px;
    font-weight: bold;
    line-height: 1;
    cursor: var(--cursor-pointer);
    display: flex;
    align-items: center;
    justify-content: center;
}

#img-tools-toggle {
    border-radius: 10px 0 0 0;
}

#img-info-toggle {
    border-radius: 0 10px 0 0;
    border-left: none;
}

#img-tools-toggle::before {
    content: "";
    display: block;
    width: 0.9em;
    height: 0.9em;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3Cpath d='M10.5 7.75v5.5'/%3E%3Cpath d='M7.75 10.5h5.5'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3Cpath d='M10.5 7.75v5.5'/%3E%3Cpath d='M7.75 10.5h5.5'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
}

#img-info-toggle::before {
    content: "\24D8";
    display: block;
    transform: translateY(-5px);
}

.img-tab:hover {
    background-color: rgb(220, 220, 220);
}

.img-tab.active {
    background-color: rgb(210, 210, 210);
}

#ig {
    display: none;
    width:auto;
    height: 93.75px;
    border: 3px solid rgb(170, 170, 170);
    border-style: outset;
    border-radius: 7.5px;
    background-image: url('./media/firmanewnickleout.png');
    background-size: contain;
    background-position: center;
    aspect-ratio: 1;
}

#ig:hover {
    border-style: inset;
}

/* Keep taskbar buttons at their natural size so the bar can hug them and
   cleanly clip the hidden nav arrows (instead of flex-shrinking them). */
#back,
#top,
.mobile-nav-button {
    flex-shrink: 0;
}

#back {
    width:187.5px;
    height: 93.75px;
    background-image: url(./media/arrow_back.png);
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: 35% center;
    border: 3px solid rgb(170, 170, 170);
    border-style: outset;
    border-radius: 7.5px;
    aspect-ratio: 2;
    animation: all 0.5s ease;
}

#back:hover {
    border-style: inset;
}

#top {
    width:auto;
    height: 93.75px;
    border: 3px solid rgb(170, 170, 170);
    border-style: outset;
    border-radius: 7.5px;
    background-image: url('./media/arrow_up.png');
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center;
    aspect-ratio: 1;
    animation: fadeInSlideUp 0.5s ease;
    
}

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#top:hover {
    border-style: inset;
}

/* Gallery search (virtgallery_pics taskbar + overlay) */
.taskbar.with-search {
    width: 307.5px;
    gap: 6px;
}

#search-toggle {
    flex-shrink: 0;
    order: 5;
    box-sizing: border-box;
    width: auto;
    height: 93.75px;
    aspect-ratio: 1;
    padding: 0;
    margin: 0;
    border: 3px solid rgb(170, 170, 170);
    border-style: outset;
    border-radius: 7.5px;
    background-color: rgb(233,233,233);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cline x1='15.5' y1='15.5' x2='21' y2='21'/%3E%3C/svg%3E");
    background-size: 55%;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}

#search-toggle:hover {
    border-style: inset;
    background-color: rgb(209, 209, 209);
}

.gallery-search-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2150;
    background: transparent;
}

.gallery-search-backdrop.open {
    display: block;
}

#gallery-search-overlay {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    width: 50vw;
    max-width: 720px;
    height: auto;
    padding: 15px;
    gap: 15px;
    z-index: 2200;
    background-color: rgb(233, 233, 233);
    border: 4px solid rgb(170, 170, 170);
    border-style: outset;
    border-radius: 10px;
}

#gallery-search-overlay.open {
    display: flex;
}

#gallery-search-input {
    flex: 1;
    box-sizing: border-box;
    height: 72px;
    min-width: 0;
    padding: 0 18px;
    font-size: 28px;
    font-family: Arial, Helvetica, sans-serif;
    color: #111;
    background-color: #fff;
    border: 4px solid rgb(170, 170, 170);
    border-style: inset;
    border-radius: 10px;
    outline: none;
}

#gallery-search-submit {
    flex-shrink: 0;
    box-sizing: border-box;
    width: 72px;
    height: 72px;
    padding: 0;
    border: 4px solid rgb(170, 170, 170);
    border-style: outset;
    border-radius: 10px;
    background-color: rgb(233, 233, 233);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E");
    background-size: 55%;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}

#gallery-search-submit:hover {
    border-style: inset;
}

/* Mobile navigation buttons */
.mobile-nav-button {
    width: auto;
    height: 93.75px;
    border: 3px solid rgb(170, 170, 170);
    border-style: outset;
    border-radius: 7.5px;
    background-color: rgb(233, 233, 233);
    color: black;
    font-size: 36px;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    z-index: 999;
    aspect-ratio: 1;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: scaleX(0);
    transform-origin: left-bottom;
}

.mobile-nav-button:hover {
    border-style: inset;
}

#mobile-prev-button {
    order: -1;
}

#mobile-prev-button.visible {
    opacity: 1;
    pointer-events: auto;
    animation: appear 0.4s ease;
    transform: scaleX(1);
    position: relative;
    overflow: hidden;
}

#mobile-prev-button.visible::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./media/arrow_up.png');
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center;
    transform: rotate(-90deg);
    z-index: -1;
}

#mobile-next-button {
    order: 10;
    align-self: center;
}

#mobile-next-button.visible {
    opacity: 1;
    pointer-events: auto;
    animation: appear 0.4s ease;
    transform: scaleX(1);
    position: relative;
    overflow: hidden;
    align-self: center;
}

#mobile-next-button.visible::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./media/arrow_up.png');
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center;
    transform: rotate(90deg);
    z-index: -1;
}

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

.folder_container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: auto;
}

.folder_container:hover {
    background-color: aliceblue;
    outline: 2px solid rgb(154, 210, 255);
}

.folder_name {
    font-size: 32px;
    font-style: normal;
    color: rgb(0, 0, 0);
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    justify-content: center;
    margin: 10px auto;
    font-weight: bold;
}

#pics_container {
    width: 30%;
    position: fixed;
    left: 15%;
    top: 16%;   
}

#vids_container {
    width: 30%;
    position: fixed;
    top: 65%;
    right: 15%;
}

#highlights_container {
    width: 30%;
    position: fixed;
    top: 41%;
    left: 30%;
}

#postcards_container {
    width: 30%;
    position: fixed;
    top: 60%;
    right: 12%;
}

#analog_container {
    width: 30%;
    position: fixed;
    top: 45%;
    left: 10%;
}

#greece_container {
    width: 30%;
    position: fixed;
    top: 23%;
    left: 45%;
}

#folder_postcards_img, #folder_analog_img, #folder_greece_img, #folder_pics, #folder_vids, #folder_highlights {
    width: 100%;
}

#filmgold {
    width: 25%;
    position: absolute;
    top: 20%;
    left: 32%;
    transition: transform 0.3s ease;
}

#filmgold:hover {
    transform: scale(1.2);
}

#filmportra4 {
    width: 25%;
    position: absolute;
    top: 30%;
    right: 7%;
    transition: transform 0.3s ease;
}

#filmportra4:hover {
    transform: scale(1.2);
}

#filmultramax {
    width: 25%;
    position: absolute;
    top: 35%;
    left: 10%;
    transition: transform 0.3s ease;
}

#filmultramax:hover {
    transform: scale(1.2);
}

#filmsuperia {
    width: 25%;
    position: absolute;
    top: 42%;
    left: 40%;
    transition: transform 0.3s ease;
}

#filmsuperia:hover {
    transform: scale(1.2);
}

#filmtmax {
    width: 25%;
    position: absolute;
    top: 55%;
    left: 75%;
    transition: transform 0.3s ease;
}

#filmtmax:hover {
    transform: scale(1.2);
}

#filmretro {
    width: 30%;
    position: absolute;
    top: 60%;
    left: 40%;
    transition: transform 0.3s ease;
}

#filmretro:hover {
    /*background-color: aliceblue;
    border: 2px solid rgb(154, 210, 255);*/
    transform: scale(1.2);
}

#filmclrplus {
    width: 25%;
    position: absolute;
    top: 70%;
    left: 10%;
    transition: transform 0.3s ease;
}

#filmclrplus:hover {
    transform: scale(1.2);
}

#collection {
    font-family: Helvetica, sans-serif;
    font-size: 30pt;
    /* font-style: oblique; */
    font-weight:600;
    /* text-decoration: underline 3px; */
    color: black;
    margin-top: 10px;
}

.showcase {
    width: auto;
    top: 0;
    padding: 0px;
    text-align: center;
}

#img {
    height: 0px;
    max-width: 95%;
    transition: height 0.3s ease;
}

#img[src]:not([src=""]) {
    width: auto;
    height: 400px;
    object-fit: contain;
}

#name {
    font-family: Arial, Helvetica, sans-serif;
    font-style: italic;
    color: black;
}

.detaildisplay {
    display: none;
}

.imagedisplay {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    text-align: center;
    align-items: center;
    justify-items: center;
    padding: 0 20px;
}

#thumbnail {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    margin: 0;
    /* border: 2px solid black; */
    transition: transform 0.4s ease;
}

#thumbnail:hover {
    /* border: 5px solid rgb(154, 210, 255); */
    transform: scale(1.05);
}

.galleryvid {
    text-align: center;
    border: 2px solid rgb(154, 210, 255);
    border-radius: 20px;
    padding: 20px 0;
    margin: 20px 0;
}

button {
    font-size: 20px;
    font-weight: bold; 
    border:2px solid rgb(0, 0, 0);
    border-radius: 10px;
    width: 200px;
    height: 50px;
}

button:hover {
    background-color: rgb(209, 209, 209);
}

iframe {
    width: 95%;
    border-radius: 10px;
}

.virtgalleryselector {
    height: auto;
    min-height: 50vh;
    margin: 50px auto;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.marchive {
    border: 3px solid black;
    border-radius: 20px;
    background-image: url('./logos/marchivebanner.png');
    background-size: 90%;
    background-repeat: no-repeat;
    background-position: center;
    height: 300px;
    width: 100%;
}

.marchive:hover {
    border: 3px solid rgb(245, 227, 25);
    background-image: url('./logos/marchivehover.png');
}

.twistdiv {
    background-image: url('./logos/possibletwistlogo.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    height: 500px;
    width: 100%;
    grid-area: 2 / 2 / 3 / 3;
    text-align: center;
    border: 3px solid rgb(0, 0, 0);
    border-radius: 20px;
    margin: 20px auto;
    padding: auto;
}

.twistdiv:hover {
    background-image: url('./logos/twistlogoV2.png');
    border: 3px solid rgb(177, 11, 11);
}

.gallerydiv {
    background-image: url('./logos/VGSqr.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    height: 300px;
    width: 100%;
    grid-area: 1 / 1 / 2 / 2;
    text-align: center;
    border: 3px solid rgb(0, 0, 0);
    border-radius: 20px;
    margin: 20px auto;
    padding: 0; 
}

.gallerydiv:hover {
    background-image: url('./logos/VGSqr2.png');
    border: 3px solid rgb(151, 198, 214);
}

.twist {
    width: 400px;
    height: 400px;
    border-radius: 20px;
}

.twistback {
    background-color: #e0e0e0;
    margin-top: 100px;
    margin-bottom: 100px;
}

.centered {
    text-align: center;
}


.videos {
    text-align: center;
    width: 75%;
    margin: 0 auto;
    padding: 4px 0;
}

#VidTitle {
    display: none;
}

/* Mobile and tablet layout - keep videos centered */
@media only screen and (max-width: 1080px) {

    #galleryheader {
        width: 60%;
        left: 20%;
        top: 3%;
    }

    .videos {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .video-row {
        width: 100%;
        display: block;
        position: relative;
    }

    .galleryvid {
        width: 100%;
        max-width: 720px;
        margin: 20px 0;
        position: relative;
    }

    .video-description {
        display: block;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
        background-color: rgba(154, 210, 255, 0.1);
        border: 2px solid rgb(154, 210, 255);
        border-radius: 10px;
        margin: 10px 0 20px 0;
        padding: 0 20px;
        box-sizing: border-box;
        width: 100%;
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
    }

    .video-description.mobile-expanded {
        max-height: 400px;
        opacity: 1;
        padding: 20px;
    }

    .video-description h3 {
        font-size: 28px;
        margin: 0;
        color: rgb(0, 0, 0);
    }

    .video-description p {
        font-size: 20px;
        line-height: 1.4;
        margin: 0 0 10px 0;
        color: rgb(50, 50, 50);
    }

    .mobile-description-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 95%;
        max-width: 720px;
        padding: 12px;
        background-color: rgba(154, 210, 255, 0.8);
        border: 2px solid rgb(154, 210, 255);
        border-radius: 10px;
        margin: 10px 2.5%;
        cursor: var(--cursor-pointer);
        font-family: Arial, Helvetica, sans-serif;
        font-size: 20px;
        font-weight: bold;
        color: rgb(0, 0, 0);
        transition: background-color 0.3s ease, transform 0.2s ease;
        box-sizing: border-box;
    }

    .mobile-description-toggle:hover {
        background-color: rgba(154, 210, 255, 1);
        transform: translateY(-1px);
    }

    .mobile-description-toggle:active {
        transform: translateY(0);
    }

    .toggle-text {
        font-size: 14px;
    }

    .toggle-icon {
        font-size: 12px;
        transition: transform 0.3s ease;
    }

    #VidTitle {
        display: none;
    }
}

#spacer {
    height: 100px;
}

#pics {
    border: 2px solid black;
    border-radius: 5px;
    background-image: url(./logos/Pictures.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    height: 300px;
    aspect-ratio: 1.5;
    margin: 20px;
}

#pics:hover {
    border: 3px solid rgb(154, 210, 255);
    box-shadow: 10px 5px 10px rgb(154, 210, 255);
    background-image: url(./logos/PicturesHvr.png);
}

#vids {
    border: 2px solid black;
    border-radius: 5px;
    background-image: url(./logos/Videos.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    height: 300px;
    aspect-ratio: 1.5;
    margin: 20px;
}

#vids:hover {
    border: 3px solid rgb(154, 210, 255);
    box-shadow: 10px 5px 10px rgb(154, 210, 255);
    background-image: url(./logos/VideosHvr.png);
}

#piccollection {
    border: 2px solid black;
    border-radius: 5px;
    /* background-image: url(./logos/Pictures.png); */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    height: 200px;
    aspect-ratio: 1.5;
    margin: 20px;
}

#piccollection:hover {
    border: 3px solid rgb(154, 210, 255);
    box-shadow: 10px 5px 10px rgb(154, 210, 255);
    /*background-image: url(./logos/VideosHvr.png);*/
}

#muchotexto {
    width: 90%;
    text-align: center;
    margin: 100px auto;
}

#twistheader {
    background-image: url('./media/twistHandwritten.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 90%;
    height: 150px;
    margin: 0px auto;
    margin-bottom: 20px;
    margin-top: -150px;
}

#twistfonts {
    border: 0px solid rgb(177, 11, 11);
    width: 100%;
    margin: auto;
}

#twistrender {
    border: 0px solid rgb(177, 11, 11);
    width: 100%;
    margin: 0;
}

#twistwb {
    border: 2px solid rgb(177, 11, 11);
    background-color: rgb(255, 255, 255);
    width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: 2;
    grid-template-rows: 3;
    gap: 20px;
    padding: 20px 0px;
}
.twistvid {
    width: 100%;
    height: auto;
    margin: 0;
    padding: 10px;
    overflow: hidden;
}

.twistvid iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.postit {
    border: 1px solid rgb(0, 0, 0);
    border-radius: 2px;
    width: 45%;
    margin: 0 20px;
    position: relative;
    top: 0;
    filter: grayscale(100%);
    /*transition: all 0.5s ease;*/
}

.postit:hover {
    border: 2px solid rgb(177, 11, 11);
    cursor: var(--cursor-pointer);
}

.postit#CAfragment1 {
    rotate: 6deg;
    right: 25%;
}

.postit#CAfragment2 {
    rotate: -3deg;
    left: 25%;
}


/*
#recap22 {
    text-align: center;
    border: 2px solid rgb(154, 210, 255);
    border-radius: 20px;
    padding-bottom: 20px;
    margin: 20px 0;
}

#Almeria23 {
    text-align: center;
    border: 2px solid rgb(154, 210, 255);
    border-radius: 20px;
    padding-bottom: 20px;
    margin: 20px 0;
}

#LilVolcano {
    text-align: center;
    border: 2px solid rgb(154, 210, 255);
    border-radius: 20px;
    padding-bottom: 20px;
    margin: 20px 0;
} */

#prefoot {
    text-align: center;
    margin: 40px auto;
}

@keyframes move-background {
    from {
        background-position: 50% 0%;
    }
    to {
        background-position: 50% 100%;
    }
}

@keyframes gentle-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

#marchiveheader {
    height: 200px;
    border: 5px solid rgb(0, 0, 0);
    background-image: url(./logos/marchivebanner.png);
    background-size:15%;
    background-repeat: repeat;
    background-position: center;
}

#marchiveheader:hover {
    animation: 7s linear move-background;
}

#marchivesubmissions {
    width: 80%;
    border: 3px solid black;
    padding: 20px;
    padding-bottom: 40px;
    margin: 100px auto;
}

#sendsubmission {
    height: 40px;
    font-size: 12pt;
    background-color: rgb(240, 240, 240);
    border: 1px solid black;
    border-radius: 15px;
}

#sendsubmission:hover {
    border: 2px solid rgb(245, 227, 25);
    color: rgb(245, 227, 25);
    background-color: rgb(252, 255, 170);
}

#archivepics {
    display: grid;
    gap: 30px;
    margin: 100px 10px;
    grid-template-columns: repeat(auto-fill, 30%);
    grid-template-rows: auto;
    align-content: center;
    align-items: center;
    justify-content: center;
}

#mpic {
    width: 50%;
    border: 3px solid rgb(0, 0, 0);
    filter: grayscale(60%);
}

#mpic:hover {
    filter: grayscale(0%);
}

/* check if the screen size is at least 1080px */
@media only screen and (min-width: 1080px) {


    .detaildisplay {
        display:none;
    }
    #thumbnail:hover {
        border: 2px black solid;
    }

    #filmgold {
        width: 15%;
        position: absolute;
        top: 25%;
        left: 52%;
    }
    
    #filmportra4 {
        width: 15%;
        position: absolute;
        top: 27%;
        right: 7%;
    }
    
    #filmultramax {
        width: 15%;
        position: absolute;
        top: 30%;
        left: 10%;
    }
    
    #filmsuperia {
        width: 15%;
        position: absolute;
        top: 25%;
        left: 30%;
    }
    
    #filmtmax {
        width: 15%;
        position: absolute;
        top: 50%;
        left: 65%;
    }
    
    #filmretro {
        width: 20%;
        position: absolute;
        top: 45%;
        left: 35%;
    }

    #filmclrplus {
        width: 16%;
        position: absolute;
        top: 65%;
        left: 18%;
        transition: transform 0.3s ease;
    }
    
    #filmclrplus:hover {
        transform: scale(1.2);
    }
    
    .videos {
        width: 100%;
        margin: 0 auto;
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .video-row {
        width: 100%;
        display: flex;
        align-items: stretch;
        margin: 40px 0;
        position: relative;
        gap: 30px;
    }

    .galleryvid {
        width: 60%;
        margin: 0;
    }

    .video-description {
        width: 30%;
        background-color: rgba(154, 210, 255, 0.1);
        border: 2px solid rgb(154, 210, 255);
        border-radius: 20px;
        padding: 20px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .video-description h4 {
        font-size: 24px;
        font-weight: bold;
        margin: 0 0 15px 0;
        color: rgb(0, 0, 0);
    }

    .video-description p {
        font-size: 18px;
        line-height: 1.4;
        margin: 0;
        color: rgb(50, 50, 50);
    }

    /* Alternating positioning for desktop */
    .video-row:nth-of-type(odd) {
        justify-content: center;
        margin: 40px auto;
        width: 90%;
    }

    .video-row:nth-of-type(odd) .galleryvid {
        order: 1;
    }

    .video-row:nth-of-type(odd) .video-description {
        order: 2;
    }

    .video-row:nth-of-type(even) {
        justify-content: center;
        margin: 40px auto;
        width: 90%;
    }

    .video-row:nth-of-type(even) .galleryvid {
        order: 2;
    }

    .video-row:nth-of-type(even) .video-description {
        order: 1;
    }

    .mobile-description-toggle {
        display: none;
    }

    .folder_name {
        font-size: 24px;
    }

    #pics_container {
        width: 15%;
        top: 20%;
        left: 40%;
    }

    #vids_container {
        width: 15%;
        top: 45%;
        right: 15%;
    }

    #highlights_container {
        width: 15%;
        top: 55%;
        left: 12%;
    }

    #postcards_container {
        width: 15%;
        top: 55%;
        right: 15%;
    }
    
    #analog_container {
        width: 15%;
        top: 45%;
        left: 10%;
    }
    
    #greece_container {
        width: 15%;
        top: 33%;
        left: 40%;
    }

    #image-zoom-viewport,
    #image-zoom-overlay > #image-zoom-content {
        height: 65%;
    }
}

/* Dynamic Carousel Styles */
.carousel-container {
    width: 100%;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin: 50px 0;
    box-sizing: border-box;
}

.carousel {
    display: flex;
    align-items: center;
    gap: -180px;
    padding: 40px;
}

.carousel-item {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(240, 240, 240, 1));
    border: 3px solid rgb(177, 11, 11);
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.4s ease 50ms;
    position: relative;
    z-index: 1;
    margin-left: -140px;
    box-shadow: 0 6px 20px rgba(177, 11, 11, 0.2);
    transform: rotate(-2deg);
}

.carousel-item:nth-child(2n) {
    transform: rotate(1deg);
}

.carousel-item:nth-child(3n) {
    transform: rotate(-1deg);
}

.carousel-item:nth-child(4n) {
    transform: rotate(2deg);
}

.carousel-item:first-child {
    margin-left: 0;
}

/* Increasing z-index for consistent overlap */
.carousel-item:nth-child(1) { z-index: 1; }
.carousel-item:nth-child(2) { z-index: 2; }
.carousel-item:nth-child(3) { z-index: 3; }
.carousel-item:nth-child(4) { z-index: 4; }
.carousel-item:nth-child(5) { z-index: 5; }
.carousel-item:nth-child(6) { z-index: 6; }
.carousel-item:nth-child(7) { z-index: 7; }
.carousel-item:nth-child(8) { z-index: 8; }
.carousel-item:nth-child(9) { z-index: 9; }
.carousel-item:nth-child(10) { z-index: 10; }
.carousel-item:nth-child(11) { z-index: 11; }

.carousel-item:hover {
    transform: scale(1.15) translateY(-15px) rotate(0deg);
    /*z-index: 10;*/
    margin-left: 40px;
    margin-right: 40px;
    box-shadow: 0 12px 40px rgba(177, 11, 11, 0.4);
    border-color: rgb(150, 8, 8);
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(250, 250, 250, 1));
}

.carousel-item:hover + .carousel-item {
    margin-left: 20px;
}

/* Selected item styles */
.carousel.has-selection .carousel-item {
    margin-left: -160px;
    transition: all 0.6s ease;
}

.carousel.has-selection .carousel-item:first-child {
    margin-left: 0;
}

.carousel.has-selection .carousel-item:not(.selected) {
    transform: scale(0.85) rotate(-3deg);
    opacity: 1;
    /*z-index: 1;*/
}

.carousel-item.selected {
    transform: scale(1.5) translateY(-10px) rotate(0deg) !important;
    /*z-index: 1005 !important;*/
    margin-left: 60px !important;
    margin-right: 60px !important;
    box-shadow: 0 15px 25px rgba(177, 11, 11, 0.5) !important;
    border-color: rgb(150, 8, 8) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(250, 250, 250, 1)) !important;
}

.carousel-item.selected + .carousel-item {
    margin-left: 40px;
}

.item-content {
    text-align: center;
    padding: 20px 5px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.item-content h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: bold;
    color: rgb(177, 11, 11);
}

.item-content p {
    margin: 0;
    font-size: 14px;
    color: rgb(100, 100, 100);
    text-align: center;
}

/* Audio component styling */
.item-content audio {
    width: 90%;
    max-width: 90%;
}

#ipodtouch {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease-in-out;
}

#ipodtouch:hover {
    transform: scale(1.05);
}

/*mobile*/
@media only screen and (max-width: 1080px) {

    #image-zoom-overlay {
        /* Mobile: push image further down */
        padding-top: 20% !important;
        padding-bottom: 8%;
        width: 100%;
    }

    /* Make spotlight image taller on mobile */
    #image-zoom-viewport,
    #image-zoom-overlay > #image-zoom-content {
        max-height: 67%;
        max-width: 100%;
    }
 
    .carousel-container {
        height: auto;
        margin: 30px 0;
        padding: 20px;
        overflow: visible;
        scroll-behavior: smooth;
    }
    .carousel {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 20px;
        padding: 20px 0;
        width: 100%;
        align-items: center;
    }
    .carousel-item {
        width: 50%;
        height: auto;
        aspect-ratio: 1;
        margin-left: 0;
        margin-top: -100px;
        flex: 0 0 auto;
        transform: rotate(-1deg);
    }
    .carousel-item:nth-child(2n) {
        transform: rotate(1deg);
    }
    .carousel-item:nth-child(3n) {
        transform: rotate(-0.5deg);
    }
    .carousel-item:nth-child(4n) {
        transform: rotate(1.5deg);
    }
    .carousel-item:first-child {
        margin-top: 0;
        margin-left: 0;
    }
    .carousel-item:hover {
        transform: scale(1.05) rotate(0deg);
        margin-top: 0;
        margin-bottom: 0;
        margin-left: 0;
        margin-right: 0;
    }
    .carousel-item:hover + .carousel-item {
        margin-top: 0;
        margin-left: 0;
    }
    .item-content {
        padding: 15px;
    }
    .item-content h4 {
        font-size: 16px;
    }
    .item-content p {
        font-size: 12px;
    }
    /* Mobile selected item styles */
    .carousel.has-selection .carousel-item {
        margin-top: 0;
        margin-left: 0;
        transition: all 0.6s ease;
    }
    .carousel.has-selection .carousel-item:first-child {
        margin-top: 0;
        margin-left: 0;
    }
    .carousel.has-selection .carousel-item:not(.selected) {
        transform: scale(0.9) rotate(-1deg);
        opacity: 1;
    }
    .carousel-item.selected {
        transform: scale(1.4) rotate(0deg) !important;
        /*z-index: 1005 !important;*/
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .carousel-item.selected + .carousel-item {
        margin-top: 0;
        margin-left: 0;
    }
}

/* Image zoom overlay */
#image-zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    justify-content: center;
    align-items: flex-start; /* start from top so image isn't blocked by taskbar */
    padding-top: 50px; /* give space for fixed header */
    z-index: 2000;
    cursor: var(--cursor-pointer);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-in-out;
    display: flex; /* keep flex for alignment */
}

#image-zoom-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

#image-zoom-viewport {
    overflow: auto;
    max-width: 90%;
    cursor: var(--cursor-default);
    transform: scale(0.8);
    transition: transform 0.4s ease-in-out;
    flex-shrink: 0;
}

#image-zoom-overlay.visible #image-zoom-viewport {
    transform: scale(1);
}

#image-zoom-content {
    display: block;
    cursor: var(--cursor-default);
    width: auto;
    height: auto;
}

#image-zoom-viewport #image-zoom-content {
    max-width: none;
}

/* Fallback for pages without the viewport wrapper */
#image-zoom-overlay > #image-zoom-content {
    max-width: 90%;
    transform: scale(0.8);
    transition: transform 0.4s ease-in-out;
}

#image-zoom-overlay.visible > #image-zoom-content {
    transform: scale(1);
}

/* Mobile/tablet: larger, more tappable zoom controls */
@media only screen and (max-width: 1440px) {
    #imgZoomOut,
    #imgZoomIn {
        width: 38px;
        height: 38px;
        font-size: 22px;
    }

    .img-tab {
        height: 34px;
        font-size: 20px;
    }
}

/* Mobile: the taskbar is width-constrained to the viewport, so scale its
   buttons down with the screen. This keeps the whole nav set (including the
   prev/next arrows) inside the bar with side padding, while preserving each
   button's aspect ratio (nav/top 1:1, back 2:1).
   Folder/hub bars hug their visible controls (ColorPlus-scale 14vw buttons).
   Collection pages keep a fixed/JS width so hidden prev/next arrows stay clipped. */
@media only screen and (max-width: 700px) {
    .taskbar {
        box-sizing: border-box;
        /*gap: 5px;*/
        padding: 8px 12px;
        border-radius: 10px;
        box-shadow: 8px 6px 9px rgba(170, 170, 170, 0.5);
    }

    .taskbar:not(:has(.mobile-nav-button)),
    .taskbar.with-search {
        width: auto;
        max-width: calc(100vw - 24px);
    }

    #back,
    #top,
    #search-toggle,
    #ig,
    .mobile-nav-button {
        box-sizing: border-box;
        height: 14vw;
        border-width: 3px;
        border-radius: 10px;
    }

    #top,
    #search-toggle,
    #ig,
    .mobile-nav-button {
        width: 14vw;
    }

    .mobile-nav-button {
        font-size: 6vw;
    }

    .taskbar.with-search {
        gap: 5px;
    }

    #gallery-search-overlay {
        width: calc(100vw - 32px);
        max-width: none;
        height: auto;
        min-height: 75px;
        padding: 16px;
    }

    #gallery-search-input {
        height: 56px;
        font-size: 20px;
        border-width: 3px;
    }

    #gallery-search-submit {
        width: 56px;
        height: 56px;
        border-width: 3px;
    }

    #back {
        width: 28vw;
    }
}

/* Mobile/tablet: lift the taskbar (and the panels anchored to it) higher up
   from the bottom edge so it sits within comfortable thumb reach. */
@media only screen and (max-width: 1080px) {
    .taskbar {
        bottom: 8%;
    }
}

/* Navigation buttons for image gallery */
.nav-button {
    position: absolute;
    align-items: center;
    justify-content: center;
    align-content: center;
    height: 80px;
    width: 80px;
    /*  top: 50%; */
    /* transform: translateY(-50%); */
    background: rgba(255, 255, 255, 0);
    border: none;
    padding: 10px 20px;
    cursor: var(--cursor-pointer);
    color: white;
    font-size: 50px;
    font-weight: normal;
    font-family: Arial, Helvetica, sans-serif;
    z-index: 2001;
}

.nav-button:hover {
    background: rgba(150, 200, 255, 0.5);
    border: 2px solid rgb(154, 210, 255);
    border-radius: 10px;
}

#prev-button {
    display: none;
    left: 10%;
}

#next-button {
    display: none;
    right: 10%;
}

#prev-button.visible {
    display: block;
    left: 10%;
}

#next-button.visible {
    display: block;
    right: 10%;
}

/* File Viewer Styles */
.file-viewer-page {
    background-color: #f8f8f8;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.file-viewer {
    width: 60%;
    height: 50vh;
    margin: 20px auto 200px auto;
    /*padding: 20px;*/
    background-color: rgb(233, 233, 233);
    border: 1px solid rgb(150, 150, 150);
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(170, 170, 170, 0.5);
    z-index: 100;
}

.file-viewer-topbar {
    position: sticky;
    top: 0;
    height: 32px;
    background-color: rgba(200, 200, 200, 1);
    border-bottom: 1px solid rgb(150, 150, 150);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 6px;
    z-index: 1;
    /*transform: translateY(-20px);*/
}

.file-viewer-close {
    color: #222222;
    width: 36px;
    height: 32px;
    border: 2px outset rgb(150, 150, 150);
    border-radius: 0;
    font-size: 24px;
    text-decoration: none;
    line-height: 1;
    transition: color 0.2s ease;
}

.file-viewer-close:hover {
    /*color: #fff;*/
    border-style: inset;
}

.file-viewer-content {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: left;
    gap: 30px;
    padding: 40px;
}

.file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: var(--cursor-pointer);
    transition: transform 0.2s ease;
}

.file-item:hover {
    transform: scale(1.02);
}

.file-icon {
    width: 150px;
    height: 150px;
    background-color: rgba(200, 200, 200, 1);
    border: 1px solid rgb(150, 150, 150);
    border-radius: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.file-icon svg {
    width: 80px;
    height: 80px;
    color: #222222;
}

.file-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-name {
    color: #222222;
    font-size: 14px;
    font-family: Arial, sans-serif;
    text-align: center;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-viewer-content .file-viewer-folder-link {
    text-decoration: none;
    color: inherit;
    width: 200px;
}

.file-viewer-content .folder_container {
    width: min(200px, 40vw);
    cursor: var(--cursor-pointer);
}

.file-viewer-content .folder_container img {
    width: 100%;
    height: auto;
    display: flex;
}

.file-viewer-content .folder_icon-wrap {
    width: 100%;
    aspect-ratio: 600 / 506;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-viewer-content .folder_container .text-file-icon {
    height: 100%;
    width: auto;
    max-width: 100%;
    display: block;
    transform: translateX(6%);
}

.file-viewer-content .folder_name {
    font-size: 16px;
    margin: 10px auto 0;
    line-height: 1.2;
}

.file-viewer-content .file-viewer-text-link {
    text-decoration: none;
    color: inherit;
    width: 200px;
}

.file-viewer-content .file-viewer-text-link .folder_container {
    width: min(200px, 40vw);
    cursor: var(--cursor-pointer);
}

.text-viewer {
    position: fixed;
    top: 50%;
    left: calc(50% + min(32vw, 280px));
    transform: translate(-50%, -50%);
    display: none;
    flex-direction: column;
    width: min(32vw, 420px);
    height: 72vh;
    margin: 0;
    z-index: 101;
}

.text-viewer .text-viewer-topbar {
    cursor: var(--cursor-grab);
    user-select: none;
}

.text-viewer .text-viewer-topbar:active,
.text-viewer .text-viewer-topbar.is-dragging {
    cursor: var(--cursor-grabbing);
}

.text-viewer .file-viewer-close {
    cursor: var(--cursor-pointer);
}

.text-viewer-content {
    flex: 1;
    overflow-y: auto;
    background-color: #ffffff;
    font-family: "Courier New", Courier, monospace;
    font-size: clamp(14px, 1.6vw, 16px);
    line-height: 1.6;
    color: #000000;
    padding: 24px 28px;
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
}

.text-viewer-content p {
    margin: 0 0 1em;
}

.text-viewer-content p:last-child {
    margin-bottom: 0;
}

.signature-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.signature-img {
    filter: invert(1);
    max-width: 300px;
    width: 40%;
    height: auto;
}

/* File Viewer Mobile Styles */
@media (max-width: 1080px) {
    .folder_name {
        font-size: 20px;
    }
    .file-viewer {
        width: 90%;
        margin: 20px auto 50% auto;
        overflow: scroll;
    }

    .file-viewer-content {
        justify-content: none;
        padding: 30px 20px;
        gap: 60px;
        overflow: scroll;
    }

    .file-viewer-topbar {
        height: 7vw;
        padding: 0 1vw;
    }
    
    .file-viewer-close {
        width: 5vw;
        height: 5vw;
    }

    .file-viewer-content .folder_container {
        width: min(250px, 40vw);
        cursor: var(--cursor-pointer);
    }

    .file-viewer-content .folder_name {
        font-size: 25px;
        margin: 10px auto 0;
        line-height: 1.2;
    }

    .file-icon {
        width: 45vw;
        height: 45vw;
    }

    .file-icon svg {
        width: 75px;
        height: 75px;
    }

    .file-name {
        font-size: 5vw;
        max-width: 30vw;
    }

    .text-viewer {
        left: 50%;
        top: calc(50% - 8vh);
        width: min(88vw, 420px);
        height: min(72vh, 640px);
        overflow: hidden;
    }

    .text-viewer-content {
        padding: 20px 18px;
        font-size: clamp(15px, 3.8vw, 18px);
        line-height: 1.65;
    }

    .file-viewer-content .file-viewer-text-link .folder_container {
        width: min(250px, 40vw);
    }
}

body.twistback {
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.twist-hero {
    height: calc(60vh);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

#twistheader {
    margin-top: 50px;
}

.music-player {
    --player-width: 300px;
    width: var(--player-width);
    max-width: 100%;
    aspect-ratio: 3 / 5;
    background: #ffffff;
    border: 3px solid rgb(177, 11, 11);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Percentage padding would resolve against the hero's width, not the player's */
    padding: calc(var(--player-width) * 0.06) 0;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
    gap: calc(var(--player-width) * 0.04);
}

.player-screen {
    width: 88%;
    aspect-ratio: 4 / 3;
    background: #e0e0e0;
    border-radius: 8px;
    border: 3px solid rgb(177, 11, 11);
    box-shadow:
        inset 0 3px 8px rgba(0, 0, 0, 0.6),
        inset 0 2px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.clip-selector {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.clip-selector svg {
    width: 80%;
    height: auto;
    aspect-ratio: 1;
    max-width: 100%;
}

.wheel-section {
    fill: transparent;
    stroke: rgb(177, 11, 11);
    stroke-width: 0;
    cursor: var(--cursor-pointer);
    transition: fill 0.15s ease;
}

.wheel-section:hover {
    fill: rgba(255, 255, 255, 0.05);
}

.ok {
    cursor: var(--cursor-pointer);
    transition: fill 0.15s ease;
}

.ok:hover {
    fill: rgba(177, 11, 11, 0.06);
    filter: url(#inset-shadow-default);
}

.clip-preview {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.cover {
    position: relative;
    top: 7.5%;
    aspect-ratio: 1;
    width: 50%;
}

.clip-title {
    position: relative;
    top: 2%;
    left: 0%;
    font-size: 20px;
    font-weight: 200;
    font-style: normal;
    color: #000;
    opacity: 0;
    overflow: scroll;
    user-select: none;
}

#screen-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    opacity: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 0.40; }
    50% { opacity: 1; }
}

.clip-preview.pulsing #screen-img,
.clip-preview.pulsing .clip-title {
    animation: pulse 1.8s ease-in-out infinite;
}

.clip-preview.selected #screen-img,
.clip-preview.selected .clip-title {
    opacity: 1;
    animation: none;
}

.wheel-section.selected {
    fill: rgba(255, 255, 255, 0.05);
}

.clip-viewer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.clip-viewer iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 5px;
}

@media only screen and (max-width: 1080px) {
    .twist-hero {
        height: auto;
        min-height: 65vh;
        padding: 30px 16px;
    }

    .music-player {
        /* Cap at viewport so phones don't clip a 600px player */
        --player-width: min(600px, calc(100vw - 48px));
    }
    .cover {
        width: 55%;
    }
    .clip-title {
        position: relative;
        top: 2%;
        left: 0%;
        font-size: clamp(18px, 5.5vw, 32px);
    }
    .wheel-section {
        stroke-width: 0.5;
        stroke: rgba(0, 0, 0);
    }
    #twistheader {
        margin-top: 70px;
    }

}