/* ============================================
   Index Page Specific Styles
   ============================================ */

/* ======================
   NAVIGATION
   ====================== */

#navbar {
    background: rgba(250, 250, 250, 0.95) !important;
    border-bottom: 1px solid rgba(229, 231, 235, 0.6) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-purchase-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background: #6366f1;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.nav-purchase-btn:hover {
    background: #4f46e5;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

.nav-purchase-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(99, 102, 241, 0.3);
}

@media (max-width: 640px) {
    .nav-purchase-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}


/* ======================
   HERO SECTION
   ====================== */

.hero-section {
    margin-top: 64px;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(26, 32, 44, 0.4) 0%, rgba(45, 55, 72, 0.3) 100%);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}


/* Logo and character container */

.hero-main-row {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 500px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    /* Remove tap highlight on mobile */
}

.hero-logo-hint {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: #cbd5e1;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
    z-index: 4;
    pointer-events: none;
    animation: logoHintBob 1.6s ease-in-out infinite;
}

.hero-logo {
    width: 500px;
    max-width: 40vw;
    height: auto;
    max-height: 100%;
    filter: drop-shadow(0 0 14px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 26px rgba(0, 0, 0, 0.6)) drop-shadow(0 8px 18px rgba(0, 0, 0, 0.7));
    transition: transform 0.14s ease, filter 0.14s ease;
    position: relative;
    z-index: 3;
    object-fit: contain;
}

.hero-logo.is-jiggle {
    animation: logoJiggle 0.4s ease-out, logoShadowPop 0.4s ease-out;
}

@keyframes logoShadowPop {
    0% {
        filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 8px rgba(0, 0, 0, 0.6)) drop-shadow(0 1px 4px rgba(0, 0, 0, 0.7));
    }
    100% {
        filter: drop-shadow(0 0 14px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 26px rgba(0, 0, 0, 0.6)) drop-shadow(0 8px 18px rgba(0, 0, 0, 0.7));
    }
}

@keyframes logoJiggle {
    0% {
        transform: scale(0.88) translate(0, 0) rotate(0deg);
    }
    5% {
        transform: scale(0.88) translate(-8px, 0) rotate(-4deg);
    }
    10% {
        transform: scale(0.88) translate(8px, 0) rotate(4deg);
    }
    15% {
        transform: scale(1) translate(0, 0) rotate(0deg);
    }
    20% {
        transform: scale(1) translate(-6px, 0) rotate(-3deg);
    }
    25% {
        transform: scale(1) translate(6px, 0) rotate(3deg);
    }
    30% {
        transform: scale(1) translate(0, 0) rotate(0deg);
    }
    35% {
        transform: scale(1) translate(-4px, 0) rotate(-2deg);
    }
    40% {
        transform: scale(1) translate(4px, 0) rotate(2deg);
    }
    45% {
        transform: scale(1) translate(-2px, 0) rotate(-1deg);
    }
    50% {
        transform: scale(1) translate(2px, 0) rotate(1deg);
    }
    55% {
        transform: scale(1) translate(0, 0) rotate(0deg);
    }
    100% {
        transform: scale(1) translate(0, 0) rotate(0deg);
    }
}

@keyframes logoHintBob {
    0%,
    100% {
        transform: translate(-50%, 0);
    }
    50% {
        transform: translate(-50%, 4px);
    }
}


/* Hero text and social link */

.hero-text-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    text-align: center;
}

.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.6;
    color: #a0aec0;
    max-width: 800px;
    padding: 0 20px;
    /* Reserve space to prevent layout shift */
    min-height: 4.8rem;
}

.hero-subtitle .no-break {
    white-space: nowrap;
}


/* X (Twitter) Link Button */

.hero-x-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.x-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.hero-x-link:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}


/* ======================
   CHARACTER ANIMATIONS
   ====================== */


/* Base character styles */

.character-peek {
    height: 100%;
    width: auto;
    max-height: 500px;
    object-fit: contain;
    position: absolute;
    top: 0;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.12s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.12s cubic-bezier(0.4, 0, 0.2, 1);

    /* Default hidden state */
    opacity: 0;
}

.character-peek-left {
    left: 0;
    transform: translateX(-200%);
}

.character-peek-right {
    right: 0;
    transform: translateX(200%);
}

/* Visible state - different positions per breakpoint */
.hero-section.show-characters .character-peek-left,
.hero-section.show-characters .character-peek-right {
    opacity: 0.9;
}

/* Force hidden state (higher specificity for animation) */
.hero-section.hide-characters .character-peek-left,
.hero-section.hide-characters .character-peek-right {
    opacity: 0 !important;
}

.hero-section.hide-characters .character-peek-left {
    transform: translateX(-200%) !important;
}

.hero-section.hide-characters .character-peek-right {
    transform: translateX(200%) !important;
}


/* Desktop/Tablet positioning */

@media (min-width: 641px) {
    .hero-section.show-characters .character-peek-left {
        transform: translateX(-30%);
    }
    .hero-section.show-characters .character-peek-right {
        transform: translateX(30%);
    }
}


/* Mobile positioning */

@media (max-width: 640px) {
    .hero-section.show-characters .character-peek-left {
        transform: translateX(-20%);
    }
    .hero-section.show-characters .character-peek-right {
        transform: translateX(20%);
    }
}


/* Large screens */

@media (min-width: 1400px) {
    .hero-main-row {
        height: 600px;
    }
    .hero-logo {
        width: 600px;
    }
    .character-peek {
        max-height: 600px;
    }
    .hero-section.show-characters .character-peek-left {
        transform: translateX(-35%);
    }
    .hero-section.show-characters .character-peek-right {
        transform: translateX(35%);
    }
}


/* Tablet breakpoint (641px - 1023px) */

@media (max-width: 1023px) and (min-width: 641px) {
    .hero-main-row {
        height: 400px;
    }
    .hero-logo {
        width: 400px;
        max-width: 50vw;
    }
    .character-peek {
        max-height: 400px;
    }
    .hero-section.show-characters .character-peek-left {
        transform: translateX(-25%);
    }
    .hero-section.show-characters .character-peek-right {
        transform: translateX(25%);
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .hero-x-link {
        padding: 7px 18px;
        font-size: 0.88rem;
    }
}


/* Mobile breakpoint (max 640px) */

@media (max-width: 640px) {
    .hero-main-row {
        height: 280px;
        overflow: hidden;
    }
    .hero-logo-hint {
        top: 8px;
        font-size: 0.82rem;
    }
    .hero-logo {
        width: 280px;
        max-width: 65vw;
        filter: drop-shadow(0 0 18px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 10px rgba(0, 0, 0, 0.5)) drop-shadow(0 4px 14px rgba(0, 0, 0, 0.45));
    }
    .hero-logo.is-jiggle {
        animation: logoJiggle 0.4s ease-out, logoShadowPopMobile 0.4s ease-out;
    }

    @keyframes logoShadowPopMobile {
        0% {
            filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 3px rgba(0, 0, 0, 0.5)) drop-shadow(0 0px 3px rgba(0, 0, 0, 0.45));
        }
        100% {
            filter: drop-shadow(0 0 18px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 10px rgba(0, 0, 0, 0.5)) drop-shadow(0 4px 14px rgba(0, 0, 0, 0.45));
        }
    }
    .character-peek {
        height: 280px;
        width: auto;
        object-fit: contain;
    }
    .hero-subtitle {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    .hero-x-link {
        padding: 6px 16px;
        font-size: 0.85rem;
    }
}


/* ======================
   BUTTON STYLES
   ====================== */

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: white;
    font-weight: 500;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #7c7ff3, #9297f8);
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}


/* ======================
   GAMES SECTION
   ====================== */

.games-section {
    padding: 80px 0;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0) 0%, rgba(15, 15, 25, 0.4) 50%, rgba(10, 10, 10, 0) 100%);
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    color: white;
    margin-bottom: 2.5rem;
    letter-spacing: 0.5px;
}


/* Game Cards Grid */

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.game-card {
    background: linear-gradient(135deg, rgba(45, 55, 72, 0.4) 0%, rgba(30, 41, 59, 0.3) 100%);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid rgba(99, 102, 241, 0.15);
    position: relative;
    z-index: 2;
    text-decoration: none;
    display: block;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(129, 140, 248, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: inset 0 0 40px rgba(99, 102, 241, 0.15),
                inset 0 0 80px rgba(99, 102, 241, 0.08);
}

.game-card:hover::before {
    opacity: 1;
}

.game-image-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(55, 65, 81, 0.5) 0%, rgba(31, 41, 55, 0.5) 100%);
}

.game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card:hover .game-image {
    transform: scale(1.08);
}

.game-content {
    padding: 24px;
    position: relative;
    z-index: 2;
}

.game-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.game-description {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}


/* Game tags */

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.game-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.15);
    color: #e2e8f0;
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

.game-card:hover .game-tag {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.5);
    color: #f1f5f9;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
}


/* ======================
   LINKS SECTION
   ====================== */

.links-section {
    padding: 80px 0;
    background: linear-gradient(90deg, rgba(10, 10, 10, 0) 0%, rgba(15, 20, 30, 0.35) 50%, rgba(10, 10, 10, 0) 100%);
    position: relative;
    z-index: 1;
}

.links-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.link-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    color: #e2e8f0;
    border: 1px solid #4a5568;
    border-radius: 50px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.link-button:hover {
    background: #2d3748;
    border-color: #6366f1;
    color: #a5b4fc;
}


/* ======================
   INFO SECTION (Activity & Members)
   ====================== */

.info-section {
    padding: 50px 0;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0) 0%, rgba(20, 15, 30, 0.3) 50%, rgba(10, 10, 10, 0) 100%);
    position: relative;
    z-index: 1;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
}

@media (max-width: 1100px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.info-card {
    background: transparent;
    padding: 0;
    position: relative;
}

.info-card-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 2.5rem;
    letter-spacing: 0.5px;
    text-align: center;
}

.activity-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 12px;
}

.activity-list::-webkit-scrollbar {
    width: 8px;
}

.activity-list::-webkit-scrollbar-track {
    background: rgba(55, 65, 81, 0.3);
    border-radius: 10px;
}

.activity-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6366f1, #4f46e5);
    border-radius: 10px;
}

.activity-list::-webkit-scrollbar-thumb:hover {
    background: #6366f1;
}

.activity-item {
    background: transparent;
    padding: 12px 0;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.activity-item:hover {
    transform: translateX(5px);
    border-bottom-color: rgba(99, 102, 241, 0.3);
}

.activity-date {
    color: #818cf8;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.activity-content {
    color: #e2e8f0;
    font-size: 0.95rem;
    line-height: 1.5;
}


/* Members Grid */

.members-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.member-card {
    background: transparent;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.member-card:hover {
    transform: translateY(-2px);
}

.member-name {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}


/* More button */

.btn-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    padding: 0;
    background: transparent;
    color: #a5b4fc;
    border: none;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-more::after {
    content: '→';
    display: inline-block;
    transition: transform 0.3s ease;
}

.btn-more::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #6366f1, #a5b4fc);
    transition: width 0.3s ease;
}

.btn-more:hover {
    color: #6366f1;
    transform: translateX(3px);
}

.btn-more:hover::after {
    transform: translateX(5px);
}

.btn-more:hover::before {
    width: 100%;
}


/* ======================
   RESPONSIVE ADJUSTMENTS
   ====================== */

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 20px;
    }
    .section-title,
    .info-card-title {
        font-size: 1.5rem;
    }
    .games-grid {
        grid-template-columns: 1fr;
    }
    .members-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .links-container {
        flex-direction: column;
        align-items: stretch;
    }
    .link-button {
        width: 100%;
        justify-content: center;
    }
    /* モバイル用ボタン調整は common.css で管理 */
}