@import url('https://fonts.googleapis.com/css2?family=UnifrakturCook:wght@700&display=swap');

/* Base styles */
body {
    font-family: 'Arial', sans-serif;
    color: white;
    text-align: center;
    margin: 0;
    background-color: #0a0a0a;
    overflow-x: hidden;
}

#dynamic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
}

/* 🕸️ Navbar with Creepy Font and Shaky Effect */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.85);
    padding: 15px 0;
    display: flex;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

body:hover .navbar {
    opacity: 1;
    pointer-events: auto;
}

.navbar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 30px;
}

.navbar a {
    text-decoration: none;
    color: peachpuff;
    font-size: 1.2em;
    font-family: 'UnifrakturCook', cursive;
    letter-spacing: 1px;
    transition: all 0.3s;
    position: relative;
    display: inline-block;
    animation: shake 0.5s infinite;
    animation-play-state: paused;
}

.navbar a:hover {
    color: crimson;
    text-shadow: 0 0 8px rgba(220, 20, 60, 0.7);
    animation-play-state: running;
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.navbar a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: #8B0000;
    transition: all 0.3s;
    transform: translateX(-50%);
}

.navbar a:hover::after {
    width: 100%;
    box-shadow: 0 0 10px rgba(220, 20, 60, 0.8);
}

/* Hidden Navbar on Scroll */
.hidden-navbar {
    top: -80px;
}

/* Header Section with Smoke Background */
header {
    padding-top: 100px;
    margin-bottom: 40px;
    position: relative;
    background: url('public/smoke1.gif') center center;
    background-size: cover;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
}

/* Create a dim overlay for better text visibility */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

#smoke-header {
    font-family: 'UnifrakturCook', cursive;
    font-size: 3.5rem;
    margin-bottom: 15px;
    color: #eee;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    animation: creepyFloat 3s infinite ease-in-out;
}

@keyframes creepyFloat {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

.letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s forwards, shakeLetter 3s infinite ease-in-out;
    animation-delay: var(--delay, 0s);
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shakeLetter {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

/* Remove the separate smoke effect div as we've moved it to the header background */
#smoke-effect {
    display: none;
}

/* Content Sections */
section {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

h2 {
    font-family: 'UnifrakturCook', cursive;
    font-size: 2.5rem;
    margin-bottom: 25px;
    color: peachpuff;
    text-shadow: 0 0 10px rgba(220, 20, 60, 0.4);
    animation: creepyText 5s infinite ease-in-out;
}

@keyframes creepyText {
    0% { text-shadow: 0 0 10px rgba(220, 20, 60, 0.4); }
    50% { text-shadow: 0 0 15px rgba(220, 20, 60, 0.8), 0 0 30px rgba(139, 0, 0, 0.4); }
    100% { text-shadow: 0 0 10px rgba(220, 20, 60, 0.4); }
}

/* Image Container */
.img-container1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.img-container1 img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.7);
    margin-bottom: 20px;
    transition: all 0.5s;
}

.img-container1 img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.5);
}

.img-container1 p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #ddd;
    max-width: 600px;
}

/* 🎠 Carousel Sections */
#featured-relics,
#featured-finds {
    position: relative;
    overflow: hidden;
}

.carousel-container {
    perspective: 1200px;
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 30px 0;
    height: 350px;
}

.carousel-3d {
    position: relative;
    width: 300px;
    height: 300px;
    transform-style: preserve-3d;
    transition: transform 1s ease;
}

.carousel-item {
    position: absolute;
    width: 300px;
    height: 300px;
    top: 0;
    left: 0;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    backface-visibility: hidden;
    transition: all 0.5s;
}

.carousel-item:hover {
    box-shadow: 0 0 25px rgba(220, 20, 60, 0.6);
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Contact Section */
#contact-section {
    padding: 50px 20px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 0 auto;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 12px 15px;
    border-radius: 5px;
    border: 1px solid #333;
    background-color: rgba(30, 30, 30, 0.8);
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: crimson;
    box-shadow: 0 0 10px rgba(220, 20, 60, 0.5);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form button {
    padding: 12px 25px;
    background-color: rgba(139, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    font-family: 'UnifrakturCook', cursive;
    letter-spacing: 1px;
}

.contact-form button:hover {
    background-color: crimson;
    transform: translateY(-3px) rotate(-1deg);
    box-shadow: 0 5px 15px rgba(220, 20, 60, 0.4);
    animation: shake 0.5s infinite;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.9);
    padding: 20px;
    text-align: center;
    color: peachpuff;
    font-size: 1.2rem;
    border-top: 2px solid crimson;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.6);
    font-family: 'UnifrakturCook', cursive;
}

.footer-text {
    margin: 0;
    letter-spacing: 1px;
    font-style: italic;
    animation: creepyPulse 4s infinite;
}

@keyframes creepyPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Animation delay for header letters */
#smoke-header .letter:nth-child(1) { --delay: 0.1s; }
#smoke-header .letter:nth-child(2) { --delay: 0.2s; }
#smoke-header .letter:nth-child(3) { --delay: 0.3s; }
#smoke-header .letter:nth-child(4) { --delay: 0.4s; }
#smoke-header .letter:nth-child(5) { --delay: 0.5s; }
#smoke-header .letter:nth-child(6) { --delay: 0.6s; }
#smoke-header .letter:nth-child(7) { --delay: 0.7s; }
#smoke-header .letter:nth-child(8) { --delay: 0.8s; }
#smoke-header .letter:nth-child(9) { --delay: 0.9s; }
#smoke-header .letter:nth-child(10) { --delay: 1.0s; }
#smoke-header .letter:nth-child(11) { --delay: 1.1s; }
#smoke-header .letter:nth-child(12) { --delay: 1.2s; }
#smoke-header .letter:nth-child(13) { --delay: 1.3s; }
#smoke-header .letter:nth-child(14) { --delay: 1.4s; }
#smoke-header .letter:nth-child(15) { --delay: 1.5s; }
#smoke-header .letter:nth-child(16) { --delay: 1.6s; }
#smoke-header .letter:nth-child(17) { --delay: 1.7s; }
#smoke-header .letter:nth-child(18) { --delay: 1.8s; }
#smoke-header .letter:nth-child(19) { --delay: 1.9s; }
#smoke-header .letter:nth-child(20) { --delay: 2.0s; }
#smoke-header .letter:nth-child(21) { --delay: 2.1s; }

/* Creepy cursor */
body {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" style="fill:none;stroke:crimson;stroke-width:2;"><circle cx="8" cy="8" r="6"/></svg>') 8 8, auto;
}

/* Responsive Styles */
@media (max-width: 768px) {
    #smoke-header {
        font-size: 2.5rem;
    }

    .navbar ul {
        gap: 15px;
    }

    .navbar a {
        font-size: 1rem;
    }

    .carousel-container {
        height: 250px;
    }

    .carousel-item,
    .carousel-3d {
        width: 250px;
        height: 200px;
    }

    .img-container1 p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    #smoke-header {
        font-size: 6rem;
    }

    .navbar ul {
        gap: 10px;
    }

    section {
        padding: 30px 15px;
    }

    h2 {
        font-size: 4rem;
    }
    h3 {
        font-size: 30px;
    }

    .carousel-item {
            width: 200px;
            height: 150px;
            position: absolute;
            top: 50%;
            left: 50%;
            transform-origin: center center;
            transform-style: preserve-3d;
            transition: transform 0.5s ease-in-out;

    }
    .carousel-3d {
        width: 200px;
        height: 150px;
    }
}