:root {
    --canvas-width: 9000px;
    --canvas-height: 7000px;
    --frame-width: 1440px;
    --frame-height: 1024px;
    --bg-color: #444040;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Playfair Display', sans-serif;
    background-color: var(--bg-color);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    user-select: none;
    -webkit-user-select: none;
    overscroll-behavior: none;
    overscroll-behavior-x: none;
}

img {
    -webkit-user-drag: none;
    user-select: none;
}

h1, h2, h3, p{
    user-select: text !important;
    -webkit-user-select: text !important;
}

#pixi-canvas {
    z-index: 0;
    pointer-events: none;
    transform: translate3d(0,0,0);
    will-change: transform;
    -webkit-font-smoothing: antialiased;
    backface-visibility: hidden;
}

#viewport {
    z-index: 10;
    position: relative; 
}

/* Hardware Acceleration */
.frame,
#world {
    backface-visibility: visible;
    image-rendering: auto;
}

.frame {
    position: absolute;
    width: var(--frame-width);
    height: var(--frame-height);
    background-color: white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    z-index: 10;

    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
}

.frame-bg {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;

    pointer-events: none;
    user-select: none;

    image-rendering: auto;
}

/* --- SAFARI VISIBILITY FIX --- */
.frame, .project-card, .blog-card, .card-content,
h1, h2, h3, p, span, .p-desc, .b-desc,
a, button, .palette-btn, .p-demo, .p-code, .home-btn, .action-btn {
    backface-visibility: visible;
}

/* --- MOBILE PERFORMANCE OPTIMIZATION --- */
@media (max-width: 768px) {
    #world {
        background-image: none !important;
        background-color: var(--bg-color) !important;
        will-change: transform;
    }

    .bottom-nav {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: #2C2C2C !important; 
        box-shadow: 0 5px 15px rgba(0,0,0,0.5) !important;
    }

    .frame, .project-card, .blog-card {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
    }

    .frame-bg {
        width: 100% !important;
        height: 100% !important;
        transform: none !important;
    }

    .bottom-nav button.active {
        transform: scale(1.0) !important;
        box-shadow: none !important;
    }
}

#viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    touch-action: none;
    cursor: url('../assets/cursor-default.svg') 1 1, auto;
    /* perspective: 1000px; */
    user-select: none;
    -webkit-user-select: none;
}

#viewport:active {
    cursor: grabbing;
}

#world {
    width: var(--canvas-width);
    height: var(--canvas-height);
    position: absolute;
    top: 0;
    left: 0;
/*    
    background-image:
        linear-gradient(to right, #5D5959 1px, transparent 1px),
        linear-gradient(to bottom, #5D5959 1px, transparent 1px);
    background-size: 50px 50px; */

    background-color: transparent !important;
    
    transform-origin: 0 0;
    /* transition: transform 0.05s linear; */
    will-change: transform;
    transform: translate3d(0,0,0);
}

#world.is-animating {
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

body.is-zooming #world {
    image-rendering: auto;
    will-change: transform;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

body:not(.is-zooming) #world {
    image-rendering: auto;
}

body.is-static #world {
  transform: translate(0, 0) scale(1);
  will-change: auto;
}

body.is-interacting #world {
  will-change: transform;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

body.is-zooming,
body.is-interacting {
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body.not-interacting {
  -webkit-font-smoothing: subpixel-antialiased;
}

.global-lines {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;   
    /* -ms-user-select: none;     */
    z-index: 0; 
}

.global-assets {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    pointer-events: none; 
    user-select: none;
    -webkit-user-select: none;
}

.frame {
    position: absolute;
    width: var(--frame-width);
    height: var(--frame-height);
    background-color: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    z-index: 10;
    user-select: none;
    -webkit-user-select: none;
}

.frame-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

.frame>h1,
.frame>h2,
.frame>p,
.frame>a,
.frame>button,
.frame>div {
    position: absolute;
    z-index: 10;
    margin: 0;
}

#frame-1 {
    /* width: 1440px !important;
    height: 1024px !important; */
    overflow: visible !important; 
    background: transparent;
    box-shadow: none !important;
}

#frame-2 {
    width: 1916px !important;
    height: 1134px !important;
    overflow: visible !important; 
    background: transparent;
    box-shadow: none !important;
}

#frame-4 {
    width: 2189px !important;
    height: 1109px !important;
    overflow: visible !important; 
    background: transparent;
    box-shadow: none !important;
}

#frame-5 {
    width: 1741px !important;
    height: 1634px !important;
    overflow: visible !important; 
    /* background: transparent; */

    background: #191616;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.action-btn {
    width: 200px;
    height: 50px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.action-btn:hover {
    background: #333;
}

.home-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.2s;
}

.home-btn:hover {
    opacity: 0.8;
}

.styled-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 40px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.frame-c {
    top: calc(var(--canvas-height) / 2 - var(--frame-height) / 2);
    left: calc(var(--canvas-width) / 2 - var(--frame-width) / 2);
}

.frame-l {
    left: 827px;
    top: 2984px;
}

.frame-t {
    left: 3519px;
    top: 505px;
}

.frame-r {
    left: 6635px;
    top: 2988px;
}

.frame-b {
    left: 3624px;
    top: 5160px;
}

#idea-glass {
    position: absolute;
    width: 210px; 
    height: 210px;
    border-radius: 50%;
    
    background-repeat: no-repeat;
    background-color: #fff; 
    
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.5), 
        inset 0 0 40px rgba(0, 0, 0, 0.2);
        
    pointer-events: none; 
    display: none; 
    z-index: 100;
    transform: translateZ(0); 
}

.mag-btn {
    position: absolute;
    width: 30px;
    height: 30px;
    left: 80px;
    top: 1042px;
    
    border: none;
    background: #3B2727;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.mag-btn img {
    width: 16px;
    height: 16px;
    transition: filter 0.2s ease;
    display: block;
}

.mag-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.mag-btn.active {
    background-color: #fff;
}

.mag-btn.active img {
    filter: invert(1) brightness(2);
}

#mag-glass-hint {
    transition: opacity 0.3s ease;
    pointer-events: none;
}

@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
    .mag-btn {
        display: none !important;
    }

    #mag-glass-hint {
        display: none !important;
    }
}

.project-card {
    position: absolute;
    width: 610px;
    height: 427px;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible;
}

.project-card .card-bg {
    display: none;
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 610.07px;
    height: 427.05px;
    
    background: #F4F3E4;
    border-radius: 25px;
    
    z-index: 1;
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.card-content {
    position: absolute;
    z-index: 2;
    top: 30px;   
    left: 46px;
    width: 514px;
}

.p-title {
    margin-bottom: 20px;
    transition: color 0.3s ease;

    font-family: 'Playfair Display';
    font-style: italic;
    font-weight: 800;
    font-size: 50px;
    line-height: 96.56%;
    display: flex;
    align-items: center;

    width: 514px;
    color: #E0775D;

    user-select: text !important;
    -webkit-user-select: text !important;
}

.card-split-row {
    display: flex;
    justify-content: space-between; 
    align-items: flex-start; 
    width: 100%;
}

.p-desc {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 400;
    font-size: 15px;
    line-height: 117.8%;
    text-align: justify;
    letter-spacing: -0.02em;
    color: #3B2727;
    width: 400px;
    height: 215px;
    margin-top: 0;
    white-space: pre-line;

    overflow-y: auto;
    padding-right: 10px;
    overscroll-behavior: contain;
    overscroll-behavior-y: contain;

    scrollbar-width: thin;
    scrollbar-color: rgba(59, 39, 39, 0.2) transparent;

    user-select: text !important;
    -webkit-user-select: text !important;
}

.p-desc::-webkit-scrollbar {
    width: 6px;
}

.p-desc::-webkit-scrollbar-track {
    background: transparent;
}

.p-desc::-webkit-scrollbar-thumb {
    background-color: rgba(59, 39, 39, 0.6);
    border-radius: 2px;
}

.p-desc::-webkit-scrollbar-thumb:hover {
    background-color: rgba(59, 39, 39, 0.9);
}

.p-desc::-webkit-scrollbar-button,
.b-desc::-webkit-scrollbar-button,
.p-desc::-webkit-scrollbar-corner,
.b-desc::-webkit-scrollbar-corner {
    display: none;
}

.action-wrapper {
    position: relative;
    z-index: 2;

    top: 0;      
    left: 20px;    
    
    width: 112px;
    height: auto; 
    
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px; 
    margin-top: 0;
}

.icon-box {
    width: 112px;
    height: 104px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0px 0px 25px rgba(0, 0, 0, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
}

.p-icon {
    width: 70px;
    height: 70px;
    display: block;
}

.action-wrapper .links {
    text-align: center;
}

.action-wrapper .links a {
    display: block;
    margin-top: 4px;
    transition: color 0.2s;
    text-decoration: none;
    
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 700;
    font-size: 13px;
    line-height: 80%;
    text-align: center;
    letter-spacing: -0.02em;

    color: #3B2727;
}

.action-wrapper .links a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.palette-btn {
    position: absolute;
    width: 41.12px;
    height: 41.12px;
    cursor: pointer;
    border-radius: 2px;
    opacity: 1; 
    transition: transform 0.1s;
}

.palette-btn:active {
    transform: scale(0.95);
}

.palette-btn.active {
    border: 1px solid #118EE8;
    border-radius: 0;
    z-index: 10;
}

.palette-btn:hover {
    opacity: 0.8;
}

.handle {
    position: absolute;
    width: 5px;
    height: 5px;
    background-color: #D9D9D9;
    border: 1px solid #118EE8; 
    display: none;
}

.palette-btn.active .handle {
    display: block;
}

.handle.top-left { top: -4px; left: -4px; }
.handle.top-right { top: -4px; right: -4px; }
.handle.bottom-left { bottom: -4px; left: -4px; }
.handle.bottom-right { bottom: -4px; right: -4px; }

.blog-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.blog-card {
    position: absolute;
    width: 715px;
    height: 351px;
    background: #2C2C2C;
    pointer-events: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.b-title {
    position: absolute;
    width: 440px;
    height: auto;
    top: 47px;
    margin: 0;
    
    font-family: 'Playfair Display';
    font-style: italic;
    font-weight: 800;
    font-size: 50px;
    line-height: 96.56%;
    color: #E9EBE8;
    
    white-space: nowrap;
    /* overflow: hidden; */
    text-overflow: ellipsis;

    user-select: text !important;
    -webkit-user-select: text !important;
}

.b-subline {
    position: absolute;
    width: 440px;
    height: 18px;
    top: 104px;
    margin: 0;
    
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 400;
    font-size: 15px;
    line-height: 117.8%;
    text-align: justify;
    letter-spacing: -0.02em;
    color: #E9EBE8;

    user-select: text !important;
    -webkit-user-select: text !important;
}

.b-desc {
    position: absolute;
    width: 437px;
    height: 205px;
    top: 138px;
    
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 300;
    font-size: 10px;
    line-height: 117.8%;
    text-align: justify;
    letter-spacing: -0.02em;
    color: #E9EBE8;
    
    overflow-y: auto;
    padding-right: 5px;
    white-space: pre-line;
    overscroll-behavior: contain;
    overscroll-behavior-y: contain;

    scrollbar-width: thin;
    scrollbar-color: rgba(233, 235, 232, 0.2) transparent;

    user-select: text !important;
    -webkit-user-select: text !important;
}

.b-desc a:link, a:visited, a:hover, a:active {
    color: #ADD8E6;
    text-decoration: underline;
    font-style: italic;
    font-family: 'Playfair Display';
    font-weight: 600;
}

.b-desc u {
    color: #ADD8E6;
    text-decoration: none;
    font-style: italic;
    font-family: 'Playfair Display';
    font-weight: 600;
    font-size: 11px;
}

.b-desc ul {
    margin-top: 0px;
    padding-left: 1px;
    list-style-position: inside;
}

ul li::marker {
  color: #ADD8E6;;
  font-weight: bold;
}

.b-desc li {
    padding-left: 0px;
    list-style-type: devanagari;
}

.b-desc::-webkit-scrollbar { width: 6px; }
.b-desc::-webkit-scrollbar-track { background: transparent; }
.b-desc::-webkit-scrollbar-thumb { background: rgba(233, 235, 232, 0.3); border-radius: 4px; border: 1px solid rgba(233, 235, 232, 0.1);}
.b-desc::-webkit-scrollbar-thumb:hover {background-color: rgba(233, 235, 232, 0.6);}

.b-divider {
    position: absolute;
    width: 0px; 
    height: 305px;
    top: 28px;
    border-left: 1px solid rgba(233, 235, 232, 0.27);
    transform: none;
}

.b-img-wrapper {
    position: absolute;
    width: 168px;
    height: 305px;
    top: 28px;
    overflow: hidden;
}

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

.template-right .b-title { left: 39px; }
.template-right .b-subline { left: 39px; }
.template-right .b-desc { left: 39px; }
.template-right .b-divider { left: 509px; } 
.template-right .b-img-wrapper { left: 523px; }

.template-left .b-title { left: 234px; width: 468px; }
.template-left .b-subline { left: 234px; width: 468px; }
.template-left .b-desc { left: 234px; }
.template-left .b-divider { left: 217px; } 
.template-left .b-img-wrapper { left: 39px; }

.interest-card {
    position: absolute;
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
}

.interest-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.interest-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%; 

    background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, rgba(0,0,0,0.85) 100%);
    
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    box-sizing: border-box;
    
    opacity: 0; 
    transition: opacity 0.3s ease;
}

.interest-overlay h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 24px;
    color: #FFFFFF;
    margin: 0 0 5px 0;
    
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.interest-overlay p {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    transition-delay: 0.05s; 
}

.interest-card:hover .interest-overlay {
    opacity: 1;
}

.interest-card:hover .interest-overlay h3,
.interest-card:hover .interest-overlay p {
    transform: translateY(0);
}

.interest-card:hover img {
    transform: scale(1.05);
}

.shine-card {
    overflow: hidden;
}

.shine-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-25deg);
    transition: none;
}

.shine-card:hover::after {
    left: 150%;
    transition: 0.7s ease-in-out;
}

#core-title-card:hover img {
    transform: none !important;
}

#frame-5 h1 {
    width: 102px;
    height: 18px;
    
    font-family: 'Playfair Display', serif;
    font-style: normal;
    font-weight: 400;
    font-size: 15px;
    line-height: 117.8%;
    text-align: justify;
    color: #FFFFFF;
    margin: 0; 
}

#frame-5 h2 {
    width: 102px;
    height: 12px;
    
    font-family: 'DM Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 10px;
    line-height: 117.8%;
    text-align: justify;
    color: #FFFFFF;
    margin: 0;
}

#panic-btn {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    
    width: 100px;
    height: 100px;
    border-radius: 50%;
    
    background-color: #9E1F2A;
    color: white;
    border: none;
    cursor: pointer;
    
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.1;
    text-align: center;
    
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 10;

    transition: opacity 0.3s ease, transform 0.1s;
}

#panic-btn:hover {
    background-color: #bf2533;
    transform: translateX(-50%) scale(1.05);
}

.bottom-nav {
    position: fixed;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(44, 44, 44, 0.9);
    padding: 6px 12px;
    border-radius: 30px;
    display: flex;
    gap: 10px;
    z-index: 100;
    backdrop-filter: blur(5px);
    box-shadow: 0px 9px 8.1px rgba(0, 0, 0, 0.42);
}

.bottom-nav button {
    display: flex; 
    justify-content: center; 
    align-items: center;
    padding: 8px 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 12px;
    color: #ddd;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}


.bottom-nav button.active {
    background-color: #118EE8;
    color: white;             
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.bottom-nav button img {
    width: 24px !important; 
    height: 24px !important;
    display: block;
    transition: filter 0.2s;
}

.bottom-nav button.active img {
    filter: brightness(0) invert(1);
}


.bottom-nav button.active::before {
    display: none;
}

.bottom-nav button:hover {
    opacity: 0.7;
}

/* --- SCROLLBARS --- */
.scrollbar-track-x {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px; 
    z-index: 900; 
    pointer-events: auto; 
    cursor: default;
}

.scrollbar-thumb-x {
    position: absolute;
    height: 2px; 
    bottom: 1px; 
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s;
    cursor: grab;
}

.scrollbar-track-y {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 5px;
    z-index: 900;
    pointer-events: auto;
    cursor: default;
}

.scrollbar-thumb-y {
    position: absolute;
    width: 2px;
    right: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s;
    cursor: grab;
}

.scrollbar-thumb-x:active, .scrollbar-thumb-y:active {
    cursor: grabbing;
}

.is-animating .scrollbar-thumb-x,
.is-animating .scrollbar-thumb-y,
.scrollbar-track-x:hover .scrollbar-thumb-x,
.scrollbar-track-y:hover .scrollbar-thumb-y {
    background: rgba(255, 255, 255, 0.6);
}

.drag-hint {
    position: fixed;
    z-index: 850;
    left: 5px;
    bottom: -13px;
    opacity: 0; 
    transform: translateY(0);
    transition: opacity 1s ease, transform 1s ease;
    
    pointer-events: none;
    user-select: none;
}

.drag-hint.visible {
    opacity: 1;
}

.drag-hint.hidden {
    opacity: 0 !important;
    transform: translateY(20px);
}

.core-hint-bubble, .idea-hint-bubble {
    position: fixed;
    z-index: 850;
    left: 50%;
    bottom: 45px; 
    transform: translate(-50%, 0);
    
    opacity: 0;
    transition: opacity 1s ease, transform 1s ease;
    
    pointer-events: none;
    user-select: none;
}

.core-hint-bubble.visible, .idea-hint-bubble.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.core-hint-bubble.hidden, .idea-hint-bubble.hidden {
    opacity: 0 !important;
    transform: translate(-50%, 20px);
}

#drag-hint img {
  content: url("../assets/Hint.svg");
}

#custom-tooltip {
    position: fixed;
    background-color: #118EE8;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    
    pointer-events: none;
    z-index: 10000;
    
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
    white-space: nowrap;
}

#custom-tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 10px;
    width: 0; 
    height: 0; 
    border: 5px solid transparent;
    border-top-color: #118EE8;
    border-bottom: 0;
}

#custom-tooltip.visible {
    opacity: 1;
    transform: scale(1);
}

/* --- MOBILE WARNING OVERLAY --- */
#mobile-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #131416; 

    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    
    z-index: 10000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px 20px 30px 20px;
    box-sizing: border-box;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.mw-bg {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.6;
}

.mw-content {
    max-width: 320px;
    width: 100%;
    text-align: center;
    font-family: 'DM Sans', sans-serif;
    color: #fff;
    z-index: 2;
}

.mw-content h2 {
    font-weight: 300;
    font-size: 30px;
    line-height: 1.4;
    margin-bottom: 30px;
    letter-spacing: -0.01em;
}

.mw-loader-track {
    width: 160px; 
    height: 4px;
    background: #2C2C2C; 
    border-radius: 2px;
    margin: 0 auto; 
    overflow: hidden;
    position: relative;
}

.mw-bar {
    width: 0%;
    height: 100%;
    background: #118EE8;
    border-radius: 2px;
    animation: loadBar 2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes loadBar {
    0% { width: 0%; }
    100% { width: 100%; }
}

#mobile-warning.fade-out {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

@media (max-width: 600px) {
    .bottom-nav {
        width: 90%;
        justify-content: space-between;
        overflow-x: auto;
    }

    .bottom-nav button {
        font-size: 12px;
        padding: 5px;
        flex-shrink: 0;
    }
}

/* --- MOBILE/TABLET ADJUSTMENTS --- */
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
    #mobile-warning {
        display: flex;
    }

    #drag-hint img {
        content: url("../assets/Hint-Mobile.svg");
    }

    .bottom-nav {
        width: auto;
        min-width: 200px;
        max-width: 85%;  
        bottom: 40px;    
        padding: 12px 24px;
        border-radius: 100px;
        gap: 15px;
        justify-content: center;
        background: rgba(44, 44, 44, 0.95);
        backdrop-filter: blur(15px);
        box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    }

    .bottom-nav button {
        padding: 0;
        width: auto;
        height: auto;
        background: transparent !important;
        box-shadow: none !important;
    }
   
    .bottom-nav button img {
        width: 24px !important;
        height: 24px !important;
    }
   
    .bottom-nav button {
        font-size: 13px;
        opacity: 1;
    }

    .bottom-nav button.active {
         background-color: #118EE8 !important;
         opacity: 1 !important;
         background-image: none !important;
         box-shadow: 0 2px 8px rgba(0, 123, 255, 0.4) !important;
         padding: 8px 8px;
         border-radius: 12px;
         color: white !important;
    }

    .scrollbar-track-x, 
    .scrollbar-track-y {
        display: none !important;
    }

    .drag-hint,
    .idea-hint-bubble,
    .core-hint-bubble {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        bottom: 100px; 
        width: auto;
        display: flex;
        justify-content: center;
    }

    .drag-hint.hidden,
    .idea-hint-bubble.hidden,
    .core-hint-bubble.hidden {
        transform: translate(-50%, 20px); 
    }

    .core-hint-bubble {
        display: none !important;
    }

    .p-desc, .b-desc {
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }
}

@keyframes fadeInSlide {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-animate {
    animation: fadeInSlide 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}