/* CSS Reset and Base Styles */
:root {
    --background-start: #23192d; /* Deep Space Purple */
    --background-end: #1a0f11;   /* Dark Reddish Brown/Black */
    --surface-color: rgba(35, 25, 45, 0.5); /* Translucent Deep Purple */
    --text-color: #e6e0f0;      /* Pale Lavender */
    --text-light: #c9bde0;     /* Muted Lavender */
    --primary-color: #c471ed;    /* Bright Lilac */
    --secondary-color: #f64f59;  /* Faded Rose Accent */
    --accent-color: #a983bb;     /* Dusty Purple */
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes dancing-text {
    0%, 100% {
        transform: translateY(0) rotate(-0.5deg);
    }
    50% {
        transform: translateY(-10px) rotate(0.5deg);
    }
}

@keyframes sparkles {
    0%, 100% {
        opacity: 0.8;
        text-shadow: 0 0 8px rgba(196, 113, 237, 0.5), 0 0 16px rgba(196, 113, 237, 0.3);
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 12px rgba(196, 113, 237, 0.8), 0 0 24px rgba(246, 79, 89, 0.3), 0 0 32px rgba(246, 79, 89, 0.3);
    }
}

@keyframes move-stars {
    from { transform: translateY(0px); }
    to   { transform: translateY(-2000px); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}

@keyframes twinkle {
    0% { opacity: var(--start-opacity); }
    50% { opacity: 1; }
    100% { opacity: var(--start-opacity); }
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 4px var(--accent-color));
    }
    50% {
        filter: drop-shadow(0 0 10px var(--primary-color));
    }
}

html {
    overflow-y: scroll; /* Always show scrollbar to prevent layout shift */
}

body {
    margin: 0;
    font-family: 'Raleway', sans-serif;
    color: var(--text-color);
    background-color: transparent;
    overflow-x: hidden;
    position: relative;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari and Opera */
}

/* Layered background effect */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(-45deg, var(--background-start), var(--background-end), var(--background-start));
    background-size: 400% 400%;
    animation: gradientAnimation 20s ease infinite;
}

/* Denser, more variable starfield */
.stars, .stars2, .stars3 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 200%; /* Taller to allow for seamless scrolling */
    display: block;
    z-index: -1;
}

.stars { animation: move-stars 200s linear infinite; }
.stars2 { animation: move-stars 150s linear infinite; }
.stars3 { animation: move-stars 100s linear infinite; }

.star {
    position: absolute;
    border-radius: 50%;
    animation-name: twinkle;
    animation-iteration-count: infinite;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--surface-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 15px 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-bottom: 1px solid rgba(230, 224, 240, 0.1);
}

.navbar-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.navbar-content a {
    text-decoration: none;
    color: var(--text-light);
    padding: 10px 20px;
    font-weight: 500;
    margin: 0 10px;
    position: relative;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.8rem;
}

.navbar-content a::after {
    content: '✦';
    position: absolute;
    font-size: 1rem;
    color: var(--primary-color);
    left: 50%;
    bottom: -8px; /* Position below the link */
    transform: translateX(-50%) scale(0);
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    text-shadow: 
        0 0 4px var(--primary-color), 
        0 0 8px var(--primary-color), 
        0 0 12px var(--secondary-color);
}

.navbar-content a:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1.2);
}

.navbar-content a:hover {
    color: var(--primary-color);
}

.social-icons {
    margin-left: 25px;
    display: flex;
    align-items: center;
}

.social-icons a {
    color: var(--text-light);
    margin-left: 20px;
    font-size: 1.2rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Main Content Wrapper */
.main-content {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 120px); /* Adjust based on header/footer height */
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.main-content.fade-out {
    opacity: 0;
}


/* Introduction Section */
.introduction {
    text-align: center;
    padding: 20vh 20px 0 20px;
    max-width: 680px;
    margin: 0 auto;
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Shared H2 Styles */
.introduction h2,
.lookup-container h2,
.about-container h2,
.contact-container h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    color: var(--text-color);
    font-weight: 400;
    animation: dancing-text 12s ease-in-out infinite, sparkles 8s ease-in-out infinite;
}

.introduction h2,
.lookup-container h2 {
    margin-bottom: 20px;
}

.about-container h2,
.contact-container h2 {
     margin-bottom: 40px;
}

.introduction p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.9;
    font-weight: 300;
}

/* Swiper Carousel */
.swiper-container-wrapper {
    width: 100%;
    padding: 10vh 0 15vh 0;
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg, rgba(35, 25, 45, 0) 0%, var(--background-start) 20%, var(--background-end) 100%);
}

.swiper {
    width: 85%;
    max-width: 1400px;
    height: 500px;
    margin: 0 auto;
}

.swiper-slide {
    background-position: center;
    background-size: cover;
    width: 380px;
    height: 480px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.swiper-button-prev, .swiper-button-next {
    color: var(--accent-color);
    transition: color 0.3s ease;
    --swiper-navigation-size: 30px;
}
.swiper-button-prev:hover, .swiper-button-next:hover {
    color: var(--primary-color);
}

.swiper-pagination-bullet {
    background-color: var(--accent-color);
    opacity: 0.6;
}

.swiper-pagination-bullet-active {
    background-color: var(--primary-color);
    opacity: 1;
}

/* Footer */
footer {
    background-color: var(--surface-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 20px;
    text-align: center;
    position: fixed;
    width: 100%;
    bottom: 0;
    left: 0;
    border-top: 1px solid rgba(230, 224, 240, 0.1);
    z-index: 1000;
}

footer p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

/* Scroll Down Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 20vh;
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent-color);
    opacity: 0.7;
    transition: opacity 0.5s ease;
    text-align: center;
}

.scroll-text {
    display: block;
    font-size: 0.9rem;
    color: #f0e68c;
    text-shadow: 0 0 8px #f0e68c, 0 0 12px #daa520;
    margin-bottom: 5px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.scroll-indicator svg {
    width: 30px;
    height: 30px;
    animation: bounce 2s infinite, glow 3s infinite;
}

/* Styles for Lookup Page */
.lookup-container {
    padding: 20vh 20px 15vh 20px;
    text-align: center;
}

.lookup-container form {
    margin-bottom: 40px;
}

.lookup-container label {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.9;
    font-weight: 300;
    display: block;
    margin-bottom: 15px;
}

.lookup-container input[type="text"] {
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 50px;
    border: 1px solid var(--accent-color);
    background-color: rgba(35, 25, 45, 0.7);
    color: var(--text-color);
    width: 300px;
    max-width: 80%;
    text-align: center;
}

.lookup-container input[type="text"]::placeholder {
    color: var(--text-light);
}

.lookup-container input[type="submit"] {
    padding: 12px 30px;
    font-size: 1rem;
    border: none;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lookup-container input[type="submit"]:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--primary-color);
}

.painting-result {
    margin: 40px auto;
    padding: 40px;
    max-width: 900px;
    border-radius: 20px;
    background-color: var(--surface-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-around;
    text-align: left;
    border: 1px solid rgba(230, 224, 240, 0.1);
    color: var(--text-light);
}

.painting-result-img {
    max-width: 250px;
    height: auto;
    border-radius: 15px;
    border: 2px solid var(--accent-color);
}

.painting-info {
    max-width: 50%;
}

.painting-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--text-color);
    margin-top: 0;
}

/* Styles for About Page */
.about-container {
    padding: 20vh 20px 15vh 20px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-container .headshot {
    width: 200px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
    margin-bottom: 30px;
}

.about-container p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.9;
    font-weight: 300;
    text-align: justify;
    margin-bottom: 20px;
}

/* Styles for Contact Page */
.contact-container {
    padding: 20vh 20px 15vh 20px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-details {
    margin-bottom: 40px;
    line-height: 1.9;
    color: var(--text-light);
}

.map-container {
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(230, 224, 240, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.mapouter {
    position: relative;
    text-align: right;
    width: 100%;
    height: 400px;
}

.gmap_canvas {
    overflow: hidden;
    background: none !important;
    width: 100%;
    height: 400px;
}

.gmap_iframe {
    height: 400px !important;
}


/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 15px;
    }
    .navbar-content {
        flex-direction: column;
    }
    .navbar-content a {
        font-size: 0.8rem;
        margin: 5px 0;
    }
    .social-icons {
        margin-top: 10px;
        margin-left: 0;
    }
    
    .introduction h2,
    .lookup-container h2,
    .about-container h2,
    .contact-container h2 {
        font-size: 2.2rem;
    }

    .swiper-slide {
        width: 300px;
        height: 400px;
    }
    .swiper {
        height: 450px;
    }
}
