:root {
    --bg-color-dark: #00000a;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --accent-color: #ffffff;
    --icon-color: #42a5f5;
    --card-bg: rgba(20, 20, 30, 0.7);
    --card-border: rgba(255, 255, 255, 0.15);
    
    --fancy-font: 'Playfair Display', serif;
    --body-font: 'Poppins', sans-serif;

    --grad-birthday: linear-gradient(-45deg, #ff9a9e, #fad0c4, #fad0c4, #ffdde1);
    --grad-newyear: linear-gradient(-45deg, #141E30, #243B55, #141E30, #000000);
    --grad-anniversary: linear-gradient(-45deg, #ff758c, #ff7eb3, #ff758c, #f7cece);
    --grad-memorial: linear-gradient(-45deg, #0f0f0f, #232526, #414345, #000000);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--body-font);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.8s ease;
    overflow-x: hidden;
    overflow-y: auto;
}

body.mode-projects {
    background-color: var(--bg-color-dark) !important;
    background-image: none !important;
    overflow-y: auto !important;
}
body.mode-projects .bg-animation { display: none; }

body.mode-celebration {
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    overflow: hidden; 
}

body.theme-birthday { background: var(--grad-birthday); color: #d6336c; }
body.theme-newyear { background: var(--grad-newyear); color: #F7E7CE; }
body.theme-anniversary { background: var(--grad-anniversary); color: #880e4f; }
body.theme-memorial { background: var(--grad-memorial); color: #E0E0E0; }

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.view-section { width: 100%; min-height: 100vh; }

#view-projects { position: relative; z-index: 10; }

.rubber-band {
    position: fixed; left: 0; width: 100%; height: 2px;
    background-color: var(--icon-color);
    box-shadow: 0 0 15px 5px var(--icon-color);
    z-index: 999; opacity: 0; transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}
.rubber-band.visible { opacity: 1; }
.top { top: 0; }
.bottom { bottom: 0; }

header { text-align: center; padding: 5rem 2rem 4rem; }
.header-title { font-size: 3.5rem; font-weight: 700; text-shadow: 0 0 10px rgba(255, 255, 255, 0.3); }

footer { text-align: center; padding: 3rem 2rem; margin-top: 4rem; color: var(--text-secondary); font-size: 0.9rem; }
main { padding: 1rem 2rem; width: 100%; max-width: 1300px; margin: 0 auto; }

.projects-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem; list-style: none;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 15px; padding: 2rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    animation: cardFadeIn 0.7s forwards;
    position: relative; overflow: hidden;
}
@keyframes cardFadeIn { from {opacity: 0; transform: translateY(30px);} to {opacity: 1; transform: translateY(0);} }

.glass-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 15px; border: 2px solid transparent;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--icon-color), transparent) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out; mask-composite: exclude;
    opacity: 0; transition: opacity 0.3s ease-in-out; pointer-events: none;
}
.glass-card:hover::before { opacity: 1; }
.glass-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }

.card-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.project-icon { font-size: 1.8rem; color: var(--icon-color); }
.glass-card h2 { font-size: 1.6rem; font-weight: 500; color: #fff; }
.glass-card p { font-size: 1rem; font-weight: 300; color: var(--text-secondary); margin-bottom: 1.5rem; min-height: 55px; }
.btn-modern {
    display: inline-block; padding: 0.7rem 1.6rem; font-weight: 500;
    color: var(--text-primary); text-decoration: none; background-color: transparent;
    border: 1px solid var(--card-border); border-radius: 8px; transition: all 0.3s ease;
}
.btn-modern:hover { background-color: var(--accent-color); border-color: var(--accent-color); color: var(--bg-color-dark); }


#view-celebration {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    display: flex; justify-content: center; align-items: center;
    z-index: 2000;
}
.content-center { text-align: center; position: relative; z-index: 2002; }

.decoration-wrapper {
    height: 180px; display: flex; justify-content: center; align-items: flex-end;
    margin-bottom: 20px; overflow: visible;
}
.deco-svg {
    width: 180px; height: 180px; display: none;
    filter: drop-shadow(0 8px 12px rgba(0,0,0,0.2));
}
.deco-svg.active {
    display: block; animation: floatUp 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#celebration-title {
    font-family: var(--fancy-font); font-size: 5rem; font-style: italic;
    margin-bottom: 15px; text-align: center; color: inherit;
    text-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
#celebration-message { font-size: 1.8rem; opacity: 0.9; font-weight: 300; color: inherit;}

#skip-btn {
    margin-top: 40px;
    background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.4);
    color: inherit; padding: 12px 24px; border-radius: 30px;
    font-size: 1rem; cursor: pointer; backdrop-filter: blur(5px);
    transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--body-font);
}
#skip-btn:hover { background: rgba(255,255,255,0.9); color: #000; transform: translateY(-2px); }

@keyframes floatUp { from { opacity: 0; transform: translateY(60px) scale(0.5); } to { opacity: 1; transform: translateY(0) scale(1); } }
.animate-pop { animation: popIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.animate-fade { opacity: 0; animation: fadeIn 1.5s ease forwards 0.5s; }
@keyframes popIn { 0% { transform: scale(0.8); opacity: 0; filter: blur(5px); } 100% { transform: scale(1); opacity: 1; filter: blur(0); } }
@keyframes fadeIn { to { opacity: 1; } }

.flame { transform-box: fill-box; transform-origin: center bottom; animation: flicker 0.1s infinite alternate; }
.firework-burst { transform-origin: center; animation: pulseBurst 2s infinite ease-in-out; }
.sparkle { transform-origin: center; animation: twinkle 1.5s infinite alternate; }
@keyframes flicker { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.15); opacity: 0.8; } }
@keyframes pulseBurst { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: 0.8; } }
@keyframes twinkle { 0% { transform: scale(0.8); opacity: 0.6; } 100% { transform: scale(1.4); opacity: 1; box-shadow: 0 0 10px rgba(255,255,255,0.8); } }

.particle-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2001;
}
.particle { position: absolute; top: -50px; }

.heart-particle {
    width: 20px;
    height: 20px;
    background: var(--p-color);
    transform: rotate(45deg);
}
.heart-particle::before,
.heart-particle::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--p-color);
    border-radius: 50%;
}
.heart-particle::before { top: -10px; left: 0; }
.heart-particle::after { top: 0; left: -10px; }

@keyframes swayFall {
    0% { transform: translateY(0) rotate(0deg) translateX(0); opacity: 1; }
    50% { transform: translateY(50vh) rotate(180deg) translateX(-20px); opacity: 0.9; }
    100% { transform: translateY(110vh) rotate(360deg) translateX(0); opacity: 0; }
}

@keyframes heartFall {
    0% { transform: translateY(0) rotate(45deg) translateX(0); opacity: 1; }
    25% { transform: translateY(25vh) rotate(90deg) translateX(20px); }
    50% { transform: translateY(50vh) rotate(225deg) translateX(-20px); opacity: 0.9; }
    75% { transform: translateY(75vh) rotate(315deg) translateX(20px); }
    100% { transform: translateY(110vh) rotate(405deg) translateX(0); opacity: 0; }
}

@keyframes risingLight {
    0% { transform: translateY(105vh) scale(0.5); opacity: 0; }
    20% { opacity: 0.5; }
    50% { transform: translateY(50vh) scale(1); opacity: 0.3; }
    100% { transform: translateY(-10vh) scale(0.2); opacity: 0; }
}

.bg-animation { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; transition: opacity 0.5s; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); animation: float 10s infinite ease-in-out alternate; }
.blob-1 { width: 500px; height: 500px; background: rgba(255,255,255,0.2); top: -100px; left: -100px; }
.blob-2 { width: 400px; height: 400px; background: rgba(255,255,255,0.2); bottom: -50px; right: -50px; animation-delay: -5s; }
.blob-3 { width: 300px; height: 300px; background: rgba(255,255,255,0.2); bottom: 20%; left: 30%; opacity: 0.6; animation-duration: 15s; }
@keyframes float { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(30px, 50px) scale(1.1); } }

@media (max-width: 768px) {
    .header-title { font-size: 2.8rem; }
    #celebration-title { font-size: 3.5rem; }
}