:root {
    --color-bg: #050510;
    --color-primary: #00f0ff;
    /* Electric Blue */
    --color-secondary: #ff00de;
    /* Hot Pink */
    --color-accent: #f9ff00;
    /* Neon Yellow */
    --color-text: #ffffff;
    --color-dark-panel: rgba(10, 10, 30, 0.9);
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
}

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

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

html {
    -webkit-text-size-adjust: 100%;
}

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

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.glitch-text {
    position: relative;
    font-family: var(--font-heading);
    text-transform: uppercase;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    color: var(--color-primary);
    text-shadow: 0 0 10px var(--color-primary);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60%;
    height: 4px;
    background: var(--color-secondary);
    margin: 10px auto 0;
    box-shadow: 0 0 10px var(--color-secondary);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(5, 5, 16, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 240, 255, 0.3);
}

.logo img {
    height: 50px;
}

.nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav a {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--color-text);
    position: relative;
}

.nav a:hover,
.nav a.active {
    color: var(--color-primary);
    text-shadow: 0 0 5px var(--color-primary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    height: 100vh;
    height: 100svh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(circle at center, #1a1a3a 0%, #050510 100%);
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

.hero-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    perspective: 1000px;
    transform: rotateX(60deg) translateY(-100px) translateZ(-200px);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-visual {
    position: relative;
    width: 90vw;
    max-width: 800px;
    height: 80vh;
    height: 80svh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mv-char {
    position: absolute;
    height: 100%;
    transition: transform 0.5s, opacity 0.5s;
    filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.5));
}

.mv-char.center {
    z-index: 10;
    transform: scale(1.1);
}

.mv-char.side {
    z-index: 5;
    opacity: 0.6;
    transform: scale(0.8);
    filter: drop-shadow(0 0 10px rgba(255, 0, 222, 0.3)) grayscale(0.5);
}

.mv-char.left {
    transform: translateX(-300px) scale(0.8);
}

.mv-char.right {
    transform: translateX(300px) scale(0.8);
}

/* Hero Slideshow */
.hero-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateX(0) scale(0.7);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

.slide.is-center {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
    z-index: 3;
}

.slide.is-left {
    opacity: 0.5;
    transform: translateX(-35%) scale(0.75);
    z-index: 1;
}

.slide.is-right {
    opacity: 0.6;
    transform: translateX(35%) scale(0.8);
    z-index: 2;
}

.slide img {
    height: 85%;
    max-height: 70vh;
    max-height: 70svh;
    object-fit: contain;
    filter: drop-shadow(0 0 30px rgba(0, 240, 255, 0.6));
    animation: heroGlow 3s ease-in-out infinite alternate;
    -webkit-mask-image:
        linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 12%, rgba(0, 0, 0, 1) 88%, rgba(0, 0, 0, 0) 100%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 12%, rgba(0, 0, 0, 1) 88%, rgba(0, 0, 0, 0) 100%);
    mask-image:
        linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 12%, rgba(0, 0, 0, 1) 88%, rgba(0, 0, 0, 0) 100%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 12%, rgba(0, 0, 0, 1) 88%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.slide-name {
    position: absolute;
    bottom: 80px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-primary);
    text-shadow: 0 0 15px var(--color-primary), 0 0 30px var(--color-primary);
    letter-spacing: 0.3em;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
    padding: 10px 18px;
    background: rgba(5, 5, 16, 0.4);
    border: 1px solid rgba(0, 240, 255, 0.35);
    border-radius: 999px;
    backdrop-filter: blur(6px);
}

.slide.is-center .slide-name {
    opacity: 1;
    transform: translateY(0);
}

/* Glitch Overlay Effect */
.glitch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
}

.glitch-overlay.active {
    animation: glitchEffect 0.3s ease-out;
}

@keyframes glitchEffect {
    0% {
        opacity: 1;
        background: linear-gradient(90deg,
                transparent 0%,
                rgba(0, 240, 255, 0.3) 10%,
                transparent 20%,
                rgba(255, 0, 222, 0.3) 30%,
                transparent 40%);
        transform: translateX(-5px);
    }

    20% {
        background: linear-gradient(90deg,
                transparent 20%,
                rgba(255, 0, 222, 0.4) 40%,
                transparent 60%,
                rgba(0, 240, 255, 0.4) 80%,
                transparent 100%);
        transform: translateX(5px) skewX(2deg);
    }

    40% {
        background: linear-gradient(90deg,
                rgba(0, 240, 255, 0.2) 0%,
                transparent 30%,
                rgba(255, 0, 222, 0.3) 60%,
                transparent 90%);
        transform: translateX(-3px) skewX(-1deg);
    }

    60% {
        transform: translateX(2px);
    }

    80% {
        opacity: 0.5;
        transform: translateX(0);
    }

    100% {
        opacity: 0;
        transform: translateX(0);
    }
}

/* Slide Indicators */
.slide-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 30;
}

.indicator {
    width: 12px;
    height: 12px;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.indicator.active::before {
    transform: translate(-50%, -50%) scale(1);
}

.indicator.active {
    border-color: var(--color-secondary);
    box-shadow: 0 0 10px var(--color-secondary), 0 0 20px var(--color-secondary);
}

.indicator:hover {
    border-color: var(--color-secondary);
    box-shadow: 0 0 8px var(--color-secondary);
}

/* Hero Glow Animation */
@keyframes heroGlow {
    0% {
        filter: drop-shadow(0 0 30px rgba(0, 240, 255, 0.6));
    }

    50% {
        filter: drop-shadow(0 0 50px rgba(255, 0, 222, 0.6)) drop-shadow(0 0 20px rgba(0, 240, 255, 0.4));
    }

    100% {
        filter: drop-shadow(0 0 30px rgba(0, 240, 255, 0.6));
    }
}

/* Latest News */
.news-section {
    padding: 100px 0;
    background: linear-gradient(to bottom, #050510, #0a0a20);
}

.news-list {
    background: var(--color-dark-panel);
    border: 1px solid var(--color-primary);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.news-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s;
}

.news-item:hover {
    background: rgba(0, 240, 255, 0.1);
}

.news-date {
    font-family: var(--font-heading);
    color: var(--color-secondary);
    width: 120px;
    font-weight: bold;
}

.news-cat {
    background: var(--color-primary);
    color: #000;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 20px;
    font-weight: bold;
}

.news-title {
    flex: 1;
}

/* Card Grid (Talents, Goods) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background: var(--color-dark-panel);
    border: 1px solid rgba(255, 0, 222, 0.3);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    cursor: pointer;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 0%, rgba(255, 0, 222, 0.1) 100%);
    z-index: 1;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 30px rgba(255, 0, 222, 0.4);
    border-color: var(--color-secondary);
}

.card-img-wrapper {
    height: 350px;
    overflow: hidden;
    position: relative;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.5s;
}

.card:hover .card-img {
    transform: scale(1.1);
}

.card-info {
    padding: 20px;
    position: relative;
    z-index: 2;
}

.card-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 5px;
}

.card-desc {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 15px;
}

/* Schedule Table */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 40px;
    background: var(--color-dark-panel);
    border: 1px solid var(--color-primary);
}

.schedule-table th,
.schedule-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}

.schedule-table th {
    background: rgba(0, 240, 255, 0.1);
    color: var(--color-primary);
    font-family: var(--font-heading);
}

.schedule-table tr:hover {
    background: rgba(255, 0, 222, 0.05);
}

.live-badge {
    display: inline-block;
    background: #ff0000;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-right: 10px;
    animation: flash 1s infinite;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    height: 80vh;
    background: rgba(10, 10, 30, 0.95);
    border: 2px solid var(--color-primary);
    box-shadow: 0 0 50px rgba(0, 240, 255, 0.3);
    z-index: 2001;
    display: flex;
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: var(--color-primary);
    cursor: pointer;
    z-index: 2010;
    background: rgba(5, 5, 16, 0.6);
    border: 1px solid rgba(0, 240, 255, 0.4);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.modal-close:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--color-primary);
}

.modal-close:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

.modal-left {
    width: 40%;
    background: radial-gradient(circle at center, #1a1a3a 0%, #050510 100%);
    position: relative;
    overflow: hidden;
}

.modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.modal-right {
    width: 60%;
    padding: 50px;
    overflow-y: auto;
}

.modal-name {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--color-secondary);
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 0, 222, 0.5);
}

.modal-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tag {
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.modal-bio {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #ddd;
}

/* Animations */
@keyframes flash {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
    }

    .nav {
        display: none;
    }

    /* Simplified for demo */
    .hero-content {
        transform: scale(0.8);
    }

    .mv-char.side {
        display: none;
    }

    .modal-content {
        flex-direction: column;
        height: 90vh;
    }

    .modal-close {
        width: 56px;
        height: 56px;
        font-size: 2.2rem;
    }

    .modal-left {
        width: 100%;
        height: 300px;
    }

    .modal-right {
        width: 100%;
        padding: 20px;
    }

    .modal-name {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }

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

    .card-img-wrapper {
        height: 200px;
    }

    .card-name {
        font-size: 1.1rem;
    }

    .card-desc {
        font-size: 0.8rem;
    }

    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .news-date {
        width: auto;
    }

    .schedule-table {
        font-size: 0.8rem;
    }

    .schedule-table th,
    .schedule-table td {
        padding: 10px;
    }

    .main-visual {
        height: 60vh;
    }

    .categories {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px !important;
    }

    .cat-btn {
        padding: 8px 15px !important;
        margin: 0 !important;
        font-size: 0.8rem !important;
    }

    .mv-char.center {
        background: linear-gradient(180deg, #1a1a3a 0%, #050510 100%);
    }
}
