/* ============================================
   The Dreaming Cortex - Product Page Styles
   TYPE-MOON風デザイン
   ============================================ */

/* === Base Styles === */
:root {
    --color-primary: #000000;
    --color-secondary: #1a1a1a;
    --color-accent: #dc143c;
    --color-accent-dark: #d30000;
    --color-text: #ffffff;
    --color-text-gray: #999999;
    --color-border: #333333;
    
    /* 見出し用：英語はTimes New Roman、日本語はNoto Serif JP */
    --font-primary: 'Times New Roman', 'Noto Serif JP', serif;
    /* 通常文用：英語はTimes New Roman、日本語はNoto Serif JP */
    --font-text: 'Times New Roman', 'Noto Serif JP', serif;
    /* 見やすさ重視用：システムフォント */
    --font-secondary: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', 'Noto Sans JP', sans-serif;
    
    --transition-smooth: all 0.3s ease;
}

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

body {
    background-color: var(--color-primary);
    color: var(--color-text);
    font-family: var(--font-secondary);
    line-height: 1.8;
    overflow-x: hidden;
}


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

/* ===== Product Layout ===== */
.product-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== ヘッダー ===== */
.product-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #000 linear-gradient(180deg, rgba(165, 15, 25, 0.5) 0%, rgba(165, 15, 25, 0) 60%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

.product-header::before {
    content: "";
    width: 100%;
    height: 0.6rem;
    display: block;
    position: absolute;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255, 230, 169, 0) 0%, #ff2f2f 50%, rgba(255, 230, 169, 0) 100%) no-repeat center top/100% 0.12rem, 
                linear-gradient(90deg, rgba(255, 230, 169, 0) 0%, #ff2f2f 50%, rgba(255, 230, 169, 0) 100%) no-repeat center bottom/100% 0.1rem;
}

.product-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-nav {
    display: flex;
    align-items: center;
}

/* デスクトップ用横一列メニュー */
.desktop-nav {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.nav-link {
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-primary);
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--color-accent-dark);
    border-bottom-color: var(--color-accent-dark);
}

/* モバイル用ハンバーガーメニュー（デフォルトは非表示） */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1001;
}

.hamburger-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    position: relative;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-accent-dark);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle:hover .hamburger-line {
    background-color: var(--color-text);
}

/* メニューが開いている時のハンバーガーアイコン（×に変形） */
.menu-toggle.active .hamburger-inner {
    justify-content: center;
}

.menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(2px) rotate(225deg);
}

.menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-2px) rotate(-225deg);
}

/* サイドメニュー */
.side-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    z-index: 999;
    padding: 6rem 2rem 2rem;
    transition: right 0.3s ease;
    border-left: 1px solid var(--color-border);
}

.side-menu.open {
    right: 0;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.side-nav-link {
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-primary);
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition-smooth);
}

.side-nav-link:hover {
    color: var(--color-accent-dark);
    border-bottom-color: var(--color-accent-dark);
}

.side-nav-home {
    margin-top: 2rem;
    color: var(--color-accent-dark);
}

/* ===== メインコンテンツ ===== */
.product-main {
    flex: 1;
    padding-top: 80px;
}

/* === Hero Section === */
.game-hero {
    display: block;
    position: relative;
    max-width: 110rem;
    margin: 0 auto;
    overflow: hidden;
}

.hero-keyvisual {
    display: block;
    position: relative;
    width: 60%;
    margin-left: auto;
    overflow: hidden;
    animation: zoomInFade 3.0s ease-in-out;
}

.hero-split {
    display: block;
    position: absolute;
    width: 45%;
    top: 8rem;
    animation: fadeInSlideRight 1.0s ease-in-out;
}

.hero-content {
    display: block;
    position: relative;
    padding: 8%;
}

.hero-content .logo {
    display: block;
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.hero-content .release {
    display: block;
    position: relative;
    width: 100%;
    margin: 1.2rem auto 0;
}
/* アニメーション定義 */
@keyframes fadeInSlideRight {
    from {
        opacity: 0;
        transform: translateX(-40px);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

@keyframes zoomInFade {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* === Section共通 === */
.game-section {
    padding: 5rem 2rem;
    border-top: 1px solid var(--color-border);
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.title-en {
    display: block;
    font-family: 'Times New Roman', serif;
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 400;
    color: var(--color-accent-dark);
    letter-spacing: 0.15em;
    line-height: 1;
}

.title-ja {
    display: block;
    font-family: var(--font-primary);
    font-size: clamp(1.5rem, 3.5vw, 2.3rem);
    font-weight: 400;
    color: var(--color-text-gray);
    letter-spacing: 0.3em;
    line-height: 1;
}

/* === Movie Section === */
.movie-section {
    position: relative;
    background: var(--color-primary);
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.movie-item {
    aspect-ratio: 16 / 9;
    background: var(--color-primary);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.movie-item:hover {
    border-color: var(--color-accent);
}

.movie-placeholder {
    text-align: center;
}

.placeholder-icon {
    font-size: 3rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.placeholder-title {
    font-size: 1.2rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.placeholder-desc {
    font-size: 0.9rem;
    color: var(--color-text-gray);
}

/* === About Section === */
.about-section {
    background: var(--color-primary);
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
}

.about-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto 4rem;
}

.about-description {
    display: flex;
    flex-direction: column;
}

.about-screenshot {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

.about-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.about-screenshot:hover img {
    transform: scale(1.05);
}

.about-subtitle {
    font-size: 1.5rem;
    color: var(--color-accent-dark);
    margin-bottom: 2rem;
    text-align: left;
}

.about-text {
    font-size: 1.1rem;
    line-height: 2;
    color: var(--color-text);
    text-align: justify;
    font-family: var(--font-text);
}

/* 頒布先リンク */
.distribution-links {
    margin-top: 4rem;
}

.distribution-links-demo {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--color-border);
}

.link-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.distribution-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: transparent;
    border: 2px solid var(--color-border);
    color: var(--color-text);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: var(--transition-smooth);
    min-width: 180px;
    justify-content: center;
}

.distribution-button:hover {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.4);
}

.distribution-button i {
    font-size: 1.5rem;
}

/* 体験版ボタン専用スタイル（Google Drive / Axfc Uploader） */
.gdrive-button:hover,
.axfc-button:hover {
    border-color: #00a0e9;
    background: #00a0e9;
    box-shadow: 0 4px 12px rgba(0, 160, 233, 0.4);
}

.distribution-placeholder {
    text-align: center;
    padding: 2rem;
}

.distribution-placeholder .placeholder-text {
    font-size: 1.1rem;
    color: var(--color-text-gray);
}

/* Video wrapper for responsive iframe */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid var(--color-border);
}

/* === Gallery Section === */
.gallery-section {
    background: var(--color-primary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.gallery-item {
    aspect-ratio: 16 / 9;
    background: var(--color-primary);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.gallery-item:hover {
    border-color: var(--color-accent);
}

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

.gallery-placeholder {
    text-align: center;
    padding: 2rem;
}

.gallery-placeholder .placeholder-text {
    font-size: 1.5rem;
    color: var(--color-text-gray);
    margin-bottom: 1rem;
}

.gallery-placeholder .placeholder-desc {
    font-size: 0.9rem;
    color: var(--color-text-gray);
}

/* === Gallery Modal === */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.gallery-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.gallery-modal-close {
    position: absolute;
    top: 2rem;
    right: 3rem;
    color: var(--color-text);
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 10000;
}

.gallery-modal-close:hover {
    color: var(--color-accent);
}

.gallery-modal-caption {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-text);
    font-size: 1.2rem;
    text-align: center;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
}

.gallery-modal-prev,
.gallery-modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(220, 20, 60, 0.8);
    color: var(--color-text);
    border: none;
    font-size: 2rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 10000;
}

.gallery-modal-prev:hover,
.gallery-modal-next:hover {
    background: var(--color-accent);
}

.gallery-modal-prev {
    left: 2rem;
}

.gallery-modal-next {
    right: 2rem;
}

@media (max-width: 768px) {
    .gallery-modal-close {
        top: 1rem;
        right: 1.5rem;
        font-size: 2.5rem;
    }
    
    .gallery-modal-prev,
    .gallery-modal-next {
        font-size: 1.5rem;
        padding: 0.75rem 1rem;
    }
    
    .gallery-modal-prev {
        left: 1rem;
    }
    
    .gallery-modal-next {
        right: 1rem;
    }
    
    .gallery-modal-caption {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
        bottom: 1rem;
    }
}

/* === AI Disclosure === */
.ai-disclosure {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(220, 20, 60, 0.05);
    border-left: 4px solid var(--color-accent);
    border-radius: 4px;
}
.ai-disclosure-text {
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--color-text-gray);
    font-family: var(--font-secondary);
}

/* === Credit Section === */
.credit-section {
    background: var(--color-primary);
}

.credit-content {
    max-width: 900px;
    margin: 0 auto;
}

.staff-list {
    margin-bottom: 4rem;
}

.staff-item {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.staff-item:first-child {
    border-top: 1px solid var(--color-border);
}

.staff-role {
    font-size: 1rem;
    color: var(--color-accent);
    font-weight: 500;
    letter-spacing: 0.05em;
    font-family: var(--font-secondary);
}

.staff-name {
    font-size: 1.1rem;
    color: var(--color-text);
    font-weight: 400;
    line-height: 1.8;
    font-family: var(--font-secondary);
}

.staff-link {
    color: var(--color-accent);
    font-weight: bold;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--transition-smooth);
}

.staff-link:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

.credit-footer {
    text-align: center;
}

.credit-thanks {
    font-family: var(--font-text);
    font-size: 1.1rem;
    color: var(--color-text);
    font-weight: bold;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.credit-copyright {
    font-family: var(--font-text);
    font-size: 0.9rem;
    color: var(--color-text-gray);
    letter-spacing: 0.05em;
}

/* === Spec Section === */
.spec-section {
    background: var(--color-primary);
}

.spec-list {
    max-width: 900px;
    margin: 0 auto;
}

.spec-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.spec-item:first-child {
    border-top: 1px solid var(--color-border);
}

.spec-label {
    font-size: 1rem;
    color: var(--color-text-gray);
    font-weight: 500;
    font-family: var(--font-secondary);
}

.spec-value {
    font-size: 1rem;
    color: var(--color-text);
    line-height: 1.8;
    font-family: var(--font-secondary);
}

.spec-system {
    grid-template-columns: 200px 1fr;
}

.system-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-accent);
    font-size: 1.1rem;
}

.system-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.system-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.system-subtitle {
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--color-accent);
    font-size: 1.1rem;
    border-left: 3px solid var(--color-accent);
    padding-left: 0.8rem;
}

.system-list {
    list-style: none;
}

.system-list li {
    padding: 0.3rem 0;
}

.system-list li strong {
    color: var(--color-accent);
    margin-right: 0.5rem;
}

/* ===== フッター ===== */
.product-footer {
    background: var(--color-secondary);
    border-top: 1px solid var(--color-border);
    padding: 3rem 2rem;
}

.product-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

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

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    color: var(--color-text);
    font-size: 1.5rem;
    transition: var(--transition-smooth);
}

.social-link:hover {
    color: var(--color-accent);
}

.footer-copyright {
    color: var(--color-text-gray);
    font-size: 0.85rem;
    text-align: center;
}

/* === Fade-in Animation === */
.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);
}

/* === Responsive === */
@media (max-width: 1024px) {
    .spec-item {
        grid-template-columns: 150px 1fr;
    }
    
    .movie-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .product-header-inner {
        padding: 1rem;
        justify-content: flex-end;
    }
    
    /* デスクトップメニューを非表示 */
    .desktop-nav {
        display: none;
    }
    
    /* モバイル用トグルボタンを表示 */
    .menu-toggle {
        display: block;
        font-size: 0.95rem;
    }
    
    /* モバイル用セクションタイトル調整 */
    .title-en {
        font-size: clamp(2.5rem, 8vw, 3.5rem);
    }
    
    .title-ja {
        font-size: clamp(1.1rem, 4vw, 1.5rem);
    }
    
    /* About section を1カラムに */
    .about-main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-subtitle {
        text-align: center;
    }
    
    /* AI disclosure モバイル調整 */
    .ai-disclosure {
        padding: 1.5rem;
        margin-top: 2rem;
    }
    
    .ai-disclosure-text {
        font-size: 0.9rem;
    }
    
    .spec-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Credit モバイル調整 */
    .staff-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .staff-role {
        font-size: 0.9rem;
    }
    
    .staff-name {
        font-size: 1rem;
    }
    
    .credit-thanks {
        font-size: 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .game-section {
        padding: 4rem 1.5rem;
    }
    
    .section-title {
        margin-bottom: 3rem;
    }
}

@media (max-width: 480px) {
    .game-section {
        padding: 3rem 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .spec-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    /* AI disclosure 小画面調整 */
    .ai-disclosure {
        padding: 1rem;
    }
    
    /* Credit 小画面調整 */
    .staff-item {
        padding: 1rem 0;
    }
    
    .credit-footer {
        padding-top: 2rem;
    }
}

/* === Accessibility === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === Print Styles === */
@media print {
    .product-header,
    .product-footer,
    .game-navigation,
    .scroll-indicator,
    .back-section {
        display: none;
    }
    
    .product-main,
    .game-section {
        page-break-inside: avoid;
    }
}
