@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;700;900&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap');

:root {
    --gold-primary: #C5A059;
    --gold-light: #EBCF87;
    --gold-dark: #8A6E36;
    --black-bg: #0a0a0a;
    --red-fire: #FF4500;
}

body {
    background-color: var(--black-bg);
    color: #f5f5f5;
    font-family: 'Zen Kaku Gothic New', sans-serif;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Noto Serif JP', serif;
}

/* Gold Text Gradient */
.text-gold {
    background: linear-gradient(to bottom, var(--gold-light), var(--gold-primary), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--gold-primary);
    /* Fallback */
    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
}

.text-gold-flat {
    color: var(--gold-primary);
}

.border-gold {
    border-color: var(--gold-primary);
}

.bg-gold {
    background: linear-gradient(to right, var(--gold-dark), var(--gold-primary));
}

/* Fire Background Effect */
.fire-bg {
    background: radial-gradient(circle at bottom, #1a0500 0%, #000000 70%);
    position: relative;
    overflow: hidden;
}

.fire-bg::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/6.png');
    /* Placeholder text texture or noise usually, but here we use gradient overlay for now */
    background: radial-gradient(ellipse at center bottom, rgba(255, 69, 0, 0.2) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

/* Embers Animation */
.ember {
    position: absolute;
    bottom: -10px;
    width: 4px;
    height: 4px;
    background: #ff4500;
    border-radius: 50%;
    opacity: 0;
    animation: rise 4s infinite linear;
    box-shadow: 0 0 10px #ff4500;
}

@keyframes rise {
    0% {
        bottom: -10px;
        opacity: 0;
        transform: translateX(0);
    }

    10% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        bottom: 100vh;
        opacity: 0;
        transform: translateX(-20px);
    }
}

/* Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(197, 160, 89, 0.2);
}

.text-shadow-glow {
    text-shadow: 0 0 10px rgba(197, 160, 89, 0.5);
}

.btn-summit {
    background: linear-gradient(45deg, #8A6E36, #C5A059);
    color: #000;
    font-weight: bold;
    border: 1px solid #EBCF87;
    transition: all 0.3s ease;
    text-shadow: none;
}

.btn-summit:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.4);
    filter: brightness(1.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes gradientX {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient-x {
    background-size: 200% 200%;
    animation: gradientX 5s ease infinite;
}

/* Glass panel hover effects for Nav */
nav a:hover {
    text-shadow: 0 0 8px rgba(197, 160, 89, 0.6);
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--gold-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
    box-shadow: 0 0 0 rgba(197, 160, 89, 0);
    backdrop-filter: blur(5px);
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#back-to-top.visible:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.3);
    border-color: var(--gold-light);
    background: rgba(197, 160, 89, 0.1);
}

#back-to-top svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--gold-primary);
    transition: transform 0.3s ease;
}

#back-to-top:hover svg {
    transform: translateY(-3px);
    color: var(--gold-light);
}

@media (max-width: 768px) {
    #back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 3rem;
        height: 3rem;
    }
}