/* =================================================
   3DCG Works - ギャラリー & イマーシブモーダル
   ================================================= */

/* Works専用コンテナ */
.creation-container {
    position: relative;
    z-index: 100;
    min-height: 100vh;
    padding: var(--infinite-space) var(--presence-space) calc(var(--presence-space) * 2);
    pointer-events: auto;
}

/* ヘッダー */
.creation-header {
    text-align: center;
    margin-bottom: calc(var(--presence-space) * 3);
    padding-top: 40px;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.page-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 300;
    margin-bottom: 24px;
    line-height: 1.2;
    letter-spacing: 0.08em;
}

.title-void {
    opacity: 0.6;
}

.page-philosophy {
    font-family: 'Noto Serif JP', serif;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    line-height: 1.8;
    opacity: 0.6;
    max-width: 600px;
    margin: 0 auto;
}

/* 創造統計 */
.creation-stats {
    display: flex;
    justify-content: center;
    gap: var(--infinite-space);
    margin-top: var(--presence-space);
}

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

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: var(--manifestation-weight);
    color: var(--essence);
    margin-bottom: var(--whisper-space);
    font-family: 'Noto Sans JP', sans-serif;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.7;
    font-weight: var(--breath-weight);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* 作品宇宙 */
.works-main {
    position: relative;
    z-index: 30;
    max-width: 1600px;
    margin: 0 auto;
    pointer-events: auto;
}

.works-universe {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-bottom: 0;
}

/* 作品カード */
.work-constellation {
    position: relative;
    background: var(--whisper);
    border: 1px solid var(--breath);
    border-radius: 4px;
    backdrop-filter: blur(10px);
    transition: all var(--moment) ease;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.work-constellation::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transition: left var(--moment) ease;
}

.work-constellation:hover::before {
    left: 100%;
}

.work-constellation:hover {
    background: var(--breath);
    border-color: var(--essence);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--pulse);
}

/* 作品画像 */
.work-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all var(--moment) ease;
}

.work-constellation:hover .work-image img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--moment) ease;
}

.work-constellation:hover .image-overlay {
    opacity: 1;
}

.view-details {
    color: var(--existence);
    font-size: 0.9rem;
    font-weight: var(--breath-weight);
    padding: var(--whisper-space) var(--breath-space);
    border: 1px solid var(--breath);
    border-radius: 20px;
    background: var(--whisper);
    backdrop-filter: blur(10px);
}

/* 作品コンテンツ (非表示) */
.work-content {
    display: none;
}

.work-header {
    display: none;
}

.work-title {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.5rem;
    font-weight: var(--manifestation-weight);
    margin-bottom: var(--whisper-space);
    color: var(--essence);
}

.work-type {
    font-size: 0.8rem;
    opacity: 0.6;
    font-weight: var(--breath-weight);
}

.work-description {
    display: none;
}

.work-meta {
    display: none;
}

/* 空の状態 */
.void-state {
    text-align: center;
    padding: var(--infinite-space);
    opacity: 0;
    transition: all var(--moment) ease;
}

.void-state.show {
    opacity: 1;
}

.void-content {
    max-width: 400px;
    margin: 0 auto;
}

.void-symbol {
    font-size: 4rem;
    font-weight: var(--weightless);
    opacity: 0.3;
    margin-bottom: var(--breath-space);
}

.void-title {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.5rem;
    font-weight: var(--breath-weight);
    margin-bottom: var(--breath-space);
}

.void-description {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.7;
}

/* 浮遊アクション */
.floating-actions {
    position: fixed;
    bottom: var(--presence-space);
    right: var(--presence-space);
    display: flex;
    flex-direction: column;
    gap: var(--breath-space);
    z-index: 2100;
}

.action-btn {
    width: 50px;
    height: 50px;
    background: var(--whisper);
    border: 1px solid var(--breath);
    border-radius: 50%;
    color: var(--existence);
    cursor: pointer;
    transition: all var(--moment) ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.action-btn:hover {
    background: var(--breath);
    border-color: var(--essence);
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--pulse);
}

.btn-essence {
    font-size: 1.2rem;
    font-weight: var(--manifestation-weight);
}


/* ============================================
   レスポンシブデザイン
   ============================================ */
@media (max-width: 1024px) {
    .works-universe {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }
}

@media (max-width: 768px) {
    .creation-container {
        padding: calc(var(--presence-space) * 4) var(--breath-space) var(--presence-space);
    }
    
    .creation-header {
        padding-top: 20px;
    }
    
    .works-universe {
        grid-template-columns: repeat(2, 1fr);
        gap: 2px;
    }
    
    .creation-stats {
        flex-direction: column;
        gap: var(--breath-space);
    }
    
    .floating-actions {
        bottom: var(--breath-space);
        right: var(--breath-space);
    }
}

@media (max-width: 480px) {
    .work-constellation {
        padding: var(--breath-space);
    }
    
    .work-image {
        height: 250px;
    }
}