@import "tailwindcss";

body {
    /* Ensure the body spans the full viewport height */
    margin: 0;
    min-height: 100vh;

    /* Background properties */
    background-image: url("../assets/wallpapers/1316077.jpeg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;

    /* Optional: Keeps the wallpaper still while content scrolls */
    background-attachment: fixed;

    user-select: none;
    overflow: hidden;
}

.doto-meow {
    font-family: "Doto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 50;
    font-style: normal;
    font-variation-settings: "ROND" 50;
}

.noto-sans-meow {
    font-family: "Noto Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 50;
    font-style: normal;
    font-variation-settings: "wdth" 100;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

#desktop-grid {
    display: grid;
    /* This defines the width of your columns */
    grid-template-columns: repeat(auto-fill, 100px);
    /* This defines the height of your icon rows */
    grid-template-rows: repeat(auto-fill, 110px);
    /* The magic property: fills top-to-bottom first */
    grid-auto-flow: column;

    gap: 15px;
    padding: 60px 20px 20px 20px;

    /* Crucial: height must be constrained for vertical wrapping to work */
    height: 100vh;
    width: 100vw;
    box-sizing: border-box;

    backdrop-filter: brightness(0.5);
}

#dock-container {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    /* Change 100px to 150% to hide it completely */
    transform: translateX(-50%) translateY(150%);
    opacity: 0;
    z-index: 9999;
    pointer-events: auto;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 12px;
    padding: 10px 16px;

    background: rgba(20, 20, 20, 0.4) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

    z-index: 9999;
    opacity: 0;
    transition:
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.3s ease;
}

/* Use a class for the "Show" state instead of manual inline styles */
#dock-container.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.dock-app-icon {
    position: relative;
    transition: all 0.2s cubic-bezier(0.2, 0, 0.2, 1);
    transform-origin: bottom;
    cursor: pointer;
}

/* The Reflection effect */
.dock-app-icon img {
    -webkit-box-reflect: below 2px linear-gradient(transparent, rgba(255, 255, 255, 0.1));
}

/* Hover Magnification */
.dock-app-icon:hover {
    transform: scale(1.3) translateY(-10px);
    margin: 0 10px; /* Give room for the scale */
}

/* Active Indicator (Dot) */
.active-dot {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 5px white;
}

@keyframes pulseNudge {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
        border-color: rgba(255, 255, 255, 0.5);
    }
    100% {
        transform: scale(1);
    }
}

.pulse-nudge {
    animation: pulseNudge 0.4s ease-out;
}

/* Ensure tooltips work within the new icon structure */
.dock-app-icon:hover .dock-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

/* Disable resizing when maximized */
.window.is-maximized .resizer {
    display: none;
}
