@font-face {
    font-family: 'Evolventa';
    src: url('fonts/Evolventa-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Evolventa';
    src: url('fonts/Evolventa-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
    /* Removed flex display to prevent video element from shifting layout */
    /* Background image is handled by WebGL now, but keeping it as fallback/reference */
    background-image: url('User_image/_34.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* opacity: 0; Hide initially - DISABLED PERMANENTLY TO PREVENT LOADING ISSUES */
    /* transition: opacity 1.5s ease-in-out; */
}

body.loaded {
    opacity: 1;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute; /* Ensure canvas is positioned correctly */
    top: 0;
    left: 0;
    z-index: 1; /* Smoke behind logo */
    pointer-events: none !important; /* Force clicks to pass through canvas */
}

.content-wrapper {
    position: absolute; /* Changed from relative to absolute to center within body properly */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Robust centering */
    z-index: 9999; /* Ensure it's absolutely on top */
    width: 100%; /* Take full width for layout */
    height: 100%; /* Take full height for layout */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none; /* Allow clicks to pass through to smoke in empty areas */
    box-sizing: border-box; /* Include padding/borders in size */
    overflow: visible; /* Allow content to overflow if needed, preventing clip */
}

.logo-container {
    width: 50%;
    max-width: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px; /* Reduced vertical spacing */
    pointer-events: auto; /* Enable clicks on logo explicitly */
    z-index: 999999; /* Extreme Z-Index to force it on top of everything */
    position: relative; /* Z-index needs position to work reliably */
}

.action-buttons {
    display: flex;
    gap: 30px;
    margin-bottom: 30px; /* Reduced vertical spacing */
    pointer-events: auto; /* Enable clicks explicitly */
    z-index: 10000; /* Ensure above everything */
}

.btn {
    text-decoration: none;
    color: #fff; /* White text */
    background: rgba(255, 255, 255, 0.05); /* Very subtle fill for glass depth */
    border: 1px solid rgba(229, 179, 70, 0.5); /* Semi-transparent gold border base */
    padding: 10px 20px; /* Reduced padding from 12px 30px */
    border-radius: 50px; /* Fully rounded corners */
    font-family: 'Evolventa'; /* Removed sans-serif fallback */
    font-size: 18px; /* Increased from 14px */
    font-weight: normal; /* Regular font weight */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(2px); /* Slight blur for glass effect */
    display: inline-flex; /* Ensure flexbox for centering */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    min-width: 140px; /* Reduced minimum width from 160px */
    /* Liquid/Glass Effect Layering */
    box-shadow: 
        0 0 10px rgba(229, 179, 70, 0.1), /* Outer glow */
        inset 0 0 10px rgba(229, 179, 70, 0.2), /* Inner gold glow */
        inset 0 1px 0 rgba(255, 255, 255, 0.4), /* Top inner highlight */
        inset 0 -1px 0 rgba(255, 255, 255, 0.1); /* Bottom inner shadow */
}

.btn:hover {
    background: rgba(255, 255, 255, 0.1); /* Slightly brighter on hover */
    color: #fff; /* Keep white text */
    box-shadow: 
        0 0 20px rgba(229, 179, 70, 0.4), /* Stronger outer glow */
        inset 0 0 15px rgba(229, 179, 70, 0.4), /* Stronger inner glow */
        inset 0 1px 0 rgba(255, 255, 255, 0.6), /* Brighter top highlight */
        inset 0 -1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    border-color: #E5B346; /* Solid gold border on hover */
    cursor: pointer;
}

.social-icons {
    display: flex;
    gap: 50px;
    pointer-events: auto; /* Enable clicks explicitly */
    z-index: 10000;
}

.social-link {
    color: #fff; /* White color */
    font-size: 30px; /* Increased from 24px */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0.8; /* Slight transparency for default state */
}

.social-link:hover {
    color: #E5B346;
    opacity: 1; /* Full opacity on hover */
    transform: translateY(-3px);
    filter: drop-shadow(0 0 8px rgba(229, 179, 70, 0.4));
}

.footer-info {
    position: absolute;
    bottom: 30px; /* Distance from bottom */
    width: 100%;
    text-align: center;
    color: #E5B346;
    font-family: 'Evolventa'; /* Removed sans-serif fallback */
    pointer-events: auto; /* Allow selection */
    z-index: 10000;
}

.footer-line.main {
    font-size: 14px; /* Significantly reduced from 24px */
    margin-bottom: 5px; /* Reduced margin */
    font-weight: normal; 
}

.footer-line.sub {
    font-size: 10px; /* Significantly reduced from 16px */
    margin-bottom: 3px;
    font-weight: normal;
    opacity: 0.9;
}

.footer-link {
    color: inherit; /* Inherit gold color from parent */
    text-decoration: none; /* Remove default underline */
    transition: opacity 0.3s ease;
}

.footer-link:hover {
    opacity: 0.7; /* Slight fade on hover */
    text-decoration: underline; /* Add underline on hover for clarity */
}

/* Base styles for logo interaction */
.logo {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer; /* Indicate interactivity */
    pointer-events: auto; /* Ensure it catches clicks */
}

.logo-letter-group {
    cursor: pointer; /* Make sure groups also show pointer */
    pointer-events: auto; /* Ensure groups capture events */
}

.logo-letter-group rect {
    pointer-events: auto; /* The transparent rect must capture the click */
}

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0;
    display: none; /* Hard hide initially */
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

.video-background.active {
    display: block; /* Show immediately when class added */
    opacity: 1;
}

/* Helper class for fading out */
.video-background.fading-out {
    display: block;
    opacity: 0;
}

.logo-letter-path {
    transition: fill 0.3s ease;
}

/* When hovering over the group (which includes the invisible rect), color the path */
.logo-letter-group:hover .logo-letter-path {
    fill: #E5B346;
}

/* Ensure nested paths (like in 'A') also change color */
.logo-letter-group:hover g .logo-letter-path {
    fill: #E5B346;
}

/* Responsive adjustments for mobile and narrow screens */
@media screen and (max-width: 768px) {
    .logo-container {
        width: 80%; /* Wider logo on small screens */
        max-width: 400px;
        margin-bottom: 20px;
    }

    .action-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        width: 80%;
        max-width: 300px;
        margin-bottom: 30px;
    }

    .btn {
        width: 100%; /* Full width buttons */
        min-width: unset; /* Allow flexibility */
        padding: 12px 0; /* Consistent vertical padding */
        font-size: 16px; /* Slightly smaller font */
    }

    .social-icons {
        gap: 30px; /* Reduced gap between icons */
    }

    .social-link {
        font-size: 24px; /* Slightly smaller icons */
    }

    .footer-info {
        bottom: 20px;
        width: 90%; /* Prevent text touching edges */
    }

    .footer-line.main {
        font-size: 12px; /* Smaller main footer text */
    }
    
    .footer-line.sub {
        font-size: 9px; /* Smaller sub footer text */
    }
}

/* Extra small devices */
@media screen and (max-width: 480px) {
    .logo-container {
        width: 90%;
    }
    
    .btn {
        font-size: 14px;
    }
    
    .footer-line.main {
        font-size: 10px;
    }
    
    .footer-line.sub {
        font-size: 8px;
    }
}

/* ========================================= */
/* PRESENTATION STYLES (Integrated)          */
/* ========================================= */

/* Ensure presentation overlay is hidden by default with high specificity */
.presentation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #202020;
    z-index: 2147483647; /* Maximum z-index to ensure it covers everything */
    display: none !important; /* Force hide initially unless .active is present */
    opacity: 0;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
    visibility: hidden;
}

.presentation-overlay.active {
    display: flex !important; /* Override display: none */
    opacity: 1;
    visibility: visible;
}

.presentation-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    background: #151515;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px 10px;
    overflow-y: auto;
    transition: width 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    flex-shrink: 0;
    z-index: 50;
}

/* Scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-track {
    background: #111;
}
.sidebar::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.slide-thumb-wrapper {
    width: 100%;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s;
}

.slide-thumb-wrapper:hover {
    transform: scale(1.02);
}

.slide-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.2s;
    background: #000;
}

.slide-thumb-wrapper.active .slide-thumb {
    border-color: #E5B346;
    opacity: 1;
    box-shadow: 0 0 10px rgba(229, 179, 70, 0.3);
}

.slide-number {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: #E5B346 !important;
    color: #000000 !important;
    font-family: 'Evolventa', sans-serif !important;
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    pointer-events: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    z-index: 100;
}

/* Main Area Styles */
.main-area {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #202020;
    height: 100%;
    overflow: hidden;
}

/* Fullscreen Mode Styles */
body.fullscreen-active .sidebar {
    width: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    border: none;
}

.slide-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide-content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    transition: opacity 0.15s ease-in-out; 
}

.slide-ratio-box {
    position: relative;
    width: 100%;
    max-width: 177.78vh; 
    aspect-ratio: 16 / 9;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.main-area .slide-ratio-box {
    max-width: 100%;
    max-height: 100%;
    width: auto; 
    height: auto;
    object-fit: contain;
}

.slide-content {
    background: transparent;
}

.slide-ratio-box {
     width: 100%;
     height: auto;
     aspect-ratio: 16/9;
     margin: auto;
}

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

.slide-overlay-wrapper {
    position: absolute;
    z-index: 2;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide-overlay-wrapper:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(229, 179, 70, 0.4);
}

.slide-overlay-wrapper.no-wrapper-hover {
    box-shadow: none !important;
    transform: none !important;
}
.slide-overlay-wrapper.no-wrapper-hover:hover {
    box-shadow: none !important;
    transform: none !important;
}

.slide-overlay-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 80px;
    height: 80px;
    background: rgba(229, 179, 70, 0.9);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000;
    font-size: 30px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    z-index: 10;
}

.slide-overlay-wrapper:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 21000; /* Higher than overlay */
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal.active {
    display: flex;
    opacity: 1;
}

.video-container {
    /* Existing class conflict! .video-container in main site is hidden. */
    /* We need to be careful. In presentation.html it was: */
    /* width: 80%; max-width: 1200px; aspect-ratio: 16/9; background: #000; ... */
    /* In index.html, .video-container is for the background video. */
    /* I'll rename this to .modal-video-container */
}

.modal-video-container {
    width: 80%;
    max-width: 1200px;
    aspect-ratio: 16/9;
    position: relative;
    background: #000;
    box-shadow: 0 0 30px rgba(229, 179, 70, 0.2);
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #E5B346;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    backdrop-filter: blur(5px);
}

.nav-btn:hover {
    background: rgba(229, 179, 70, 0.8);
    transform: scale(1.1);
    color: #000;
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.top-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 101;
    display: flex;
    gap: 15px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.control-btn:hover {
    background: rgba(229, 179, 70, 0.8);
    transform: scale(1.1);
    color: #000;
}

.slide-indicators {
    position: absolute;
    bottom: 30px;
    display: flex;
    gap: 12px;
    z-index: 100;
}

.indicator {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.6);
}

.indicator.active {
    background: #E5B346;
    transform: scale(1.2);
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
    .presentation-container {
        flex-direction: column;
    }

    .sidebar {
        /* Hide sidebar on mobile for now, or make it a drawer later */
        display: none; 
    }
    
    .nav-btn {
        width: 50px; /* Larger touch target */
        height: 50px;
        font-size: 1.4rem;
        background: rgba(0, 0, 0, 0.4); /* Darker background for contrast */
    }
    
    .prev-btn { left: 10px; }
    .next-btn { right: 10px; }
    
    .top-controls { 
        top: 15px; 
        right: 15px; 
        gap: 15px; 
    }
    
    .control-btn { 
        width: 45px; 
        height: 45px; 
        font-size: 1.2rem;
        background: rgba(0, 0, 0, 0.4);
    }

    /* Adjust video modal for mobile */
    .modal-video-container {
        width: 95%; /* Wider on mobile */
    }

    .modal-close {
        top: -40px; /* Closer */
        right: 10px;
    }
    
    /* Ensure slide ratio box fits well */
    .slide-ratio-box {
        width: 100vw;
        max-width: 100%;
    }
}

/* Extra small devices (phones) */
@media screen and (max-width: 480px) {
    .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        bottom: 20px; /* Move navigation to bottom area if needed */
        top: auto; /* Unset top centering if we want them at bottom */
        transform: none; /* Remove centering transform if needed */
    }

    /* Option: Move arrows to bottom corners */
    .prev-btn {
        left: 20px;
        bottom: 30px;
        top: auto;
        transform: none;
    }

    .next-btn {
        right: 20px;
        bottom: 30px;
        top: auto;
        transform: none;
    }

    /* Hide indicators on very small screens to save space */
    .slide-indicators {
        display: none; 
    }
}
