/* archetype.moe - Moe Subculture Shrine */
/* Colors: #E8DEFF, #FF8FAB, #1A1033, #3D2C4E, #7EC8E3, #FFF5E6, #2B1B3D, #FFD166 */
/* Fonts: Kosugi Maru, M PLUS Rounded 1c */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #1A1033;
    color: #FFF5E6;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.8;
    overflow-x: hidden;
    position: relative;
}

/* Scanline overlay */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.05) 2px,
        rgba(0, 0, 0, 0.05) 4px
    );
}

/* Floating particles */
.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.particle {
    position: absolute;
    font-size: 12px;
    opacity: 0.3;
    animation: floatUp 8s linear infinite;
    color: #FF8FAB;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-20px) rotate(360deg);
        opacity: 0;
    }
}

/* Sections */
.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    position: relative;
}

/* Gate Section */
.gate-section {
    background: radial-gradient(ellipse at center, #2B1B3D 0%, #1A1033 70%);
}

.torii-gate {
    position: relative;
    width: 200px;
    height: 180px;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInGate 1.5s ease-out forwards;
}

@keyframes fadeInGate {
    to { opacity: 1; }
}

.torii-top {
    position: absolute;
    top: 0;
    left: -20px;
    width: 240px;
    height: 16px;
    background: #FF8FAB;
    border-radius: 4px 4px 0 0;
}

.torii-bar {
    position: absolute;
    top: 30px;
    left: -8px;
    width: 216px;
    height: 10px;
    background: #FF8FAB;
    border-radius: 2px;
}

.torii-left-pillar {
    position: absolute;
    top: 16px;
    left: 20px;
    width: 14px;
    height: 164px;
    background: #FF8FAB;
    border-radius: 0 0 3px 3px;
}

.torii-right-pillar {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 14px;
    height: 164px;
    background: #FF8FAB;
    border-radius: 0 0 3px 3px;
}

.site-title {
    font-family: 'Kosugi Maru', sans-serif;
    font-size: 72px;
    color: #FFD166;
    text-shadow: 0 0 20px rgba(255, 209, 102, 0.4);
    min-height: 86px;
}

.gate-subtitle {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: #E8DEFF;
    margin-top: 10px;
    opacity: 0;
    animation: fadeIn 1s 2.5s ease-out forwards;
}

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

.scroll-indicator {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    animation: fadeIn 1s 3.5s ease-out forwards;
}

.scroll-arrow {
    font-size: 24px;
    color: #7EC8E3;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

.scroll-text {
    font-size: 12px;
    color: #7EC8E3;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 8px;
}

/* Section Dividers */
.section-divider {
    width: 100%;
    text-align: center;
    margin-bottom: 40px;
    overflow: hidden;
}

.divider-svg {
    width: 400px;
    max-width: 100%;
    height: 20px;
}

/* Section Titles */
.section-title {
    font-family: 'Kosugi Maru', sans-serif;
    font-size: 42px;
    color: #FFD166;
    text-shadow: 0 0 15px rgba(255, 209, 102, 0.3);
    margin-bottom: 20px;
    text-align: center;
}

.section-desc {
    font-weight: 300;
    font-size: 16px;
    color: #E8DEFF;
    max-width: 600px;
    text-align: center;
    margin-bottom: 40px;
}

/* Gallery Section */
.gallery-section {
    background: linear-gradient(180deg, #1A1033 0%, #2B1B3D 50%, #1A1033 100%);
}

.archetype-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    max-width: 1000px;
}

.archetype-card {
    background: rgba(61, 44, 78, 0.6);
    border: 2px solid #3D2C4E;
    border-radius: 16px;
    padding: 30px;
    width: 280px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}

.archetype-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.archetype-card:hover {
    transform: translateY(-8px);
    border-color: #FF8FAB;
    box-shadow: 0 8px 30px rgba(255, 143, 171, 0.2);
}

.pixel-character {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    image-rendering: pixelated;
}

#pixel-bookworm {
    background: #7EC8E3;
    box-shadow:
        4px 0 0 #7EC8E3, 8px 0 0 #7EC8E3, 12px 0 0 #7EC8E3,
        0 4px 0 #E8DEFF, 4px 4px 0 #E8DEFF, 8px 4px 0 #E8DEFF, 12px 4px 0 #E8DEFF, 16px 4px 0 #7EC8E3,
        0 8px 0 #E8DEFF, 4px 8px 0 #1A1033, 8px 8px 0 #E8DEFF, 12px 8px 0 #1A1033, 16px 8px 0 #E8DEFF,
        0 12px 0 #E8DEFF, 4px 12px 0 #E8DEFF, 8px 12px 0 #FF8FAB, 12px 12px 0 #E8DEFF, 16px 12px 0 #E8DEFF,
        0 16px 0 #7EC8E3, 4px 16px 0 #7EC8E3, 8px 16px 0 #7EC8E3, 12px 16px 0 #7EC8E3, 16px 16px 0 #7EC8E3;
    width: 4px;
    height: 4px;
    transform: scale(3);
    transform-origin: center;
    margin-bottom: 40px;
}

#pixel-childhood {
    background: #FFD166;
    box-shadow:
        4px 0 0 #FFD166, 8px 0 0 #FFD166, 12px 0 0 #FFD166,
        0 4px 0 #FFF5E6, 4px 4px 0 #FFF5E6, 8px 4px 0 #FFF5E6, 12px 4px 0 #FFF5E6, 16px 4px 0 #FFD166,
        0 8px 0 #FFF5E6, 4px 8px 0 #1A1033, 8px 8px 0 #FFF5E6, 12px 8px 0 #1A1033, 16px 8px 0 #FFF5E6,
        0 12px 0 #FFF5E6, 4px 12px 0 #FFF5E6, 8px 12px 0 #FF8FAB, 12px 12px 0 #FFF5E6, 16px 12px 0 #FFF5E6,
        0 16px 0 #FFD166, 4px 16px 0 #FFD166, 8px 16px 0 #FFD166, 12px 16px 0 #FFD166, 16px 16px 0 #FFD166;
    width: 4px;
    height: 4px;
    transform: scale(3);
    transform-origin: center;
    margin-bottom: 40px;
}

#pixel-transfer {
    background: #E8DEFF;
    box-shadow:
        4px 0 0 #E8DEFF, 8px 0 0 #E8DEFF, 12px 0 0 #E8DEFF,
        0 4px 0 #FFF5E6, 4px 4px 0 #FFF5E6, 8px 4px 0 #FFF5E6, 12px 4px 0 #FFF5E6, 16px 4px 0 #E8DEFF,
        0 8px 0 #FFF5E6, 4px 8px 0 #3D2C4E, 8px 8px 0 #FFF5E6, 12px 8px 0 #3D2C4E, 16px 8px 0 #FFF5E6,
        0 12px 0 #FFF5E6, 4px 12px 0 #FFF5E6, 8px 12px 0 #FF8FAB, 12px 12px 0 #FFF5E6, 16px 12px 0 #FFF5E6,
        0 16px 0 #E8DEFF, 4px 16px 0 #E8DEFF, 8px 16px 0 #E8DEFF, 12px 16px 0 #E8DEFF, 16px 16px 0 #E8DEFF;
    width: 4px;
    height: 4px;
    transform: scale(3);
    transform-origin: center;
    margin-bottom: 40px;
}

.archetype-name {
    font-family: 'Kosugi Maru', sans-serif;
    font-size: 22px;
    color: #FF8FAB;
    margin-bottom: 12px;
}

.archetype-desc {
    font-weight: 300;
    font-size: 14px;
    color: #E8DEFF;
    margin-bottom: 16px;
}

.archetype-trait {
    font-size: 13px;
    color: #FFD166;
    font-weight: 700;
}

/* Story Section */
.story-section {
    background: linear-gradient(180deg, #1A1033 0%, #3D2C4E 50%, #1A1033 100%);
}

.story-timeline {
    position: relative;
    max-width: 600px;
    width: 100%;
    padding-left: 40px;
}

.story-timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #FF8FAB, #7EC8E3, #FFD166, #E8DEFF);
}

.timeline-entry {
    position: relative;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateX(-20px);
}

.timeline-entry.visible {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-dot {
    position: absolute;
    left: -34px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #FF8FAB;
    box-shadow: 0 0 10px rgba(255, 143, 171, 0.5);
}

.timeline-year {
    font-family: 'Kosugi Maru', sans-serif;
    font-size: 28px;
    color: #FFD166;
    display: block;
    margin-bottom: 8px;
}

.timeline-content p {
    font-weight: 300;
    color: #E8DEFF;
    font-size: 15px;
}

/* Gashapon Section */
.gashapon-section {
    background: linear-gradient(180deg, #1A1033 0%, #2B1B3D 50%, #1A1033 100%);
}

.gashapon-machine {
    position: relative;
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.gashapon-dome {
    width: 180px;
    height: 100px;
    border-radius: 90px 90px 0 0;
    background: rgba(126, 200, 227, 0.15);
    border: 3px solid #7EC8E3;
    border-bottom: none;
}

.gashapon-body {
    width: 180px;
    height: 80px;
    background: rgba(61, 44, 78, 0.8);
    border: 3px solid #7EC8E3;
    border-top: none;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    position: relative;
}

.gashapon-capsules {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    justify-content: center;
}

.capsule {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--c-color);
    opacity: 0.8;
    animation: capsuleBob 3s ease-in-out infinite;
}

.capsule:nth-child(2) { animation-delay: 0.5s; }
.capsule:nth-child(3) { animation-delay: 1s; }
.capsule:nth-child(4) { animation-delay: 1.5s; }
.capsule:nth-child(5) { animation-delay: 2s; }
.capsule:nth-child(6) { animation-delay: 2.5s; }

@keyframes capsuleBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.gashapon-handle {
    margin-top: 16px;
    padding: 12px 30px;
    background: #FF8FAB;
    color: #1A1033;
    font-family: 'Kosugi Maru', sans-serif;
    font-size: 18px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.gashapon-handle:hover {
    background: #FFD166;
    transform: scale(1.05);
}

.gashapon-handle:active {
    transform: scale(0.95);
}

.gashapon-result {
    min-height: 80px;
    text-align: center;
    padding: 20px;
    font-family: 'Kosugi Maru', sans-serif;
    font-size: 20px;
    color: #FFD166;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.gashapon-result.show {
    opacity: 1;
}

/* Shrine Section */
.shrine-section {
    background: radial-gradient(ellipse at center, #2B1B3D 0%, #1A1033 70%);
}

.shrine-message {
    text-align: center;
    margin-bottom: 30px;
}

.shrine-message p {
    font-weight: 300;
    font-size: 18px;
    color: #E8DEFF;
    margin-bottom: 12px;
    opacity: 0;
    transform: translateY(10px);
}

.shrine-message p.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.shrine-offering {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.offering-icon {
    font-size: 36px;
    animation: gentleSway 4s ease-in-out infinite;
}

.offering-icon:nth-child(2) { animation-delay: 1.3s; }
.offering-icon:nth-child(3) { animation-delay: 2.6s; }

@keyframes gentleSway {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.site-footer {
    font-size: 13px;
    color: #A8D8A8;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .site-title {
        font-size: 42px;
    }

    .section-title {
        font-size: 32px;
    }

    .archetype-cards {
        flex-direction: column;
        align-items: center;
    }

    .archetype-card {
        width: 90%;
        max-width: 320px;
    }
}
