:root {
    --bg-color: #11151C;
    --text-color: #ffffff;
    --accent-color: #3b82f6;
    --font-family: 'Inter', sans-serif;

    /* Vibe GIF Controls */
    --vibe-scale: 1;
    --vibe-top: 50%;
    --vibe-left: 50%;

    /* Vibe Overlay Controls */
    --vibe-square-color: #3b82f6;
    --vibe-square-size: 50px;
    --vibe-square-top: 10px;
    --vibe-square-left: 10px;
    --vibe-square-opacity: 0.8;

    /* Image Holder Controls */
    --holder-scale: 1;
    --holder-top: 50%;
    --holder-left: 50%;
    --holder-size: 300px;

    /* EmptyTab Controls */
    --tab-content-width: 82%;
    --tab-content-height: 80%;
    --tab-content-top: 52%;
    --tab-content-left: 50%;
    --tab-content-bg: rgba(59, 130, 246, 0.1);
    /* To visualize the area */
    /* Drawing Containers Controls */
    --drawing-top: 50%;
    --drawing-left: 50%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    font-family: var(--font-family);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Image Layer */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('contents/websitelayout2.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    /* Optional: Slight overlay if the user wants the color to bleed through */
    /* opacity: 0.8; */
}

.my-room-tab-text {
    position: absolute;
    transform-origin: top left;
    top: 1.15rem;
    left: 8.75rem;
    font-family: "Jersey 10", sans-serif;
    font-weight: 400;
    font-size: 2.5rem;
    letter-spacing: 0.4rem;
    pointer-events: none;
    color: rgba(255, 255, 255, .5);
}

.about-me-text {
    position: absolute;
    transform-origin: top left;
    top: 21.9rem;
    left: 17.7rem;
    font-family: "Jersey 10", sans-serif;
    font-weight: 400;
    font-size: 2.5rem;
    letter-spacing: 0.4rem;
    pointer-events: none;
    color: rgb(156, 130, 105)
}

.burger {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 3;
    /* Very high to be on top of everything */
    pointer-events: none;
    transform: translate(-43%, 10%) scale(.125);
    opacity: 1;
    /* Subtle transparency for a better blend */
}

.christmas-lights {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99;
    /* Very high to be on top of everything */
    pointer-events: none;
    transform: translate(0%, -47.5%) scale(.35);
    opacity: 1;
    /* Subtle transparency for a better blend */
}

.christmas-lights-2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99;
    /* Very high to be on top of everything */
    pointer-events: none;
    transform: translate(35%, -47.5%) scale(.35);
    opacity: 1;
    /* Subtle transparency for a better blend */
}

.christmas-lights-3 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99;
    /* Very high to be on top of everything */
    pointer-events: none;
    transform: translate(-35%, -47.5%) scale(.35);
    opacity: 1;
    /* Subtle transparency for a better blend */
}

.christmas-lights img {
    width: 100%;
    height: auto;
    display: block;
}

#app {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.vibe-container {
    position: absolute;
    top: var(--vibe-top);
    left: var(--vibe-left);
    transform: translate(-96%, -86%) scale(.7);
    pointer-events: none;
    /* Allows clicks to pass through if needed */
    transition: all 0.3s ease;
    /* Smooth transitions when variables change */
}

.vibe-gif {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    display: block;
}

.vibe-overlay {
    position: absolute;
    top: var(--vibe-square-top);
    left: var(--vibe-square-left);
    width: var(--vibe-square-size);
    height: var(--vibe-square-size);
    aspect-ratio: 1 / 1;
    background-color: var(--bg-color);
    border-radius: 12px;
    transform: translate(1100%, 677%) scale(2, .23);
    /* Small rounding for a cleaner look */
    z-index: 2;
}

.silly-container {
    position: absolute;
    bottom: .5rem;
    right: 1.8rem;
    width: var(--holder-size);
    aspect-ratio: 1 / 1;
    transform: scale(.93, .75);

    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    /* Ensure image doesn't bleed out */
}

#silly-img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    /* transition: opacity 0.3s ease; */
    opacity: 1;
    /* Ensure visible by default when display is not none */
}

.image-holder::after {
    content: "Image Holder";
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: absolute;
    z-index: -1;
}

/* More robust way to hide placeholder when image is shown */
.image-holder:has(img:not([style*="display: none"]))::after {
    display: none;
}

.image-holder:has(img[style*="display: block"])::after {
    display: none;
}

.drawing-container {
    position: fixed;
    transform-origin: right top;
    top: 15rem;
    right: 2rem;
    transform: scale(.27);
}

.drawing-container h1 {
    text-align: center;
    font-family: "Jersey 10", sans-serif;
    font-size: 10rem;
    font-weight: 400;
    text-transform: uppercase;
    z-index: 1;
    /* Hide behind image when image is present */
}

.blender-container {
    position: fixed;
    top: 2.5rem;
    right: 2rem;
    transform-origin: right top;
    transform: scale(.27);
}

.blender-container h1 {
    text-align: center;
    font-family: "Jersey 10", sans-serif;
    font-size: 10rem;
    font-weight: 400;
    text-transform: uppercase;
    z-index: 1;
    /* Hide behind image when image is present */
}

.game-container {
    position: fixed;
    transform-origin: right top;
    top: 2.5rem;
    right: 13rem;
    transform: scale(.27);
}

.game-container h1 {
    text-align: center;
    font-family: "Jersey 10", sans-serif;
    font-size: 10rem;
    font-weight: 400;
    text-transform: uppercase;
    z-index: 1;
    /* Hide behind image when image is present */
}

/* Tab Button Group */
.header-buttons {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.0);
    padding-bottom: 10%;
    border-color: rgba(255, 255, 255, 0.0);
    line-height: 0.5;
    color: white;
    cursor: pointer;
    font-family: "Jersey 10", sans-serif;
    font-weight: 400;
    font-size: 5rem;
    transition: all 0.1s ease;
    text-align: center;
}

.tab-btn:hover {
    background: rgba(0, 132, 255, 0.2);
    backdrop-filter: blur(10px);
}

.tab-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Keep overlay background invisible or subtle to focus on window move */
    z-index: 1000;
    pointer-events: none;
    /* Allow clicking through to background if needed, but the container will have auto */
}

.tab-overlay.hidden {
    display: none;
}

.tab-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.75);
    transform-origin: top left;
    /* Changed to top left for easier coordinate mapping in JS */
    pointer-events: auto;
    user-select: none;
}

.tab-container p {
    position: absolute;
    transform-origin: top left;
    top: 2.5rem;
    left: 4rem;
    font-family: "Jersey 10", sans-serif;
    font-weight: 400;
    font-size: 3rem;
    letter-spacing: 0.4rem;
    color: rgb(255, 255, 255, 0.5)
}

.tab-header-handle {
    position: absolute;
    top: 49px;
    left: 52px;
    width: 84%;
    height: 37.5px;
    background-color: transparent;
    /* Adjust based on the EmptyTab image's header area */
    cursor: grab;
    z-index: 10;
}

.tab-image {
    display: block;
    width: 900px;
    /* Fixed width to keep size the same */
    height: auto;
    border-radius: 12px;
    pointer-events: none;
}

.tab-content-area {
    position: absolute;
    top: var(--tab-content-top);
    left: var(--tab-content-left);
    width: var(--tab-content-width);
    height: var(--tab-content-height);
    transform: translate(-50%, -50%);
    background: #151c27;
    box-shadow: inset -5px -5px 8px rgba(255, 255, 255, 0.1), inset 5px 5px 8px rgb(0, 0, 0, .5);
    font-size: 1.5rem;
    pointer-events: auto;
    overflow-y: auto;
    padding: 20px;
    z-index: 2;
}

.tab-content-area h1 {
    font-size: 4rem;
    /* margin-bottom: 1rem; */
    text-align: center;
    font-family: "Jersey 10", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
}

.tab-content-area h4 {
    /* font-size: 1.5rem; */
    font-family: "Pixelify Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    line-height: 1.4;
    font-size: 1.7rem;
}

.tab-content-area h5 {
    /* font-size: 1.5rem; */
    text-align: center;
    font-family: "Pixelify Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    line-height: 1.4;
    padding-bottom: 1rem;
    font-size: 1.5rem;
}

.tab-content-area h1 span {
    display: inline-block;
    font-size: 4rem;
    animation: wave 1.25s ease-in-out infinite;
}

.tab-content-area h1 span:nth-child(1) {
    animation-delay: 0s;
}

.tab-content-area h1 span:nth-child(2) {
    animation-delay: 0.1s;
}

.tab-content-area h1 span:nth-child(3) {
    animation-delay: 0.2s;
}

.tab-content-area h1 span:nth-child(4) {
    animation-delay: 0.3s;
}

.tab-content-area h1 span:nth-child(5) {
    animation-delay: 0.4s;
}

.tab-content-area h1 span:nth-child(6) {
    animation-delay: 0.5s;
}

.tab-content-area h1 span:nth-child(7) {
    animation-delay: 0.6s;
}

.tab-content-area h1 span:nth-child(8) {
    animation-delay: 0.7s;
}

.tab-content-area h1 span:nth-child(9) {
    animation-delay: 0.8s;
}

.tab-content-area h1 span:nth-child(10) {
    animation-delay: 0.9s;
}

.tab-content-area h1 span:nth-child(11) {
    animation-delay: 1s;
}

.tab-content-area h1 span:nth-child(12) {
    animation-delay: 1.1s;
}

.tab-content-area h1 span:nth-child(13) {
    animation-delay: 1.2s;
}

.tab-content-area h1 span:nth-child(14) {
    animation-delay: 1.3s;
}


@keyframes wave {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-12px);
    }
}

.shocked {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0px;
    transform: scale(3, .7);
    margin-bottom: 0px;
}

/* Custom Scrollbar for the gallery */
.tab-content-area::-webkit-scrollbar {
    width: 6px;
}

.tab-content-area::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.tab-content-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.tab-content-area::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.gallery-intro {
    margin-bottom: 30px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.gallery-intro p {
    margin-bottom: 10px;
}

.gallery-grid {
    column-count: 2;
    column-gap: 8px;
    padding-bottom: 40px;
}

/* Responsive adjustments for columns */
@media (max-width: 1000px) {
    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        column-count: 1;
    }
}

.gallery-item {
    position: relative;
    break-inside: avoid;
    /* Prevents items from splitting across columns */
    margin-bottom: 8px;
    /* Vertical gap between items */
    overflow: hidden;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover {
    /* transform: translateY(-5px) scale(1.02); */
    border-color: var(--accent-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
    width: 100%;
    height: auto;
    /* Allow height to adjust based on aspect ratio */
    display: block;
    /* Removes extra space below image */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.placeholder-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.close-tab {
    position: absolute;
    top: 47.5px;
    right: 49px;
    width: 39px;
    height: 39px;
    border: none;
    background-color: transparent;
    cursor: pointer;
}

.close-tab:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transition: background-color 0.2s ease;
}

/* Zoom Overlay */
#zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

#zoom-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#zoomed-img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#zoom-overlay.active #zoomed-img {
    transform: scale(1);
}