@import url('https://fonts.googleapis.com/css2?family=New+Rocker&family=Noto+Serif+JP:wght@400;500;700&display=swap');

:root {
    /* Colors from XD */
    --bg-color: #0D0807;
    --text-color: #F2F0E9;
    --accent-color: #A08C68;
    --overlay-color: rgba(0, 0, 0, 0.7);
    
    /* Fonts */
    --font-heading: 'New Rocker', cursive;
    --font-body: 'Noto Serif JP', serif;
    
    /* Spacing */
    --container-width: 1040px;
    --section-padding: 80px 20px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.8; /* Slightly increased for better readability with justify */
    overflow-x: hidden;
    font-feature-settings: "palt";
    text-align: justify;
    text-justify: inter-ideograph;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Fixed Background Implementation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.6)), url('../img/background.jpg') no-repeat top center;
    background-size: cover;
    z-index: -2;
    transition: 0.5s;
}

/* Content Container to allow scrolling over fixed bg */
main {
    position: relative;
    z-index: 1;
    /* Full-width gradient to fade the fixed background across the entire screen */
    background: linear-gradient(to bottom, 
        transparent 0%, 
        transparent 900px, 
        var(--bg-color) 1400px, 
        var(--bg-color) 100%
    );
}

a {
    color: inherit;
    text-decoration: none;
    transition: 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography */
h1, h2, h3, .nav-link {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-weight: 400; /* New Rocker only supports 400. This prevents browser auto-bold. */
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.about {
    padding-top: 20px;
    padding-bottom: 150px;
}

.about-content {
    max-width: 720px;
    margin: 0 auto;
    line-height: 2;
    text-align: justify;
}

.about-image-wrap {
    margin-bottom: 60px;
}

.about-text {
    /* Specific styles for about text can be added here */
}

.about-main-img {
    width: 100%;
    height: auto;
}

.about-footer-elements {
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.about-logo img {
    max-width: 320px;
    height: auto;
}

.about-sns {
    display: flex;
    gap: 40px;
}

.about-sns a {
    color: #fff;
    font-size: 2rem;
    opacity: 1;
    transition: 0.3s;
}

.about-sns a:hover {
    color: var(--accent-color);
}

/* Member Page */
.member {
    padding-bottom: 150px;
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 80px 40px;
}

.member-item {
    text-align: center;
}

.member-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.member-image {
    width: 100%;
    aspect-ratio: 1 / 1.2;
    overflow: hidden;
    margin-bottom: 20px;
    background: #111;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1);
}

.member-item:hover .member-image img {
    transform: scale(1.05);
}

.member-name {
    font-size: 1rem;
    margin-bottom: 8px;
    letter-spacing: 0.1em;
}

.member-role {
    font-size: 0.8rem;
    opacity: 0.6;
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .member-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .member-item {
        max-width: 400px;
        margin: 0 auto;
    }

    .member-image {
        width: 70%;
        margin: 0 auto 20px auto;
    }
}

/* Member Detail Page */
.member-detail-header {
    padding-top: 180px;
    padding-bottom: 20px;
}

.member-detail-breadcrumb {
    position: relative;
    z-index: 10;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
}

.member-detail-breadcrumb a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: 0.3s;
}

.member-detail-breadcrumb a:hover {
    color: #fff;
}

.member-detail-breadcrumb span {
    margin: 0 10px;
}

.member-detail-content {
    padding-top: 40px;
    padding-bottom: 150px;
}

.member-detail-main {
    display: flex;
    gap: 80px;
}

.member-detail-image {
    flex: 0 0 400px;
}

.member-detail-image img {
    width: 100%;
    height: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.member-detail-info {
    flex: 1;
}

.member-sns-link {
    margin-top: 10px;
    margin-bottom: 30px;
}

.member-sns-link a {
    color: inherit;
    font-size: 1.4rem;
    opacity: 0.7;
    transition: 0.3s;
    margin-right: 15px;
}

.member-sns-link a:hover {
    opacity: 1;
}

.member-detail-name {
    font-size: 2.2rem;
    margin-bottom: 5px;
    letter-spacing: 0.05em;
}

.member-detail-role {
    font-size: 1rem;
    opacity: 0.7;
    margin-bottom: 15px;
    letter-spacing: 0.1em;
}

.member-detail-box {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 45px 40px;
    margin-bottom: 40px;
    background-color: rgba(10, 10, 10, 0.85);
    overflow: hidden;
}

/* Inner dash frame */
.member-detail-box::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
    z-index: 1;
}

/* Grunge Overlay on top of text */
.member-detail-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../img/grunge-texture.png');
    background-size: cover;
    background-position: center;
    mix-blend-mode: overlay;
    opacity: 0.4;
    pointer-events: none;
    z-index: 2;
}

.info-list {
    list-style: none;
    margin-bottom: 20px;
    padding: 0;
}

.info-list li {
    margin-bottom: 4px;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.member-intro-text {
    line-height: 1.8;
    font-size: 0.9rem;
    opacity: 0.9;
}

.history-list {
    list-style: none;
    padding: 0;
}

.history-list li {
    margin-bottom: 15px;
    display: flex;
    font-size: 0.9rem;
    line-height: 1.6;
}

.history-year {
    flex: 0 0 120px;
    opacity: 0.6;
    font-family: var(--font-heading);
}

.history-content {
    flex: 1;
}

.works-group {
    margin-bottom: 30px;
}

.works-group:last-child {
    margin-bottom: 0;
}

.works-category {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 10px;
    display: block;
    letter-spacing: 0.1em;
}

.works-list {
    list-style: none;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.8;
}

.member-detail-back {
    margin-top: 80px;
    text-align: center;
}

@media (max-width: 992px) {
    .member-detail-main {
        flex-direction: column;
        gap: 40px;
    }
    
    .member-detail-image {
        flex: 0 0 auto;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .member-detail-name {
        font-size: 1.4rem;
        margin-bottom: 0px;
    }
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0;
    background: linear-gradient(to bottom, rgba(13, 8, 7, 0.95), transparent);
    transition: 0.3s;
}

.nav-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    max-width: 1120px; /* Original 1040px + 80px */
    margin: 0 auto;
    padding: 0 20px;
}

.nav-container > nav {
    flex: 1;
}

.nav-container > nav:first-of-type {
    display: flex;
    justify-content: center;
}

.nav-container > nav:last-of-type {
    display: flex;
    justify-content: center;
}

.logo-text {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
}

.logo-text img {
    width: auto;
    object-fit: contain;
    transition: 0.3s;
}

.nav-list {
    display: flex;
    gap: 22px;
    margin-top: 40px;
    justify-content: center;
}

.nav-link {
    font-size: 1rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -15px; /* Moved down a bit */
    left: 50%;
    transform: translateX(-50%) scale(0); /* Start scaled to 0 */
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 50%;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
}

.nav-link:hover::after, .nav-link.active::after {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

.nav-link .sub-text {
    display: block;
    font-size: 0.7rem;
    font-family: var(--font-body);
    text-align: center;
    margin-top: 0px;
    opacity: 0.7;
    letter-spacing: 0.05em;
}

/* --- Hamburger Menu --- */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
    background: none;
    border: none;
}

.hamburger-box {
    width: 30px;
    height: 24px;
    display: inline-block;
    position: relative;
}

.hamburger-inner {
    display: block;
    top: 50%;
    margin-top: -1px;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: 30px;
    height: 2px;
    background-color: #fff;
    position: absolute;
    transition: transform 0.15s ease;
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: "";
    display: block;
}

.hamburger-inner::before {
    top: -10px;
}

.hamburger-inner::after {
    bottom: -10px;
}

/* Active State Animation */
.header-open .hamburger-inner {
    transform: rotate(45deg);
}

.header-open .hamburger-inner::before {
    top: 0;
    opacity: 0;
}

.header-open .hamburger-inner::after {
    top: 0;
    transform: rotate(-90deg);
}

.mobile-menu {
    display: none;
}

.sp-only {
    display: none;
}


/* Hero Section */
.hero {
    min-height: auto;
    padding-top: 160px;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.copy-title-container {
    width: 100%;
    max-width: 300px;
    margin: 40px auto 40px auto;
    text-align: center;
    z-index: 10;
}

.copy-title-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* Carousel */
.carousel-container {
    width: 96%;
    max-width: var(--container-width);
    z-index: 10;
    margin-top: 0px;
}

.carousel-main {
    width: 100%;
    aspect-ratio: 2/1; /* Matches the original banner dimensions (2252x1128) */
    overflow: hidden;
    position: relative;
}

.carousel-track {
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    background: #000;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Changed from contain to cover */
    transition: opacity 1.2s ease-in-out;
}

/* Removed zoom effect as requested */

.carousel-thumbs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
    flex-wrap: wrap; /* Wrap to 2nd row if needed */
}

.thumb {
    width: 100px;
    aspect-ratio: 16/9;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 1;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

/* ホバー時に「他のサムネイル」を薄くして、ホバー中を強調するスタイル */
.carousel-thumbs:hover .thumb {
    opacity: 0.6;
}

.carousel-thumbs .thumb:hover,
.carousel-thumbs .thumb.active {
    opacity: 1;
}

.thumb.active {
    border-color: var(--accent-color);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    opacity: 0.6;
    animation: bounce 2s infinite;
}

/* Generic Section */
.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 70px;
    letter-spacing: 0.2em;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--accent-color);
}

/* News */
.news {
    padding: 0px 20px 60px;
    position: relative;
    z-index: 1;
}

.news-flex {
    display: flex;
    gap: 80px;
    align-items: flex-start;
}

.news-heading {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    line-height: 1;
    color: var(--text-color);
}

.news-content {
    flex: 1;
}

.news-list {
    margin-bottom: 20px;
}

.news-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
}

.news-item:hover {
    opacity: 0.6;
}

.news-item:first-child {
    border-top: 1px solid rgba(255,255,255,0.15);
}

.news-item .date {
    font-size: 1rem;
    opacity: 0.8;
    min-width: 120px;
    font-family: var(--font-body);
}

.news-title {
    font-size: 1rem;
    flex: 1;
    color: var(--text-color);
    transition: 0.3s;
}

.news-more-wrap {
    display: flex;
    justify-content: flex-end;
}

.news-more {
    display: inline-block;
    margin-top: 12px;
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
    font-size: 1rem;
    transition: 0.3s;
    color: var(--text-color);
    opacity: 0.8;
}

.news-more:hover {
    color: var(--accent-color);
    opacity: 1;
    transform: translateX(5px);
}

/* Video */
.video-section {
    padding: var(--section-padding);
    position: relative;
    z-index: 1;
}

.video-wrapper {
    width: 100%; /* Fill the 980px container */
    margin: 0 auto;
    aspect-ratio: 16/9;
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Fix for smooth scroll bug on iframes */
body.is-scrolling .video-wrapper {
    pointer-events: none;
}

/* Subpages Styling */
.page-header {
    padding: 200px 0 60px;
    text-align: center;
}

.page-title {
    font-size: 3.2rem;
    letter-spacing: 0.1em;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

/* Footer */
footer {
    padding: 80px 0;
    background: url('../img/footer-bg.jpg') no-repeat center center;
    background-size: cover;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Removed individual footer gradient as it's now part of the News->Video flow */

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo-img {
    height: 84px;
    width: auto;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap; /* Allow wrapping for responsive layout */
}

.footer-nav a {
    font-family: var(--font-heading);
    font-size: 14px;
    color: #F2F0E9;
    letter-spacing: 0.1em;
}

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

.footer-sns {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.footer-sns a {
    color: #fff;
    font-size: 1.1rem;
    transition: 0.3s;
    opacity: 0.6;
}

.footer-sns a:hover {
    color: var(--accent-color);
    opacity: 1;
}

.copyright {
    font-family: 'Times New Roman', serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.05em;
    margin-top: 0;
}

.contact {
    padding-bottom: 150px;
}

.contact-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.contact-intro {
    text-align: center;
    margin-bottom: 50px;
}

.contact-card {
    background: rgba(0, 0, 0, 0.5);
    padding: 41px 40px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    border-radius: 10px;
}

.contact-card-title {
    font-family: var(--font-heading);
    margin-bottom: 0px;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
}

.contact-card-value {
    font-size: 1rem;
    color: var(--accent-color);
    letter-spacing: 0.05em;
}

.contact-note-wrap {
    margin-top: 50px;
    text-align: center;
}

.contact-note {
    opacity: 0.6;
    font-size: 0.9rem;
}

.contact-company {
    margin-top: 80px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 40px;
}

.contact-company-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.contact-company-address {
    font-size: 0.95rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .page-header {
        padding: 134px 0 0px;
        text-align: center;
    }

    .page-title {
        font-size: 2rem;
        letter-spacing: 0.1em;
        margin-bottom: 20px;
        text-align: center;
        text-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    }
}

/* Works Grid */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 80px;
}

.work-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.work-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.work-item {
    aspect-ratio: 1 / 1.414;
    overflow: hidden;
    position: relative;
    background: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}

.work-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.work-link:hover .work-item {
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
}

.work-link:hover .work-item img {
    transform: scale(1.1);
}

.work-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    opacity: 0;
    transform: translateY(20px);
    transition: 0.4s ease-out;
}

.work-item:hover .work-info {
    opacity: 1;
    transform: translateY(0);
}

.work-title-below {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #fff;
    text-align: left;
    font-family: var(--font-body);
    line-height: 1.6;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.work-category-tag {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, 0.4); /* Subtle white border */
    color: #fff;
    font-size: 0.75rem;
    font-family: var(--font-body);
    letter-spacing: 0.05em;
    align-self: flex-start;
    transition: 0.3s;
}

.work-card:hover .work-category-tag {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.works {
    padding-bottom: 150px; /* Changed from margin to padding to keep background visible */
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 15px; /* Slightly reduced gap to fit 6 buttons */
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: -1;
    pointer-events: none;
}

/* Work Detail Page */
.work-detail-header {
    padding-top: 180px;
    padding-bottom: 40px;
}

.work-detail-breadcrumb {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
}

.work-detail-breadcrumb a {
    color: rgba(255, 255, 255, 0.5);
    transition: 0.3s;
}

.work-detail-breadcrumb a:hover {
    color: #fff;
}

.work-detail-breadcrumb span {
    margin: 0 10px;
}

.work-detail-content {
    padding-bottom: 150px;
}

.work-detail-main {
    display: flex;
    gap: 80px;
    align-items: flex-start;
}

.work-detail-poster {
    flex: 0 0 380px;
    /* box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8); */
}

.work-detail-poster img {
    width: 100%;
    height: auto;
    display: block;
}

.work-detail-info {
    flex: 1;
}

.work-detail-title {
    font-size: 2rem;
    font-family: var(--font-body);
    line-height: 1.3;
    margin-bottom: 4px;
    /* letter-spacing: 0.1em; */
}

.work-spec {
    margin: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
}

.spec-item {
    display: flex;
    margin-bottom: 12px;
}

.spec-item:last-child {
    margin-bottom: 0;
}

.spec-label {
    width: 100px;
    /* font-size: 0.85rem; */
    opacity: 0.7;
    /* font-family: var(--font-heading); */
}

.spec-value {
    flex: 1;
    font-size: 0.95rem;
    font-family: var(--font-body);
}

.detail-sub-title {
    font-size: 1.2rem;
    font-family: var(--font-heading);
    margin-bottom: 15px;
    color: var(--accent-color);
    letter-spacing: 0.2em;
    border-left: 2px solid var(--accent-color);
    padding-left: 15px;
}

.work-intro {
    margin-bottom: 50px;
    line-height: 1.8;
    font-size: 0.95rem;
    text-align: justify;
}

.work-cast-staff p {
    line-height: 1.8;
    margin-bottom: 40px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.work-detail-back {
    margin-top: 100px;
    text-align: center;
}

.back-btn {
    display: inline-block;
    padding: 15px 60px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-family: var(--font-heading);
    letter-spacing: 0.2em;
    font-size: 0.9rem;
    transition: 0.3s;
}

.back-btn:hover {
    background: #fff;
    color: #000;
}

.booking-btn {
    display: inline-block;
    padding: 12px 40px;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    transition: 0.3s;
    text-decoration: none;
    text-align: center;
}

.booking-btn:hover {
    background: var(--accent-color);
    color: #000;
}

@media (max-width: 992px) {
    .work-detail-main {
        flex-direction: column;
        gap: 40px;
    }
    .work-detail-poster {
        flex: none;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    .work-detail-title {
        font-size: 1.3rem;
        line-height: 1.5;
    }
}

.filter-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-color);
    padding: 12px 40px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 110px;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-btn.active {
    background: #8B0000; /* Crimson Red */
    border-color: #FF0000;
    color: #fff;
}

.filter-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    opacity: 0.5;
    transition: 0.3s;
}

.filter-btn.active .filter-icon {
    opacity: 1;
}

.filter-btn span {
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    font-weight: 700;
}

/* Animations */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0) translateX(-50%);}
    40% {transform: translateY(-10px) translateX(-50%);}
    60% {transform: translateY(-5px) translateX(-50%);}
}

.fade-in {
    animation: fadeIn 1.2s ease-out forwards;
}

.fade-in-up {
    animation: fadeInUp 1s cubic-bezier(0.2, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Noise Overlay Effect */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10001; /* Above loading screen */
    pointer-events: none;
    overflow: hidden;
}

.noise-overlay::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: url('../img/noise.png');
    background-repeat: repeat;
    opacity: 0.05; /* Very subtle for a premium look */
    animation: noise-animation 0.3s steps(5) infinite;
}

@keyframes noise-animation {
    0% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -5%); }
    20% { transform: translate(-10%, 5%); }
    30% { transform: translate(5%, -10%); }
    40% { transform: translate(-5%, 15%); }
    50% { transform: translate(-10%, 5%); }
    60% { transform: translate(15%, 0); }
    70% { transform: translate(0, 10%); }
    80% { transform: translate(-15%, -5%); }
    90% { transform: translate(10%, 5%); }
    100% { transform: translate(5%, 0); }
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a; /* Slightly lighter than pure black to show noise */
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease, visibility 1s;
}

#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-logo {
    width: 160px; /* Reduced from 180px for a more refined look */
    height: auto;
    opacity: 0;
    animation: loadingFadeIn 1.5s ease forwards;
}

@keyframes loadingFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}
@media (max-width: 900px) {
    .hamburger {
        display: block;
        position: absolute;
        right: 15px;
        top: 45px;
        transform: translateY(-50%);
        z-index: 1001;
    }

    .nav-container {
        display: flex;
        justify-content: center;
        padding: 0 15px;
        height: 124px;
        align-items: center;
        position: relative;
    }

    .desktop-nav {
        display: none !important;
    }

    .logo-text img {
        width: 280px;
    }

    .mobile-menu {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.92);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .header-open .mobile-menu {
        opacity: 1;
        visibility: visible;
    }

    .mobile-nav-link {
        font-size: 1.4rem;
        color: #fff;
        text-decoration: none;
        font-family: var(--font-heading);
        letter-spacing: 0.1em;
        display: block;
        line-height: 1.3;
    }

    .mobile-nav-link .sub-text {
        display: block;
        font-size: 0.9rem;
        opacity: 0.5;
        margin-top: 0px;
        letter-spacing: 0.1em;
        font-family: var(--font-body);
    }

    .mobile-nav-list {
        list-style: none;
        text-align: center;
        padding: 0;
    }

    .mobile-nav-item {
        margin: 20px 0;
        transform: translateY(20px);
        opacity: 0;
        transition: 0.4s;
    }

    .header-open .mobile-nav-item {
        transform: translateY(0);
        opacity: 1;
    }

    .mobile-sns-item {
        margin: 10px 0 20px 0;
    }

    .mobile-sns {
        display: flex;
        justify-content: center;
        gap: 24px;
    }

    .mobile-sns a {
        color: #fff;
        font-size: 1.4rem;
        transition: 0.3s;
        opacity: 0.6;
    }

    .mobile-sns a:hover {
        color: var(--accent-color);
        opacity: 1;
    }

    .hero {
        padding-top: 100px;
        padding-bottom: 20px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    /* News Section Mobile */
    .news {
        padding: 20px 20px 60px;
    }

    .news-flex {
        flex-direction: column;
        gap: 20px;
    }

    .news-heading {
        writing-mode: horizontal-tb;
        font-size: 2rem;
        margin-bottom: 0px;
    }

    .news-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        gap: 4px;
    }

    .news-item:first-child {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .news-title {
        order: 1;
        font-size: 0.9rem;
        line-height: 1.4;
        text-align: left;
        width: 100%;
    }

    .date {
        order: 2;
        font-size: 0.8rem;
        opacity: 0.6;
        text-align: left;
        width: 100%;
    }

    .news-item .date {
        font-size: 0.8rem;
    }

    .more-news {
        text-align: left;
        margin-top: 20px;
    }

    /* Footer Nav Redo */
    .footer-nav {
        gap: 20px 0;
        padding: 0 10px;
        display: flex;
        flex-wrap: wrap;
    }

    .footer-nav a {
        flex: 0 0 33.33%;
        text-align: center;
        font-size: 15px; /* +1px from current 14px roughly */
    }

    .footer-sns a {
        font-size: 1.4rem;
    }

    .carousel-thumbs {
        margin-top: 12px;
        gap: 8px;
        padding: 0 5px;
        display: flex;
        flex-wrap: wrap;
    }

    .thumb {
        width: calc(20% - 8px);
        aspect-ratio: 16/9;
    }

    /* Works Filter Mobile */
    .filter-bar {
        gap: 10px;
        /* padding: 0 10px; */
        justify-content: center;
    }

    .filter-btn {
        flex: 0 0 calc(33.33% - 10px);
        min-width: 0;
        padding: 12px 5px;
        gap: 8px;
    }

    .filter-icon {
        width: 28px;
        height: 28px;
    }

    .filter-btn span {
        font-size: 0.9rem;
    }

    /* Works Grid Mobile */
    .works-grid {
        width: 80% !important;
        margin: 0 auto !important;
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    /* Detail Pages Mobile */
    article.news-detail .about-content h2.news-detail-title,
    article.news-detail .about-content h1.work-detail-title,
    .work-detail-info .work-detail-title {
        font-size: 1.4rem !important;
        /* margin-bottom: 35px !important; */
    }

    .work-detail-breadcrumb {
        font-size: 0.8rem;
    }

    .loading-logo {
        width: 100px;
    }

    .about {
        padding-top: 20px;
        padding-bottom: 100px;
    }

    .work-detail-header {
        padding-top: 134px;
        padding-bottom: 20px;
    }

    body::before {
        background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.6)), url('../img/background_sp.jpg') no-repeat top center;
        background-size: cover;
    }

    .contact-card {
        padding: 40px 20px;
    }
}

/* Detail Pages Mobile Container Adjustment */
@media (max-width: 768px) {
    .page-member-detail main .container,
    .page-work-detail main .container {
        max-width: 85%;
    }

    .member-detail-content {
        padding-top: 0;
    }

    .member-detail-header {
        padding-top: 134px;
        padding-bottom: 20px;
    }

    .member-detail-box {
        padding: 30px 20px;
        margin-bottom: 30px;
    }

    .history-list li {
        flex-direction: column;
    }

    .history-year {
        flex: none;
        margin-bottom: 5px;
    }
}
