:root {
    --bg-main: #050914;
    --bg-secondary: #0a1128;
    --bg-card: rgba(15, 23, 42, 0.7);
    --text-main: #e0e6ed;
    --text-muted: #94a3b8;
    --accent-blue: #8ab4f8;
    --accent-purple: #b39ddb;
    --accent-silver: #c0c0c0;
    --accent-gold: #d4af37;
    --danger: #800020;
    
    --font-heading: 'Shippori Mincho', serif;
    --font-body: 'Noto Sans JP', sans-serif;
    --font-en: 'Cinzel', serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.8;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(138, 180, 248, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(179, 157, 219, 0.05) 0%, transparent 50%);
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-purple);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 9, 20, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-main);
}

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

.nav-links a {
    font-family: var(--font-en);
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav-links a:hover {
    color: var(--text-main);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

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

/* Sections */
.section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-family: var(--font-en);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    color: var(--accent-silver);
    letter-spacing: 0.2em;
    font-weight: 400;
}

.section-title span {
    position: relative;
    display: inline-block;
}

.section-title span::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
}

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 60px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at center, transparent 0%, var(--bg-main) 100%),
        linear-gradient(to bottom, rgba(5,9,20,0.3) 0%, var(--bg-main) 100%),
        url('assets/hero-bg.webp') center/cover no-repeat;
    z-index: -1;
    opacity: 0.8;
}

.hero-content {
    text-align: center;
    z-index: 1;
    padding: 0 20px;
    animation: fadeIn 2s ease-out;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(138, 180, 248, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    display: block;
    margin-top: 10px;
    letter-spacing: 0.2em;
    color: var(--accent-silver);
}

.hero-author {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 40px;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.hero-copy {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    line-height: 2;
    margin-bottom: 50px;
    letter-spacing: 0.1em;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 0.1em;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, rgba(138, 180, 248, 0.1), rgba(179, 157, 219, 0.1));
    border: 1px solid rgba(138, 180, 248, 0.5);
    color: var(--text-main);
    box-shadow: 0 0 15px rgba(138, 180, 248, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(138, 180, 248, 0.2), rgba(179, 157, 219, 0.2));
    border-color: var(--accent-blue);
    box-shadow: 0 0 25px rgba(138, 180, 248, 0.4);
    transform: translateY(-2px);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
}

.btn-secondary:hover {
    border-color: var(--text-main);
    color: var(--text-main);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    font-family: var(--font-en);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    margin-bottom: 10px;
}

.arrow {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--text-main), transparent);
}

/* Story */
.story-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    line-height: 2.2;
    letter-spacing: 0.05em;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
}

.highlight {
    color: var(--accent-blue);
    font-weight: 700;
}

/* Characters */
.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.character-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(138, 180, 248, 0.1);
    border-color: rgba(138, 180, 248, 0.3);
}

.char-image-container {
    height: 300px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.char-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--bg-card));
    pointer-events: none;
}

.char-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.5s ease;
}

.character-card:hover .char-image {
    transform: scale(1.05);
}

.char-info {
    padding: 30px;
    flex-grow: 1;
}

.char-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-main);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.char-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.cover-item {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    aspect-ratio: 3/4;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.05);
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(138, 180, 248, 0.2);
    border-color: rgba(138, 180, 248, 0.5);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    background: #0f172a;
    font-size: 0.9rem;
}

/* News */
.news-list {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    gap: 30px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.news-item time {
    font-family: var(--font-en);
    color: var(--accent-blue);
    white-space: nowrap;
}

.news-item p {
    color: var(--text-main);
}

/* Author */
.author-profile {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}

.author-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: var(--bg-main);
    object-fit: cover;
    flex-shrink: 0;
}

.author-info {
    flex-grow: 1;
}

.author-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.author-desc {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

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

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--text-main);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: var(--font-en);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: 5% auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: #f1f1f1;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

/* Section Backgrounds */
.story-section,
.characters-section {
    overflow: hidden;
}

.story-section .container,
.characters-section .container {
    position: relative;
    z-index: 1;
}

.story-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(138, 180, 248, 0.08), transparent 35%),
        radial-gradient(circle at 80% 60%, rgba(179, 157, 219, 0.07), transparent 35%),
        linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.025) 50%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.characters-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(128, 0, 32, 0.07), transparent 28%),
        radial-gradient(circle at 50% 35%, rgba(138, 180, 248, 0.065), transparent 32%),
        radial-gradient(circle at 85% 70%, rgba(179, 157, 219, 0.075), transparent 30%);
    pointer-events: none;
    z-index: 0;
}

.story-content {
    position: relative;
}

.story-content::before {
    content: '';
    position: absolute;
    inset: 16px;
    border: 1px solid rgba(138, 180, 248, 0.12);
    border-radius: 6px;
    pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: rgba(5, 9, 20, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.3s;
        gap: 40px;
    }

    .nav-links.active {
        left: 0;
    }

    .hero-title {
        font-size: 2.2rem;
    }

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

    .story-content {
        padding: 20px;
    }

    .cover-item {
        grid-column: span 1;
        grid-row: span 1;
    }

    .news-item {
        flex-direction: column;
        gap: 10px;
    }

    .author-profile {
        flex-direction: column;
        text-align: center;
    }
}
