:root {
    --bg-color: #f4f4f4;
    --text-color: #333;
    --accent-color: #555;
    --font-main: 'Shippori Mincho', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    min-height: 100vh;
}

/* Site Header */
.site-header {
    width: 100%;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.header-branding {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    display: inline-block;
    /* Hug the text for precise positioning */
}

.site-title {
    font-size: 2.5rem;
    font-family: 'Yuji Syuku', serif;
    font-weight: normal;
    color: #333;
    margin-bottom: 0.5rem;
}

.site-subtitle {
    font-size: 1rem;
    color: #777;
    letter-spacing: 0.1rem;
}

.header-logo-bg {
    position: absolute;
    top: 50%;
    left: 75%;
    /* Anchor near the right end of the text area */
    transform: translateY(-50%);
    height: 160px;
    /* Large but balanced */
    width: auto;
    opacity: 0.5;
    z-index: -1;
    /* Behind text */
    pointer-events: none;
}

/* Navigation */
.site-nav {
    width: 100%;
    background-color: #fce4ec;
    /* Light pinkish to match reference feel */
    padding: 1rem 0;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 900;
}

.site-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 0;
    padding: 0;
}

.site-nav a {
    text-decoration: none;
    color: #555;
    font-size: 1.1rem;
    font-weight: bold;
    transition: color 0.3s;
}

.site-nav a:hover {
    color: #000;
}

@media (max-width: 768px) {
    .site-nav {
        padding: 0.5rem 0;
        /* Reduced padding */
    }

    .site-nav ul {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
        /* Tighter gap */
    }

    .site-nav li {
        width: calc(50% - 10px);
        text-align: center;
        margin: 2px 0;
    }

    .site-nav a {
        font-size: 0.85rem;
        /* Smaller font */
        letter-spacing: 0.05rem;
    }
}

/* Music Player (Floating) */
.music-player-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
    /* Above intro overlay if needed, or check z-indexing */
}

.player-btn {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.player-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* About Section */
.about-section {
    padding: 4rem 2rem;
    background-color: #fff;
    /* or match bg-color */
    text-align: center;
    border-bottom: 1px solid #eee;
}

.about-container {
    max-width: 800px;
    margin: 0 auto;
}

.about-section h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: normal;
    font-family: 'Shippori Mincho', serif;
}

.about-text {
    font-size: 1.1rem;
    line-height: 2;
    color: #444;
    font-family: 'Shippori Mincho', serif;
}

/* Ad Slider Section */
.ad-slider-section {
    padding: 2rem 0;
    background-color: #f9f9f9;
    overflow: hidden;
    width: 100%;
}

.slider-container {
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2.5rem;
    /* Large padding to make the image look "further back" */
    background-color: #fff;
    /* White frame for the image */
}

.slide a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.slide img {
    width: auto;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: 120px;
    /* Reduced height to prevent stretching small GIFs */
}

/* Slider Controls */
.slider-controls {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10;
}

.slider-dots {
    display: flex;
    gap: 8px;
}

.slider-prev,
.slider-next {
    background: none;
    border: none;
    color: #333;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
    transition: color 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-prev:hover,
.slider-next:hover {
    color: #fce4ec;
    transform: scale(1.2);
}

.dot {
    width: 8px;
    height: 8px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: #fce4ec;
    /* Matching the pinkish accent */
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

/* Footer */
.site-footer {
    background-color: #333;
    color: #fff;
    padding: 3rem 1rem;
    text-align: center;
    margin-top: 4rem;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: normal;
    border-bottom: 1px solid #555;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.contact-email {
    font-family: monospace;
    font-size: 1.1rem;
    letter-spacing: 0.05rem;
}

.contact-email+.contact-email {
    margin-top: 2rem;
}

.x-logo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: #000;
    color: #fff;
    border-radius: 50%;
    margin-top: 1rem;
    transition: transform 0.2s, background-color 0.2s;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.x-logo-btn:hover {
    background-color: #333;
    transform: scale(1.1);
}

.x-logo-btn svg {
    width: 20px;
    height: 20px;
}

.copyright {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 2rem;
}

/* News Section */
.news-section {
    padding: 4rem 2rem;
    background-color: white;
    text-align: center;
}

/* New Release Card styling */
.new-release-card {
    background-color: #fafafa;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.new-release-cover {
    width: 100%;
    max-width: 250px;
    /* Reverted to previous size */
    height: auto;
    border-radius: 4px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Past Works Grid */
.past-works-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    flex-wrap: wrap;
}

.past-work-card {
    background-color: #fafafa;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 250px;
    max-width: 300px;
}

.past-work-cover {
    width: 100%;
    max-width: 140px;
    /* Reverted to previous size */
    height: auto;
    border-radius: 4px;
    margin-bottom: 0.8rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.past-work-card .book-title {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.past-work-card .consignment-text {
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

@media (max-width: 600px) {
    .past-work-card {
        max-width: 100%;
        flex-basis: 100%;
    }
}

.book-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
    width: 100%;
    margin-top: 0.5rem;
}

.btn-link {
    display: block;
    padding: 0.8rem 1.5rem;
    background-color: #fce4ec;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    width: 80%;
    max-width: 300px;
    font-size: 0.9rem;
}

.btn-link:hover {
    background-color: #f8bbd0;
}


/* Intro Animation */
.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease-in-out;
}

.intro-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.intro-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    z-index: 2;
    opacity: 0;
    animation: textFadeIn 2s ease-in-out forwards;
}

.intro-logo-img {
    height: 300px;
    width: auto;
    opacity: 0.9;
}

.intro-text-group {
    display: flex;
    flex-direction: row-reverse;
    gap: 1.5rem;
    height: 300px;
    align-items: center;
}

.intro-title {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-family: 'Yuji Syuku', serif;
    font-size: 4rem;
    color: #000;
    letter-spacing: 0.5rem;
    line-height: 1;
    margin: 0;
}

.intro-subtitle {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-family: 'Shippori Mincho', serif;
    font-size: 1.2rem;
    color: #333;
    letter-spacing: 0.3rem;
    text-transform: uppercase;
    display: flex;
    align-items: end;
    justify-content: center;
    margin: 0;
}



@keyframes textFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    50% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sand Particles (Simple CSS implementation) */
.sand-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle, #d2b48c 1px, transparent 1px),
        radial-gradient(circle, #f4a460 1px, transparent 1px);
    background-size: 50px 50px, 30px 30px;
    background-position: 0 0, 15px 15px;
    opacity: 0.3;
    animation: sandDrift 20s linear infinite;
}

@keyframes sandDrift {
    0% {
        background-position: 0 0, 15px 15px;
    }

    100% {
        background-position: 100px 50px, 115px 65px;
    }
}