/* Custom Styles for Nvogue Website */

/* Preloader Styles */
#preloader {
    position: fixed;
    inset: 0;
    background-color: #020817;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-brand {
    font-size: 4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px rgba(14, 165, 233, 0.5));
}

.loader-subtext {
    font-size: 1.2rem;
    color: #94a3b8;
    margin-bottom: 3rem;
    opacity: 0;
}

.loader-percent {
    font-size: 1.5rem;
    font-weight: 600;
    color: hsl(210 100% 55%);
    min-width: 60px;
    text-align: center;
    margin-bottom: 0.5rem;
}

.loader-bar {
    height: 4px;
    background: hsl(210 100% 55%);
    border-radius: 2px;
    transform-origin: left;
    transform: scaleX(0);
    width: 300px;
}

/* Navbar Scrolled State */
nav.bg-scrolled {
    background-color: rgba(2, 8, 23, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Scrollbar Hide Utility */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* SVG Animation Styles */
.network-node {
    fill: currentColor;
}

.chart-bar {
    fill: currentColor;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Memory Match Game Styles */
.memory-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    cursor: pointer;
    perspective: 1000px;
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    border-radius: 12px;
    backface-visibility: hidden;
    transition: transform 0.6s;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.card-back {
    transform: rotateY(0deg);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
}

.card-front {
    transform: rotateY(180deg);
    background: hsl(210 100% 55%);
}

.memory-card.flipped .card-back {
    transform: rotateY(-180deg);
}

.memory-card.flipped .card-front {
    transform: rotateY(0deg);
}

.memory-card.matched .card-front {
    background: hsl(142 76% 36%);
    border-color: hsl(142 76% 36%);
}

/* Quiz Styles */
.quiz-option {
    transition: all 0.3s ease;
}

.quiz-option:hover {
    background: rgba(14, 165, 233, 0.1);
    border-color: hsl(210 100% 55%) !important;
    transform: translateX(4px);
}

.quiz-option:active {
    transform: scale(0.98);
}

/* Button Styles */
.btn-primary {
    padding: 0.75rem 2rem;
    background: hsl(210 100% 55%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: hsl(210 100% 45%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.3);
}

/* Mobile Menu Base Styles */
#mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(100%);
    visibility: hidden;
}

#mobile-menu.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    visibility: visible;
}

/* Project Modal Styles */
#project-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
}

#project-modal.active {
    opacity: 1;
    pointer-events: auto;
}

#project-modal.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-content {
    background: transparent;
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    width: 95vw;
    height: 95vh;
    justify-content: center;
}

.modal-content::-webkit-scrollbar {
    width: 0;
}

.modal-details::-webkit-scrollbar-track {
    background: transparent;
}

.modal-details::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.modal-details::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-image-container {
    width: 100%;
    max-width: 600px;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

#modal-project-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Work Card Refinements */
.work-card img {
    will-change: transform;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-project-btn {
    transition: all 0.3s ease;
}

.work-card:hover .view-project-btn {
    transform: translateX(5px);
}

/* Responsive Modal Adjustments */
@media (max-width: 768px) {
    .modal-content {
        padding: 1rem;
        height: auto;
        justify-content: flex-start;
        padding-top: 4rem;
        flex-direction: column;
        width: 95% !important;
    }

    .modal-image-container {
        height: 50vh;
        margin-bottom: 1.5rem;
    }

    #modal-project-image {
        width: auto;
        height: auto;
        max-width: 100%;
    }
}