/* Generated from templet.html: extracted <style> */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
#ripple-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
html {
    overflow-y: scroll; /* Luôn có scroll để tránh nhảy layout */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    font-family: 'Inter', sans-serif;
    background: #000;
    color: white;
    overflow-x: hidden;
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}

/* Chrome, Safari, Opera */
body::-webkit-scrollbar {
    display: none;
}

/* Thêm class cho top bar để animate */
.top-bar {
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.top-bar.fading {
    opacity: 0;
    transform: translateY(-50px); /* Kéo lên trên khi biến mất */
}

/* Hiện khi scroll lên nửa trang */
.hero-top-text.visible {
    transform: translateY(0);
    opacity: 1;
}

.hero-date {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    font-style: italic;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 0.05em;
    mix-blend-mode: difference;
}

.hero-top-text {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-style: italic;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 0.05em;
    z-index: 9999;
    mix-blend-mode: difference;
    opacity: 1;
    transition: transform 0.2s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.2s cubic-bezier(0.76, 0, 0.24, 1);
}

/* Ẩn khi scroll quá nửa trang (nền nav đen xuất hiện) */
.hero-top-text.hidden {
    transform: translateX(-50%) translateY(-80px);
    opacity: 0;
}

/* Time Bar - góc phải */
.time-bar {
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
}

.time-bar .clock {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-style: italic;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.05em;
    mix-blend-mode: difference;
}

.time-bar .separator {
    color: rgba(255,255,255,0.5);
}

.time-bar .date {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    font-style: italic;
    color: #ffffff;
    letter-spacing: 0.05em;
    mix-blend-mode: difference;
}

/* CURSOR - Di chuyển mượt + Thay đổi kích thước theo tốc độ */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 0.25px solid rgba(255,255,255,0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(255,255,255,0.3);
    
    /* Transition - NHANH cho phóng to, CHẬM cho thu nhỏ (xử lý bằng JS) */
    transition: width 0.1s ease-out, height 0.1s ease-out;
}

/* Khi hover vào images/links - Đặc màu trắng */
.cursor.active {
    width: 32px;
    height: 32px;
    background: #ffffff;
    border: 2px solid #ffffff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
}

.hoverable {
    cursor: pointer;
}

/* HERO */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    background: #000; /* Fallback khi bg.jpg load */
    overflow: hidden; /* THÊM DÒNG NÀY */
}

.hero h1 {
    font-size: 30px !important;
    font-family: 'Playfair Display', serif !important;
    font-style: italic !important;
    font-weight: 400 !important;
    letter-spacing: -0.03em;
    line-height: 1.2;
    
    /* BỎ gradient, ĐỔI MÀU TRẮNG */
    color: #ffffff !important;
    text-shadow: 0 0 30px rgba(255,255,255,0.5); /* Glow trắng */
    
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.3));
    text-align: center;
    margin-bottom: 1rem;
    z-index: 5 !important;
    position: relative;
}

.hero-subtitle {
    font-family: 'Playfair Display', serif !important;
    font-style: italic !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    color: rgb(255, 255, 255);
    letter-spacing: 0.1em;
    mix-blend-mode: difference;
    opacity: 0;
    transform: translateY(30px);
    z-index: 5 !important;
    position: relative;
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Hero text - base state (ẩn) */
#hero-name,
#hero-subtitle{
    opacity:1;
    transform:translateY(0);
}

/* Hero text - visible state (hiện) */
#hero-name.visible, #hero-subtitle.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delay cho subtitle */
#hero-subtitle, #hero-subtitle.visible {
    transition-delay: 0.2s;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(80px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Floating particles */
.particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 2;
    opacity: 0;
    transition: opacity 1s ease;
}

.particles.active {
    opacity: 1;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(0,212,255,0.6) 0%, transparent 70%);
    border-radius: 50%;
    animation: particleFloat 25s infinite linear;
}

.particle:nth-child(1) { width: 4px; height: 4px; top: 20%; left: 10%; animation-duration: 20s; animation-delay: 0s; }
.particle:nth-child(2) { width: 6px; height: 6px; top: 70%; right: 20%; animation-duration: 25s; animation-delay: -8s; }
.particle:nth-child(3) { width: 3px; height: 3px; bottom: 30%; left: 30%; animation-duration: 22s; animation-delay: -12s; }
.particle:nth-child(4) { width: 5px; height: 5px; top: 50%; right: 10%; animation-duration: 28s; animation-delay: -5s; }

@keyframes particleFloat {
    0% { 
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { 
        transform: translateY(-120vh) translateX(50px) rotate(360deg);
        opacity: 0;
    }
}

/* Memories Section */
.memories {
    padding: 20vh 8% 15vh;
    max-width: 1600px;
    margin: 0 auto;
}

/* Pets Section */
.pets {
    padding: 20vh 8% 15vh;
    max-width: 1600px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 10rem;
    opacity: 0;
    transform: translateY(60px);
    transition: all 1.2s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

.section-title.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Memories Grid - 9 ảnh */
.memories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    grid-template-rows: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Pets Grid - 12 ảnh */
.pets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-template-rows: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* ========== CARDS - TÁCH HIỆU ỨNG SCROLL VÀ HOVER ========== */

/* Cards - base state */
.memory-card, .pet-card {
    position: relative;
    height: 350px;
    background: rgba(255,255,255,0.02);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 28px;
    overflow: hidden;
    cursor: pointer;
    
    /* Trạng thái ban đầu - ẩn */
    opacity: 0;
    transform: translateY(60px) scale(0.9);
    
    /* Transition - THÊM opacity */
    transition: 
        opacity 0.7s cubic-bezier(0.25, 1, 0.5, 1),
        transform 0.7s cubic-bezier(0.25, 1, 0.5, 1),
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

/* Khi có class visible - HIỆU ỨNG SCROLL */
.memory-card.visible, .pet-card.visible {
    /* Dùng transition thay vì animation để tránh giật */
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: 
        opacity 0.7s cubic-bezier(0.25, 1, 0.5, 1),
        transform 0.7s cubic-bezier(0.25, 1, 0.5, 1),
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

/* Stagger delay cho scroll animation */
.memory-card:nth-child(1), .pet-card:nth-child(1)  { animation-delay: 0s; }
.memory-card:nth-child(2), .pet-card:nth-child(2)  { animation-delay: 0.1s; }
.memory-card:nth-child(3), .pet-card:nth-child(3)  { animation-delay: 0.2s; }
.memory-card:nth-child(4), .pet-card:nth-child(4)  { animation-delay: 0.3s; }
.memory-card:nth-child(5), .pet-card:nth-child(5)  { animation-delay: 0.4s; }
.memory-card:nth-child(6), .pet-card:nth-child(6)  { animation-delay: 0.5s; }
.memory-card:nth-child(7), .pet-card:nth-child(7)  { animation-delay: 0.6s; }
.memory-card:nth-child(8), .pet-card:nth-child(8)  { animation-delay: 0.7s; }
.memory-card:nth-child(9), .pet-card:nth-child(9)  { animation-delay: 0.8s; }
.memory-card:nth-child(10), .pet-card:nth-child(10) { animation-delay: 0.9s; }
.memory-card:nth-child(11), .pet-card:nth-child(11) { animation-delay: 1.0s; }
.memory-card:nth-child(12), .pet-card:nth-child(12) { animation-delay: 1.1s; }

/* HOVER - phóng to + nổi lên (KHÔNG delay, transition riêng) */
.memory-card:hover, .pet-card:hover {
    transform: translateY(-15px) scale(1.08) !important;
    border-color: rgba(0,212,255,0.5) !important;
    box-shadow: 0 30px 60px rgba(0,212,255,0.2) !important;
}

/* Image placeholder - transition cho hover */
.image-placeholder {
    height: 100%;
    width: 100%;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.memory-card:hover .image-placeholder,
.pet-card:hover .image-placeholder {
    transform: scale(1.15);
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.8s;
}

.memory-card:hover .image-placeholder::before,
.pet-card:hover .image-placeholder::before {
    left: 100%;
}

/* Social */
.social {
    padding: 15vh 8% 20vh;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 2.5rem 1rem;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
}

.social-link:hover {
    transform: translateY(-20px) rotateX(10deg);
}

.social-icon {
    width: 70px;
    height: 70px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
    font-size: 1.6rem;
    transition: all 0.4s ease;
}

.social-link:hover .social-icon {
    background: linear-gradient(135deg, rgba(0,212,255,0.3), rgba(255,0,212,0.3));
    border-color: rgba(0,212,255,0.5);
    box-shadow: 0 25px 50px rgba(0,212,255,0.25);
    transform: perspective(500px) rotateX(360deg) scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .memories-grid, .pets-grid { 
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
        gap: 1.5rem; 
    }
    .social-links { gap: 2.5rem; }
    .hero-top-text { top: 1.2rem; }
}

/* ========== LAZY LOAD ========== */
.lazy .image-placeholder {
    opacity: 1;
    transition: opacity 0.5s ease;
}

.lazy-loaded .image-placeholder {
    opacity: 1;
}
/* ========== LOADER ========== */
.loader {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.8s;
}

.loader.done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 2rem;

    background:
        linear-gradient(
            90deg,
            #ff0055,
            #ff9900,
            #ffee00,
            #00ff88,
            #00d4ff,
            #7b61ff,
            #ff00ff,
            #ff0055
        );

    background-size: 300% 100%;

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;

    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;

    animation: rgbMove 2.5s linear infinite;
}

@keyframes rgbMove {
    from {
        background-position: 0%;
    }

    to {
        background-position: 300%;
    }
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loader-progress {
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #ff00d4);
    border-radius: 2px;
    animation: loading 1.5s ease-in-out infinite;
}

/* Fade tại chỗ - không di chuyển */
.loader-bar,
.loader-percent {
    transition:
        opacity 0.8s ease,
        filter 0.8s ease;
}

.loader-bar.hide,
.loader-percent.hide {

    opacity: 0;

    filter:
        blur(8px);

    pointer-events: none;

}

.loader-btn {
    padding: 14px 42px;
    background:
        rgba(255,255,255,0.06);
    /* VIỀN DÀY HƠN */
    border:
        2px solid
        rgba(255,255,255,0.32);
    color: white;
    font-family:
        'Playfair Display',
        serif;
    font-size: 16px;
    border-radius: 999px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: scale(.95);
    transition:
        opacity .8s ease,
        transform .8s ease,
        box-shadow .35s ease,
        border-color .35s ease;
    /* AURA */
    box-shadow:
        0 0 15px rgba(255,255,255,.08),
        0 0 35px rgba(255,255,255,.06);
    backdrop-filter:
        blur(18px);
    position: relative;
    overflow: hidden;
    position:relative;
    top:-50px;
}

.loader-btn.show {

    opacity: 1;

    transform: scale(1);

    pointer-events: auto;

    animation:
        loaderAura 3s ease-in-out infinite;

}

.loader-btn:hover {

    border-color:
        rgba(255,255,255,.75);

    box-shadow:

        0 0 25px rgba(255,255,255,.18),

        0 0 60px rgba(255,255,255,.12),

        0 0 100px rgba(255,255,255,.06);

}

@keyframes loaderAura {

    0% {

        box-shadow:

            0 0 20px rgba(255,255,255,.08),

            0 0 50px rgba(255,255,255,.05);

    }

    50% {

        box-shadow:

            0 0 35px rgba(255,255,255,.18),

            0 0 90px rgba(255,255,255,.08);

    }

    100% {

        box-shadow:

            0 0 20px rgba(255,255,255,.08),

            0 0 50px rgba(255,255,255,.05);

    }

}

.loader-btn:hover {
    background: rgba(255,255,255,0.15);

    transform: translateY(-3px);

    box-shadow:
        0 0 30px rgba(255,255,255,.15);
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}

/* ========== NAV MENU ========== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 500;
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    background: transparent;
}

.nav.scrolled {
    padding: 1rem 3rem;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav.hidden {
    transform: translateY(-100%);
}

.nav-logo {

    font-family:
        'Playfair Display',
        serif;

    font-style:
        italic;

    font-size:
        1.2rem;

    color:
        white;

    text-decoration:
        none;

    position:
        relative;

    transition:
        transform .35s ease,
        filter .35s ease;

}

/* underline RGB */
.nav-logo::after {

    content:'';

    position:absolute;

    left:0;

    bottom:-6px;

    width:0;

    height:2px;

    border-radius:99px;

    background:
        linear-gradient(
            90deg,
            #00d4ff,
            #ff00d4,
            #00ff88,
            #00d4ff
        );

    background-size:
        300%;

    transition:
        width .35s ease;

}

/* hover */
.nav-logo:hover {

    transform:
        translateY(-2px);

    filter:

        drop-shadow(
            0 0 8px
            rgba(0,212,255,.5)
        )

        drop-shadow(
            0 0 16px
            rgba(255,0,212,.4)
        );

}

.nav-logo:hover::after {

    width:100%;

    animation:
        rgbMove
        2s linear infinite;

}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: color 0.3s, opacity 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: #00d4ff;
    transition: width 0.3s;
}

.nav-links a:hover {
    color: #00d4ff;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ========== SKELETON LOADING ========== */
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.03) 25%,
        rgba(255,255,255,0.08) 50%,
        rgba(255,255,255,0.03) 75%
    ) !important;
    background-size: 200% 100% !important;
    animation: shimmer 1.5s infinite !important;
}

/* ========== HOVER GLOW EFFECT ========== */
.memory-card::before,
.pet-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: linear-gradient(
        135deg,
        rgba(0, 212, 255, 0.15) 0%,
        transparent 50%,
        rgba(255, 0, 212, 0.15) 100%
    );
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 2;
    pointer-events: none;
}

.memory-card:hover::before,
.pet-card:hover::before {
    opacity: 1;
}

/* ========== MOBILE NAV ========== */
@media (max-width: 768px) {
    .nav {
        padding: 1rem 1.5rem;
    }
    .nav-links {
        display: none;
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.scroll-indicator.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
}

.mouse-icon {
    width: 24px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    position: relative;
}

.mouse-icon::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 3px;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { 
        transform: translateX(-50%) translateY(0); 
        opacity: 1; 
    }
    50% { 
        transform: translateX(-50%) translateY(8px); 
        opacity: 0.3; 
    }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    transform: translateY(-100%);
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.detail-overlay::-webkit-scrollbar {
    display: none;
}

.detail-overlay.active {
    transform: translateY(0);
}

/* Image container với zoom effect */
.detail-img-wrap {
    width: 100%;
    height: 55vh;
    overflow: hidden;
    position: relative;
}

.detail-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.15);
    opacity: 0.7;
    transition: all 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.detail-overlay.active .detail-img-wrap img {
    transform: scale(1);
    opacity: 1;
}

/* Gradient overlay bên dưới ảnh */
.detail-img-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to top, #000, transparent);
}

/* Text content */
.detail-text {
    max-width: 800px;
    margin: -80px auto 0;
    padding: 0 2rem 4rem;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.77, 0, 0.175, 1) 0.2s;
}

.detail-overlay.active .detail-text {
    opacity: 1;
    transform: translateY(0);
}

.detail-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-style: italic;
    font-weight: 400;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.detail-text .cat {
    font-size: 11px;
    letter-spacing: 0.25em;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.detail-text .cat::before {
    content: '';
    width: 30px;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
}

.detail-text p {
    font-size: 1.1rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

.detail-close {

    position: fixed;
    
    top:85px;

    margin-left:78px;

    z-index: 10000;

    width: 48px;
    height: 48px;

    background: transparent;

    border: 0.2px solid rgba(213, 212, 212, 0.8);
    border-radius: 50%;

    color: rgb(205, 203, 203);
    font-size: 28px;
    -webkit-text-stroke: 0.5px currentColor;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    transform: scale(.8);

    overflow: hidden;

    transition:
        transform .4s cubic-bezier(.77,0,.175,1),
        border-color .4s ease,
        color .25s ease;
}

.detail-close::before {

    content: "";

    position: fixed;

    width: 160%;
    height: 160%;

    background: white;

    left: -180%;
    bottom: -180%;

    transform: rotate(45deg);

    transition:
        left .5s cubic-bezier(.77,0,.175,1),
        bottom .5s cubic-bezier(.77,0,.175,1);

    z-index: -1;

}

.detail-overlay.active .detail-close {
    opacity: 1;
    transform: scale(1);
    transition-delay: 0.5s;
}

.detail-close:hover {

    transform: scale(1.08);

    color: black;

}


.detail-close:hover::before {

    transform: scaleX(1);

    left: -30%;
    bottom: -30%;

}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .memories-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .pets-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    /* Nav */
    .nav {
        padding: 1rem 1.5rem;
    }
    
    .nav-logo {
        font-size: 1.2rem;
    }
    
    /* Hero */
    .hero-name {
        font-size: clamp(2rem, 10vw, 3rem);
    }
    
    /* Grids */
    .memories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .pets-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Cards */
    .memory-card,
    .pet-card {
        height: 280px;
    }
    
    /* Social */
    .social-links {
        gap: 1.5rem;
    }
    
    .social-link {
        padding: 1.5rem;
    }
    
    .social-icon {
        width: 56px;
        height: 56px;
        font-size: 1.3rem;
    }
    
    /* Hide cursor on mobile */
    .cursor,
    .cursor-dot {
        display: none;
    }
    
    body {
        cursor: auto;
    }
    
    /* Detail */
    .detail-img-wrap {
        height: 40vh;
    }
    
    .detail-text {
        padding: 0 1.5rem 3rem;
    }
    
    .detail-text p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .pets-grid {
        grid-template-columns: 1fr;
    }
    
    .memory-card,
    .pet-card {
        height: 250px;
    }
    
    .detail-info {
        grid-template-columns: 1fr;
    }
}

/* Performance optimizations */
.hero,
.memories,
.pets {
    will-change: transform;
}

.particles,
.loader {
    will-change: opacity;
}

/* Social icon - thêm icon bounce nhẹ */
.social-icon i {
    transition: transform 0.3s ease;
}

.social-link:hover .social-icon i {
    transform: scale(1.3);
}

/* Nav link - thêm slide effect */
.nav-links a span {
    display: inline-block;
    transition: transform 0.3s ease;
}

.nav-links a:hover span {
    transform: translateX(5px);
}

/* Loader Logo với RGB */
.loader-logo {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
    
    /* HIỆU ỨNG RGB - gradient chạy */
    background: linear-gradient(
        90deg,
        #00d4ff,
        #ff00d4,
        #00ff88,
        #00d4ff
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: rgbMove 3s linear infinite;
}

@keyframes rgbMove {
    from { background-position: 0% center; }
    to { background-position: 300% center; }
}

/* Loader Percent */
.loader-percent {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1rem;
    font-weight: 300;
}

/* Loader Bar */
.loader-bar {
    width: 180px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 2.5rem;
}

.loader-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00d4ff, #ff00d4);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.scroll-indicator span {
    font-size: 10px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.mouse-icon {
    width: 24px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    position: relative;
}

.mouse-icon::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 3px;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { 
        transform: translateX(-50%) translateY(0); 
        opacity: 1; 
    }
    50% { 
        transform: translateX(-50%) translateY(8px); 
        opacity: 0.3; 
    }
}

/*========== VIEW ==========*/

.view-box{

position:absolute;

bottom:70px;

transform:
translateX(
-50%
);

display:flex;

align-items:center;

gap:12px;

opacity:0;

transition:1s;

}


.view-box.show{

opacity:1;

transform:
translateY(
0
);

}


.view-eye{

font-size:28px;

filter:

drop-shadow(
0 0 12px
rgba(
255,
255,
255,
.4
)
);

animation:

eyeFloat

3s

ease-in-out

infinite;

}


@keyframes eyeFloat{

0%{

transform:
translateX(0);

}

25%{

transform:
translateX(3px);

}

50%{

transform:
translateX(-3px);

}

100%{

transform:
translateX(0);

}

}


.view-info{

padding:

10px
18px;

border:

1px solid
rgba(
255,
255,
255,
.1
);

background:

rgba(
255,
255,
255,
.05
);

backdrop-filter:

blur(
20px
);

border-radius:

999px;

font-size:

14px;

color:

rgba(
255,
255,
255,
.8
);

}


#view-count{

font-size:

14px;

font-weight:

700;

color:

white;

margin-right:

8px;

}
.gallery-section{

    position:relative;

    min-height:120vh;

    width:100%;

    background:#000;

}

.gallery-item{

    position:absolute;

    cursor:pointer;

    transition:0.5s;

}

.gallery-item:hover{

    transform:translateY(-12px) scale(1.05);

}

.gallery-item img{

    width:280px;

    height:380px;

    object-fit:cover;

    border-radius:12px;

    display:block;

}

.gallery-info{

    display:flex;

    justify-content:space-between;

    margin-top:8px;

    font-size:13px;

}

.gallery-1{

    top:200px;

    left:28%;

}

.gallery-2{

    top:500px;

    right:25%;

}
@keyframes galleryFlash{

    0%{
        transform:scale(1);
        box-shadow:none;
    }

    50%{
        transform:scale(1.08);
        box-shadow:
        0 0 40px rgba(255,255,255,.7);
    }

    100%{
        transform:scale(1);
        box-shadow:none;
    }

}

.gallery-highlight{

    animation:
    galleryFlash
    0.9s
    ease;

}
.detail-card{

    width:min(2000px,99%);

    margin:40px auto;

    border-radius:24px;

    overflow:hidden;

    border:1px solid rgba(255,255,255,.15);

    background:#050505;

}

.detail-cover-wrap{

    padding:28px;

}

.detail-cover-wrap img{

    width:100%;

    height:650px;

    object-fit:cover;

    border-radius:18px;

    display:block;

}

.detail-bottom{

    display:grid;

    grid-template-columns:
    1fr
    2fr
    1fr;

    gap:60px;

    padding:35px;

    border-top:
    1px solid rgba(255,255,255,.1);

}

.detail-left h3,
.detail-right h3{

    font-size:24px;

    font-weight:500;

}

.detail-left p{

    margin-top:8px;

    color:rgba(255,255,255,.6);

}

.detail-center p{

    line-height:1.8;

    color:rgba(255,255,255,.75);

}
.social.highlight {
    animation: socialFocus 900ms cubic-bezier(.22,.61,.36,1);
}

@keyframes socialFocus {

    0%{
        transform: scale(0.98);
        opacity:.7;
        filter:brightness(.8);
    }

    35%{
        transform: scale(1.015);
        opacity:1;
        filter:brightness(1.2);
    }

    100%{
        transform: scale(1);
        filter:brightness(1);
    }

}

.social.highlight::before{

    content:"";

    position:absolute;

    inset:0;

    border:1px solid rgba(255,255,255,.25);

    border-radius:18px;

    pointer-events:none;

    animation:borderFlash .9s ease;

}

@keyframes borderFlash{

    0%{

        opacity:0;

        transform:scale(.98);

    }

    30%{

        opacity:1;

    }

    100%{

        opacity:0;

        transform:scale(1.01);

    }

}

/* ICON */

.social.highlight .social-link{

    animation:iconFloat .5s ease forwards;

}

.social.highlight .social-link:nth-child(1){

    animation-delay:.05s;

}

.social.highlight .social-link:nth-child(2){

    animation-delay:.12s;

}

.social.highlight .social-link:nth-child(3){

    animation-delay:.19s;

}

.social.highlight .social-link:nth-child(4){

    animation-delay:.26s;

}

@keyframes iconFloat{

    0%{

        transform:translateY(15px);

        opacity:.5;

    }

    60%{

        transform:translateY(-3px);

        opacity:1;

    }

    100%{

        transform:translateY(0);

    }

}

.social{

    position:relative;

}

.social-highlight{

    animation:socialFocus .9s cubic-bezier(.22,.61,.36,1);

}

@keyframes socialFocus{

0%{

transform:scale(.97);

opacity:.7;

filter:brightness(.7);

}

50%{

transform:scale(1.02);

filter:brightness(1.2);

}

100%{

transform:scale(1);

opacity:1;

filter:brightness(1);

}

}

.contact-title{

    font-size:42px;

    font-weight:500;

    letter-spacing:4px;

    text-align:center;

    margin-bottom:60px;

    opacity:.75;

    transition:.4s;

}

.contact-title.active{

    animation:titleFlash .45s ease;

}

@keyframes titleFlash{

0%{

opacity:.4;

transform:translateY(10px);

filter:blur(4px);

}

50%{

opacity:1;

transform:translateY(0);

text-shadow:

0 0 18px rgba(255,255,255,.45),

0 0 45px rgba(255,255,255,.15);

}

100%{

opacity:.75;

filter:none;

transform:translateY(0);

}

}

.social-link.flash{

    animation:iconFlash .35s ease;

}

@keyframes iconFlash{

0%{

transform:translateY(8px) scale(.96);

opacity:.5;

filter:brightness(.8);

}

60%{

transform:translateY(-2px) scale(1.05);

opacity:1;

filter:brightness(1.4);

}

100%{

transform:translateY(0) scale(1);

filter:none;

}

}

.detail-gallery{

margin-top:70px;

}

.detail-gallery h2{

font-size:32px;

font-weight:500;

margin-bottom:35px;

}

#gallery-count{

opacity:.55;

font-size:18px;

margin-left:10px;

}

.gallery-grid{

column-count:3;

column-gap:18px;

}

.gallery-grid img{

width:100%;

margin-bottom:18px;

border-radius:18px;

display:block;

break-inside:avoid;

transition:.35s;

cursor:pointer;

}

.gallery-grid img:hover{

transform:scale(1.02);

filter:brightness(1.08);

}

@media(max-width:900px){

.gallery-grid{

column-count:2;

}

}

@media(max-width:600px){

.gallery-grid{

column-count:1;

}

}