@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Inter:wght@400;600;800&display=swap');

* {
    box-sizing: border-box; 
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh; /* Fixed scroll lock */
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    background-color: transparent; 
}

h1, h2, h3 {
    font-family: "Bangers", sans-serif;
    letter-spacing: 2px;
    margin: 0;
}

/* ====== HOMEPAGE ====== */
.homepage-bg {
    background-color: #0f172a; 
    background-image: url('../images/wallpaper_for_home.jpg'); 
    background-size: cover;
    background-position: center;
    filter: blur(5px);
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.home-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 15vh;
    color: white;
    position: relative;
    z-index: 1;
}

.home-title {
    font-size: 6rem;
    text-shadow: 4px 4px 0px rgba(0,0,0,0.8), -2px -2px 0px rgba(0,0,0,0.8);
    margin-bottom: 2rem;
    color: #fff;
    text-align: center;
}

.home-buttons {
    display: flex;
    gap: 2rem;
}

.btn {
    font-family: "Bangers", sans-serif;
    font-size: 2.2rem;
    color: white;
    text-decoration: none;
    padding: 1rem 3rem;
    background-color: rgba(0,0,0,0.6);
    border: 3px solid white;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: #ffeb3b;
    border-color: #ffeb3b;
    color: black;
    transform: translateY(-5px);
}

/* ====== SUBPAGE BACKGROUND ====== */
.subpage-bg {
    background-color: #0f172a; 
    background-image: url('../images/wallpaper_for_home.jpg'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

/* ====== THE SLIDING SHADER PANELS ====== */
.shader-panel {
    position: absolute;
    top: 0;
    height: 100vh;
    width: 65vw;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 0 50px rgba(0,0,0,0.9);
}

.content-area {
    margin-top: 160px; /* Pushes content down below nav */
    padding-bottom: 50px;
    padding-left: 20px;
    padding-right: 20px;
}

.panel-left {
    left: 0;
    clip-path: polygon(0 0, 100% 0, calc(100% - 25vh) 100%, 0 100%);
    animation: slideInLeft 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    padding: 0 18vw 0 6vw; 
    background-color: rgba(15, 23, 42, 0.95);
}

.panel-right {
    right: 0;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 25vh 100%);
    animation: slideInRight 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    padding: 0 6vw 0 18vw; 
    background-color: rgba(15, 23, 42, 0.95);
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* ====== ANGLED NAVIGATION (DESKTOP) ====== */
.nav-angled {
    position: fixed;
    top: 10vh; 
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    z-index: 20;
}

.nav-angled a {
    pointer-events: all;
    font-family: "Bangers", sans-serif;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem; 
    text-decoration: none;
    transition: all 0.2s ease;
    text-transform: uppercase;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    white-space: nowrap;
}

.nav-angled a:hover {
    color: #ffeb3b;
    border-color: #ffeb3b;
    background: rgba(255, 235, 59, 0.15);
    transform: scale(1.05);
}

.nav-left {
    left: auto !important;
    right: calc(35vw + 50px);
    transform-origin: right center;
    transform: rotate(14deg);
    align-items: flex-end;
}

.nav-right {
    right: auto !important;
    left: calc(35vw + 50px);
    transform-origin: left center;
    transform: rotate(-14deg);
    align-items: flex-start;
}

/* ====== INNER CONTENT STYLING ====== */
.content-area h1 {
    font-size: 3.5rem; 
    margin-bottom: 1.5rem;
    color: #ffeb3b;
    text-shadow: 2px 2px 0px #000;
}

.architectural-detail {
    font-size: 1.15rem;
    line-height: 1.6;
    color: #cbd5e1;
    max-width: 100%;
    text-align: left; 
}

.architectural-detail strong {
    color: white;
}

.scanner-container {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1.5rem;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px; 
    gap: 2rem; 
}

.scanner-buttons {
    display: flex;
    gap: 1.5rem; 
    flex-wrap: wrap; 
    justify-content: center;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffeb3b;
    color: black;
    font-family: "Bangers", sans-serif;
    font-size: 1.4rem;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.upload-btn:hover {
    background: white;
    transform: scale(1.05); 
}

.mobile-camera-only {
    display: none !important; 
}

.preview-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    margin: 0;
}

.nav-center {
    flex-direction: row !important;
    transform: none !important;
    top: 4vh !important;
    left: 0 !important;
    right: 0 !important;
    justify-content: center;
    width: 100%;
    z-index: 20; 
}

.panel-full {
    position: absolute;
    top: 0 !important;
    left: 0; 
    transform: none; 
    width: 100vw; 
    min-height: 100vh;
    height: auto;
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0 4vw !important; 
    z-index: 10;
    overflow: visible;
}

.panel-full .content-area {
    width: 100%;
    max-width: 1200px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin-top: 140px; 
    padding-bottom: 10vh;
    text-align: center;
    overflow: visible;
}

/* ====== STRICTLY MOBILE OVERRIDES (LEAVES DESKTOP EXACTLY AS IS) ====== */
@media (max-width: 768px) {
    
    /* 1. Break the Screen Lock for Mobile Scrolling */
    .shader-panel, .panel-full, .panel-left, .panel-right { 
        position: absolute !important; 
        top: 0 !important;     
        left: 0 !important;
        bottom:auto !important;
        height: auto !important; 
        min-height: 100vh !important; 
        width: 100vw !important;
        clip-path: none !important; 
        padding: 0 20px 40px 20px !important; 
        overflow: visible !important; 
        display: block !important;
    }

    /* 2. Fix the Mobile Nav Layout */
    .nav-angled { 
        position: absolute !important;
        top: 25px !important; 
        flex-direction: row !important; 
        justify-content: center !important; 
        flex-wrap: wrap !important;
        width: 100% !important; 
        left: 0 !important; 
        right: 0 !important; 
        transform: none !important; 
        z-index: 100 !important; 
    }
    .nav-angled a { transform: none !important; margin: 5px !important; }

    /* 3. Override the 400px Desktop HTML Margin Safely */
    .content-area, .panel-full .content-area { 
        margin-top: 140px !important; /* Safe padding below the mobile nav */
        padding-top: 0 !important; 
        display: block !important; 
    }
    
    .content-area h1 { 
        font-size: 2.2rem !important; 
        margin-top: 0 !important; /* <--- THIS KILLS THE 400px INLINE BUG ON MOBILE ONLY */
        margin-bottom: 20px !important;
    }

    /* 4. Fix Homepage & Text Elements */
    .home-title { font-size: 3.2rem !important; }
    .home-container { padding-top: 5vh !important; }
    .architectural-detail { text-align: left !important; font-size: 1rem !important; }
    .home-buttons { flex-direction: column !important; width: 90% !important; }
    .btn { width: 100% !important; text-align: center !important; }
    .mobile-camera-only { display: inline-flex !important; }
}