:root {
    --primary-color: #fff;
    --text-color: #e2e8f0;
    --glass-bg: rgba(20, 25, 45, 0.45);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --accent-color: #9f7aea; /* Soft purple */
    --accent-hover: #b794f4;
    --header-height: 70px;
}

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

body {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: #0f172a;
}

h1, h2, h3, .subtitle, .btn-more, .btn-link, .logo {
    font-family: 'Noto Serif JP', serif;
}

/* Typography Utility */
.ib {
    display: inline-block;
}

/* Background Slideshow */
.bg-slideshow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
}

.bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: crossfade 24s infinite;
}

.bg1 { background-image: url('bg1.png'); animation-delay: 0s; }
.bg2 { background-image: url('bg2.png'); animation-delay: 8s; }
.bg3 { background-image: url('bg3.png'); animation-delay: 16s; }

@keyframes crossfade {
    0% { opacity: 0; transform: scale(1); }
    10% { opacity: 1; }
    33% { opacity: 1; }
    43% { opacity: 0; transform: scale(1.05); }
    100% { opacity: 0; transform: scale(1); }
}

/* Header & Navigation */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Prominent BGM Button in Header */
.audio-control-header {
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 8px 16px;
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(159, 122, 234, 0.4);
    transition: all 0.3s ease;
}

.audio-control-header:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(159, 122, 234, 0.6);
}

.audio-control-header.playing {
    background: #10b981;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.audio-control-header.playing:hover {
    background: #34d399;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Navigation Menu */
.nav-menu ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-menu a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-menu a:hover {
    color: var(--accent-hover);
}

/* Layout */
.container {
    max-width: 900px;
    margin: calc(var(--header-height) + 40px) auto 40px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--glass-shadow);
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-character {
    width: 250px;
    height: 250px;
    margin-bottom: 20px;
    position: relative;
}

.floating-char {
    width: 100%;
    height: auto;
    object-fit: contain;
    animation: float 4s ease-in-out infinite;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5));
}

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

.subtitle {
    font-size: 1.2rem;
    color: var(--accent-hover);
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.main-title {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
    letter-spacing: 4px;
}

.description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
}

/* Section Shared */
.section-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    scroll-margin-top: calc(var(--header-height) + 20px);
}

h2 {
    font-size: 2rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    display: inline-block;
    align-self: flex-start;
}

h3 {
    font-size: 1.3rem;
    color: var(--accent-hover);
    margin-bottom: 10px;
}

ul { list-style-type: none; }
li { margin-bottom: 10px; position: relative; padding-left: 20px; }
li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 0.9rem;
}

/* Media Grid & YouTube */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.youtube-container {
    aspect-ratio: 16 / 9;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.youtube-container iframe {
    width: 100%;
    height: 100%;
}

.media-placeholder {
    background: rgba(255, 255, 255, 0.1);
    border: 1px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    aspect-ratio: 16 / 9;
    transition: transform 0.3s ease, background 0.3s ease;
    cursor: pointer;
}

.media-placeholder:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.cd-cover, .goods {
    aspect-ratio: 1 / 1;
}

/* Buttons */
.btn-more, .btn-link {
    display: inline-block;
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 30px;
    align-self: flex-start;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    margin-top: 10px;
}

.btn-more:hover, .btn-link:hover {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 0 15px var(--accent-color);
    transform: translateY(-2px);
}

/* Footer */
.main-footer {
    margin-top: 40px;
    border-radius: 24px 24px 0 0;
    padding: 30px 20px;
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-nav li { padding-left: 0; }
.footer-nav li::before { display: none; }
.footer-nav a { color: var(--primary-color); text-decoration: none; font-size: 0.9rem; transition: color 0.3s; }
.footer-nav a:hover { color: var(--accent-hover); }

/* Footer Copyright Styles */
.footer-copyright {
  margin-top: 10px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.stealth-link {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.stealth-link:hover {
  text-decoration: none;
  opacity: 0.8;
}

/* To Top Button */
.to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.to-top-btn.show { opacity: 1; visibility: visible; }
.to-top-btn:hover { background: var(--accent-color); transform: translateY(-5px); }

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Media Queries */
@media (max-width: 1024px) {
    /* Tablet/Mobile view for Nav */
    .nav-menu {
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 20px;
        display: none;
        border-bottom: 1px solid var(--glass-border);
    }
    
    .nav-menu.active {
        display: block;
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .nav-menu ul {
        flex-direction: column;
        text-align: center;
    }
    
    .hamburger { display: flex; }
}

@media (max-width: 768px) {
    .main-title { font-size: 2.5rem; }
    .hero-character { width: 200px; height: 200px; }
    .glass-panel { padding: 30px 20px; }
    .audio-control-header .bgm-text { display: none; }
    
    .footer-copyright .separator {
        display: none;
    }
    .footer-copyright .produced-by {
        display: block;
        margin-top: 5px;
    }
}
