/*
 * Samechan Official Fan Site - Style Sheet
 * Theme: Flat, Hand-drawn, Warm
 */

:root {
    /* Color Palette */
    --color-bg: #FFFEF5;
    /* 生成り色 */
    --color-text: #4A3B32;
    /* こげ茶色 */
    --color-primary: #FFD966;
    /* やさしい黄色 */
    --color-secondary: #87CEEB;
    /* 空色 */
    --color-accent: #FF9999;
    /* サーモンピンク */
    --color-white: #FFFFFF;

    /* Fonts */
    --font-main: 'Zen Maru Gothic', sans-serif;
    --font-hand: 'Yomogi', cursive;

    /* Spacing */
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 32px;
    --spacing-xl: 64px;

    /* Hand-drawn Effects */
    --border-radius-hand: 255px 15px 225px 15px / 15px 225px 15px 255px;
    --box-shadow-hand: 2px 3px 0px rgba(74, 59, 50, 0.2);
}

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

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.8;
    /* Multiple backgrounds: Seabed at bottom, Dots repeating */
    background-image:
        url('../images/backgrounds/ground_footer.png'),
        radial-gradient(#E0E0E0 1px, transparent 1px);
    background-size: 100% auto, 20px 20px;
    background-position: center bottom, 0 0;
    background-repeat: no-repeat, repeat;
    position: relative;
    min-height: 100vh;
    cursor: url('../images/cursor/cursor-ebi.png'), auto;
    display: flex;
    flex-direction: column;
}

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

ul {
    list-style: none;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-primary);
    /* Happy Yellow */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
}

.loading-spinner {
    width: 150px;
    height: 150px;
    animation: spin 3s linear infinite;
    /* Slower rotation: 1.5s → 3s */
}

.loading-text {
    font-family: var(--font-hand);
    font-size: 2rem;
    color: var(--color-text);
    font-weight: 700;
    margin: 0;
    animation: pulse 1.5s ease-in-out infinite;
    /* Pulsing animation */
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

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

    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

/* Container */
.container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ... (Header styles remain) ... */

/* World View Section */
.world-view {
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.world-view-text {
    font-size: 1.1rem;
    line-height: 2;
    margin-bottom: var(--spacing-lg);
}

.world-view-decoration {
    font-size: 2rem;
    color: var(--color-primary);
    margin-top: var(--spacing-md);
}

/* Header */
.header {
    padding: var(--spacing-md) 0;
    position: fixed;
    width: 100%;
    top: 0;
    background-color: transparent;
    /* Initially transparent */
    transition: all 0.3s ease;
    z-index: 100;
    border-bottom: none;
}

.header.scrolled {
    background-color: rgba(255, 254, 245, 0.9);
    backdrop-filter: blur(5px);
    border-bottom: 2px dashed var(--color-text);
    padding: var(--spacing-sm) 0;
    /* Slightly smaller on scroll */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 40px;
    /* Adjust height as needed */
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover .logo-image {
    transform: rotate(-2deg) scale(1.05);
}

.nav-list {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-list a {
    font-weight: 700;
    position: relative;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 2px;
}

.nav-list a:hover::after {
    transform: scaleX(1);
}

.samechan-peek {
    position: fixed;
    top: 20%;
    left: -250px;
    /* Default: hidden off-screen on left */
    width: 250px;
    height: auto;
    z-index: 90;
    pointer-events: none;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.samechan-peek img {
    width: 100%;
    height: auto;
    display: block;
}

/* Left side peek - show right half of image */
.samechan-peek.from-left {
    left: -250px; /* Completely hidden off-screen */
}

.samechan-peek.from-left.active {
    transform: translateX(125px); /* Show only right half (move 125px from -250px = -125px) */
}

/* Right side peek - flip image and show left half */
.samechan-peek.from-right {
    left: auto;
    /* Override default left position */
    right: -250px;
    /* Completely hidden off-screen */
}

.samechan-peek.from-right img {
    transform: scaleX(-1); /* Flip horizontally */
}

.samechan-peek.from-right.active {
    transform: translateX(-125px); /* Show only left half (move -125px from -250px = -125px) */
}

.ebi-walk {
    position: fixed;
    bottom: 20px;
    right: -200px;
    width: 150px;
    z-index: 95;
    pointer-events: none;
}

.menu-toggle {
    display: none;
}

/* Hero Section (Full Screen) */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Video Bottom Blend */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    /* Taller blend area */
    background: linear-gradient(to bottom, rgba(255, 254, 245, 0) 0%, var(--color-bg) 100%);
    z-index: 2;
    pointer-events: none;
}

.samechan-video-container {
    position: absolute;
    top: 72px;
    /* Exact header height on PC to remove gap */
    left: 0;
    width: 100%;
    height: calc(100% - 72px);
    z-index: 0;
    background-color: var(--color-secondary);
    background-image: url('../images/characters/samechan-poster.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}

.samechan-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    /* Center positioning for stable display */
    display: none;
    transform: scale(1);
    /* Prevent unwanted scaling */
    will-change: auto;
    /* Optimize rendering */
}

.samechan-video.active {
    display: block;
}

.samechan-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    background-color: var(--color-secondary);
    color: var(--color-white);
    z-index: -1;
}

.click-area-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 33.3%;
    /* 1/3 of width */
    height: 80%;
    /* Increased height as requested */
    cursor: url('../images/cursor/cursor-pet.png'), pointer;
    /* Encourage touch/click */
    z-index: 100;
    /* border-radius: 50%; Removed to match rectangular 1/3 area, or keep if preferred. User said "1/3 range", usually implies rect. I'll make it a rounded rect for "softness" */
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Optional: Add a subtle hover effect to indicate interactivity */
    transition: background-color 0.3s ease;
    pointer-events: auto;
}

/* .click-area-center:hover removed as per user request */

/* Subtle highlight on hover */


.click-hint {
    font-family: var(--font-hand);
    color: var(--color-white);
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.click-area-center:hover .click-hint {
    opacity: 1;
}

.hero-content-overlay {
    position: relative;
    z-index: 5;
    text-align: center;
    pointer-events: none;
    margin-top: 30vh;
    width: 100%;
}

.hero-text {
    background-color: rgba(255, 254, 245, 0.8);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius-hand);
    display: inline-block;
    backdrop-filter: blur(5px);
    box-shadow: var(--box-shadow-hand);
    border: 2px solid var(--color-text);
}

.hero-copy {
    font-family: var(--font-hand);
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

.hero-subcopy {
    font-size: 1.1rem;
    color: #666;
}

/* Section Common */
section:not(.hero) {
    padding: 200px 0;
    /* Increased vertical spacing for long scroll */
    position: relative;
}

/* Vertical Dotted Line Guide */
section:not(.hero)::before {
    content: '';
    position: absolute;
    top: -60px;
    /* Start from the gap */
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 60px;
    background-image: linear-gradient(to bottom, var(--color-text) 33%, rgba(255, 255, 255, 0) 0%);
    background-position: bottom;
    background-size: 2px 10px;
    background-repeat: repeat-y;
    opacity: 0.3;
}

.section-title {
    font-family: var(--font-hand);
    font-size: 2rem;
    /* Section title size */
    text-align: center;
    margin-bottom: var(--spacing-xl);
    position: relative;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.section-title::before {
    content: '';
    position: absolute;
    bottom: 5px;
    left: -10px;
    width: 110%;
    height: 10px;
    background-color: var(--color-primary);
    z-index: -1;
    opacity: 0.6;
    border-radius: 5px;
    transform: rotate(-1deg);
}

.section-subtitle {
    text-align: center;
    margin-top: -20px;
    margin-bottom: var(--spacing-xl);
    font-size: 0.9rem;
    color: #888;
}

/* World View Section */
.world-view {
    text-align: center;
}

.world-view-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}



.world-view-image img {
    max-width: 100%;
    width: 800px;
    /* Increased to ~2x original size */
    border-radius: var(--border-radius-hand);
    border: 2px solid var(--color-text);
    box-shadow: var(--box-shadow-hand);
}

.world-view-text {
    font-family: var(--font-hand);
    font-size: 1.2rem;
    line-height: 2.5;
    color: var(--color-text);
}

.pc-only {
    display: block;
}

.sp-only {
    display: none;
}

@media (max-width: 768px) {
    .pc-only {
        display: none;
    }

    .sp-only {
        display: block;
    }
}

.world-view-decoration {
    font-size: 2rem;
    opacity: 0.6;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* About Section */
.about-card {
    background-color: var(--color-white);
    border: 2px solid var(--color-text);
    border-radius: var(--border-radius-hand);
    padding: var(--spacing-lg);
    box-shadow: var(--box-shadow-hand);
}

.about-content {
    display: flex;
    flex-direction: column;
    /* Stack vertically by default (Mobile First) */
    gap: var(--spacing-lg);
    align-items: center;
}

@media (min-width: 768px) {
    .about-content {
        flex-direction: row;
        /* Side by side on larger screens */
    }
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hand-drawn-frame-circle {
    width: 250px;
    height: 250px;
    border: 3px solid var(--color-text);
    border-radius: 50% 45% 55% 40% / 40% 55% 45% 50%;
    /* Distorted circle */
    padding: 10px;
    background-color: var(--color-white);
    box-shadow: var(--box-shadow-hand);
    overflow: hidden;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50% 45% 55% 40% / 40% 55% 45% 50%;
}

.about-text {
    flex: 2;
}

.profile-list dt {
    font-weight: 700;
    color: var(--color-accent);
    margin-top: var(--spacing-sm);
    font-family: var(--font-hand);
}

.profile-list dd {
    margin-left: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    border-bottom: 1px dotted #ccc;
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Default to 1 column for mobile (long scroll) */
    gap: var(--spacing-xl);
    /* Larger gap */
    max-width: 800px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on tablet+ */
    }
}

.gallery-item.polaroid {
    background-color: var(--color-white);
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-lg) var(--spacing-md);
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.1);
    transform: rotate(var(--rotation, 0deg));
    transition: transform 0.3s ease;
}

.gallery-item.polaroid:nth-child(odd) {
    --rotation: 2deg;
}

.gallery-item.polaroid:nth-child(even) {
    --rotation: -1deg;
}

.gallery-item.polaroid:hover {
    transform: scale(1.05) rotate(0deg);
    z-index: 10;
}

.gallery-image-area {
    width: 100%;
    aspect-ratio: 1;
    background-color: #eee;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.caption {
    text-align: center;
    font-family: var(--font-hand);
    color: #555;
}

/* Goods Section */
.coming-soon {
    text-align: center;
    padding: var(--spacing-xl) 0;
    background-color: var(--color-white);
    border: 2px dashed var(--color-text);
    border-radius: var(--border-radius-hand);
    box-shadow: var(--box-shadow-hand);
}

.coming-soon-text {
    font-family: var(--font-hand);
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    transform: rotate(-2deg);
}

.coming-soon-sub {
    font-size: 1.2rem;
    color: var(--color-text);
}

/* SNS Section */
.sns {
    padding: 200px 0 400px;
    /* PC版: スクロールスペース確保のため縦スペース拡大 */
}

.sns-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.sns-button {
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}

.sns-button:hover {
    transform: scale(1.1) translateY(-5px);
    opacity: 0.9;
}

.sns-icon-img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    display: block;
}

/* Tablet and mobile responsive */
@media (max-width: 768px) {
    .sns {
        padding: 100px 0 200px;
        /* スマホ版: 元の縦スペース維持 */
    }

    .sns-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns */
        gap: var(--spacing-lg);
        max-width: 300px;
        /* Limit width for better centering */
        margin: 0 auto;
    }

    .sns-icon-img {
        width: 125px;
        height: 125px;
    }
}

.sns-button.hand-drawn-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: var(--color-white);
    border: 2px solid var(--color-text);
    border-radius: var(--border-radius-hand);
    font-weight: 700;
    box-shadow: var(--box-shadow-hand);
    min-width: 160px;
    justify-content: center;
}

.sns-button.hand-drawn-btn:hover {
    transform: translateY(-2px);
    box-shadow: 4px 5px 0px rgba(74, 59, 50, 0.2);
    background-color: var(--color-primary);
}

/* Gift Section */
.gift-section {
    background-color: var(--color-bg-alt);
    text-align: center;
}

.gift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    justify-items: center;
}

.gift-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 300px;
}

.gift-image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-hand);
    border: 2px solid var(--color-text);
    box-shadow: var(--box-shadow-hand);
    transition: transform 0.3s ease;
}

.gift-item:hover .gift-image {
    transform: scale(1.02) rotate(1deg);
}

/* Footer */
.footer {
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    text-align: center;
    margin-top: auto;
    /* Background moved to body::after for independent positioning */
    min-height: 200px;
    /* Reduced min-height as background is separate */
    color: var(--color-white);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    position: relative;
    /* Ensure z-index works if needed */
    z-index: 1;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* フッター内のSNSセクション（PC版のみ） */
.sns-footer {
    padding: 60px 0 40px;
    text-align: center;
}

.sns-footer .section-title {
    color: var(--color-text);
    margin-bottom: 30px;
}

.sns-footer .sns-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

/* Responsive & Hamburger Menu */
@media (max-width: 768px) {
    .header-content {
        /* flex-direction: column; Removed to keep logo and menu side-by-side */
        justify-content: space-between;
        gap: 0;
    }

    .menu-toggle {
        display: block;
        width: 30px;
        height: 24px;
        position: relative;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1001;
    }

    .menu-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--color-text);
        position: absolute;
        left: 0;
        transition: all 0.3s ease;
        border-radius: 2px;
    }

    .menu-toggle span:nth-child(1) {
        top: 0;
    }

    .menu-toggle span:nth-child(2) {
        top: 11px;
    }

    .menu-toggle span:nth-child(3) {
        bottom: 0;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg);
        top: 11px;
    }

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

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg);
        bottom: 11px;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: rgba(255, 254, 245, 0.95);
        backdrop-filter: blur(10px);
        padding: 80px 20px;
        transition: right 0.3s ease;
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-xl);
        font-size: 1.2rem;
    }

    .about-content {
        flex-direction: column;
    }

    .hero-copy {
        font-size: 1.8rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        /* Keep 1 column for mobile */
    }
}