/* ==========================================
   Moondogs Website - Stylesheet
   ========================================== */

/* ----- CSS Variables ----- */
:root {
    --color-bg: #0a0a0a;
    --color-bg-secondary: #111111;
    --color-text: #ffffff;
    --color-text-muted: #888888;
    --color-accent: #ff4444;
    --color-accent-hover: #ff6666;
    --font-heading: 'Bebas Neue', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

/* ----- Container ----- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* ----- Section Common ----- */
section {
    position: relative;
    overflow: hidden;
}

.section-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

/* ----- Section Title ----- */
.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 8vw, 4rem);
    letter-spacing: 0.1em;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    margin: 1rem auto 0;
}

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

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

.loading-content {
    text-align: center;
}

.loading-logo {
    font-family: var(--font-heading);
    font-size: 3rem;
    letter-spacing: 0.2em;
    margin-bottom: 30px;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-bar {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.loading-progress {
    width: 0;
    height: 100%;
    background: var(--color-accent);
    animation: loadingProgress 1.5s ease-out forwards;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes loadingProgress {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

/* ==========================================
   Fixed Header
   ========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    color: var(--color-text);
    transition: color 0.3s ease;
}

.header-logo:hover {
    color: var(--color-accent);
}

.header-nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

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

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

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

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

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.98);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-link {
    font-family: var(--font-heading);
    font-size: 2rem;
    letter-spacing: 0.2em;
    color: var(--color-text);
    transition: color 0.3s ease;
}

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

/* ==========================================
   Back to Top Button
   ========================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-accent);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-accent-hover);
    transform: translateY(-3px);
}

.back-to-top svg {
    color: white;
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../assets/images/MoonDogs_Top_back.jpg') center top / cover no-repeat;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 80% at 50% 70%, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.7) 100%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.1) 40%, rgba(0, 0, 0, 0.5) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: space-between;
    padding-top: 10vh;
    padding-bottom: 15vh;
}

.logo-image {
    max-width: 600px;
    width: 90vw;
    height: auto;
    animation: fadeInUp 1s ease-out;
    margin-top: 50px;
}

/* Visually hidden for accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hero .sns-links {
    margin-top: 2rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.sns-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin: 0 10px;
    border: 2px solid var(--color-text);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.sns-link:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: translateY(-3px);
}

.sns-link svg {
    transition: transform 0.3s ease;
}

.sns-link:hover svg {
    transform: scale(1.1);
}

/* SNS Links - New Simple Version */
.sns-links-mobile {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 15px;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.sns-btn {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.sns-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--color-accent);
    transform: translateY(-3px);
}

.sns-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sns-btn span {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.scroll-indicator span {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    margin: 0 auto;
    border-right: 2px solid var(--color-text-muted);
    border-bottom: 2px solid var(--color-text-muted);
    transform: rotate(45deg);
    animation: scrollBounce 2s infinite;
}

/* ==========================================
   About Section
   ========================================== */
.about {
    padding: 100px 0;
    background: #0d0d0d;
}

.about .section-bg {
    background:
        radial-gradient(ellipse 100% 100% at 50% 0%, rgba(255, 68, 68, 0.05) 0%, transparent 70%);
}

.about::before,
.about::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 68, 68, 0.3), transparent);
}

.about::before {
    top: 0;
}

.about::after {
    bottom: 0;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 2;
    color: var(--color-text-muted);
}

/* ==========================================
   Members Section
   ========================================== */
.members {
    padding: 100px 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #151520 100%);
}

.members .section-bg {
    background:
        radial-gradient(circle at 20% 80%, rgba(68, 68, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(255, 68, 68, 0.08) 0%, transparent 40%);
}

.members::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(100, 100, 255, 0.3), transparent);
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.member-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--color-bg-secondary);
    transition: transform 0.3s ease;
}

.member-card:hover {
    transform: translateY(-10px);
}

.member-image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #222;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: grayscale(30%);
}

.member-card:hover .member-image img {
    transform: scale(1.1);
    filter: grayscale(0%);
}

.member-info {
    padding: 20px;
    text-align: center;
}

.member-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    margin-bottom: 5px;
}

.member-part {
    font-size: 0.9rem;
    color: var(--color-accent);
    letter-spacing: 0.1em;
}

/* ==========================================
   YouTube Section
   ========================================== */
.youtube {
    padding: 100px 0;
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
}

.youtube .section-bg {
    background:
        radial-gradient(circle at 0% 50%, rgba(255, 0, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 100% 50%, rgba(255, 68, 68, 0.08) 0%, transparent 50%);
}

.youtube::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    margin-top: -2rem;
    margin-bottom: 3rem;
    font-size: 1rem;
}

.youtube-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.youtube-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #222;
}

.youtube-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.youtube-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #222;
    border-radius: 8px;
    color: var(--color-text-muted);
}

.youtube-more {
    text-align: center;
    margin-top: 2rem;
}

.btn-youtube {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: #ff0000;
    color: white;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-youtube:hover {
    background: #cc0000;
    transform: translateY(-3px);
}

/* ==========================================
   Instagram Section
   ========================================== */
.instagram {
    padding: 100px 0;
    background: linear-gradient(180deg, #0d0d15 0%, #0a0a0a 100%);
}

.instagram .section-bg {
    background:
        radial-gradient(circle at 50% 100%, rgba(225, 48, 108, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 30% 0%, rgba(131, 58, 180, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 70% 0%, rgba(253, 29, 29, 0.08) 0%, transparent 40%);
}

.instagram::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(225, 48, 108, 0.4), transparent);
}

.instagram-cta {
    text-align: center;
}

.btn-instagram {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-instagram:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(225, 48, 108, 0.4);
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    padding: 40px 0;
    background: #050505;
    text-align: center;
    border-top: 1px solid rgba(255, 68, 68, 0.2);
}

.footer-sns {
    margin-bottom: 20px;
}

.footer .sns-link {
    width: 40px;
    height: 40px;
    border-width: 1px;
}

.copyright {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
}

/* ==========================================
   Animations
   ========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollBounce {
    0%, 100% {
        transform: rotate(45deg) translateY(0);
    }
    50% {
        transform: rotate(45deg) translateY(10px);
    }
}

/* Scroll Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Scroll Fade */
.scroll-fade {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delay for grid items */
.scroll-fade:nth-child(1) { transition-delay: 0s; }
.scroll-fade:nth-child(2) { transition-delay: 0.1s; }
.scroll-fade:nth-child(3) { transition-delay: 0.2s; }
.scroll-fade:nth-child(4) { transition-delay: 0.3s; }
.scroll-fade:nth-child(5) { transition-delay: 0.4s; }
.scroll-fade:nth-child(6) { transition-delay: 0.5s; }

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 768px) {
    .section-title {
        margin-bottom: 2rem;
    }

    .hero {
        min-height: 100vh; /* Fallback for older browsers */
        min-height: 100svh;
    }

    /* Header Mobile */
    .header-nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .members-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .member-info {
        padding: 15px;
    }

    .member-name {
        font-size: 1.2rem;
    }

    .about,
    .members,
    .youtube,
    .instagram {
        padding: 60px 0;
    }

    .youtube-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .section-subtitle {
        margin-top: -1rem;
        margin-bottom: 2rem;
    }

    /* Back to Top Mobile */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    /* Hero section tablet adjustments */
    .hero-content {
        padding-top: 10vh;
        padding-bottom: 12vh;
    }

    .logo-image {
        max-width: 400px;
    }

    /* SNS buttons tablet */
    .sns-links-mobile {
        gap: 10px;
    }

    .sns-btn {
        padding: 10px 16px;
        gap: 6px;
    }

    .sns-btn svg {
        width: 18px;
        height: 18px;
    }

    .sns-btn span {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .members-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
    }

    .sns-link {
        width: 44px;
        height: 44px;
        margin: 0 8px;
    }

    /* Hero section mobile adjustments */
    .hero-content {
        padding-top: 10vh;
        padding-bottom: 0;
        justify-content: flex-start;
        gap: 0;
    }

    .logo-image {
        max-width: 320px;
        margin-bottom: 0;
    }

    /* SNS buttons - at bottom on mobile */
    .sns-links-mobile {
        position: absolute;
        bottom: 200px;
        left: 0;
        right: 0;
        width: 100%;
        justify-content: center;
        gap: 20px;
        padding: 0 15px;
        box-sizing: border-box;
    }

    .sns-btn {
        padding: 10px 16px;
        gap: 6px;
        background: rgba(0, 0, 0, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.3);
        flex-shrink: 0;
    }

    .sns-btn svg {
        width: 16px;
        height: 16px;
    }

    .sns-btn span {
        font-size: 0.75rem;
    }

    /* Scroll indicator on mobile */
    .scroll-indicator {
        bottom: 15px;
    }

    .scroll-indicator span {
        font-size: 0.6rem;
    }

    .scroll-arrow {
        width: 12px;
        height: 12px;
    }
}
