:root {
    --bg-dark: #050a15;
    --gold: #d4af37;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --font-serif: 'Cinzel', serif;
    --font-sans: 'Noto Serif JP', serif;
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Stars */
.stars-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000 url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/123163/stars.png') repeat top center;
    z-index: -2;
}

.twinkling {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/123163/twinkling.png') repeat top center;
    z-index: -1;
    animation: move-twink-back 200s linear infinite;
}

@keyframes move-twink-back {
    from { background-position: 0 0; }
    to { background-position: -10000px 5000px; }
}

/* Navigation */
.global-nav {
    padding: 1.5rem;
    display: flex;
    justify-content: flex-start;
}

.home-btn {
    color: var(--gold);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--gold);
    border-radius: 20px;
    transition: all 0.3s;
    background: rgba(212, 175, 55, 0.1);
}

.home-btn:hover {
    background: var(--gold);
    color: #000;
}

/* Header */
.myth-header {
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
}

.myth-header h1 {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--gold);
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    margin-bottom: 0.5rem;
}

.myth-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
    letter-spacing: 0.2rem;
}

/* Mandala Layout */
.mandala-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 700px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.mandala-container {
    position: relative;
    width: 600px;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Central Node */
.main-god {
    z-index: 10;
    width: 140px;
    height: 140px;
    animation: main-float 4s ease-in-out infinite;
}

@keyframes main-float {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.05) translateY(-5px); }
}

/* God Node Common */
.god-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 5;
}

.god-icon {
    width: 60px;
    height: 60px;
    background: var(--glass);
    border: 2px solid var(--god-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--god-color);
    box-shadow: 0 0 15px var(--god-color);
    margin-bottom: 0.5rem;
}

.main-god .god-icon {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
}

.god-name {
    font-family: var(--font-sans);
    font-weight: bold;
    font-size: 0.9rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    white-space: nowrap;
}

.god-category, .god-attr {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.god-node:hover {
    transform: scale(1.2);
    z-index: 100;
}

.god-node:hover .god-icon {
    background: var(--god-color);
    color: #fff;
    box-shadow: 0 0 25px var(--god-color);
}

/* Secret God */
.secret-god .god-icon {
    border-style: dashed;
    opacity: 0.6;
    filter: grayscale(0.5);
}

.secret-god .god-name {
    opacity: 0.5;
}

/* Magic Circle */
.magic-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.magic-circle::before, .magic-circle::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 50%;
    animation: rotate-circle 60s linear infinite;
}

.magic-circle::after {
    margin: 50px;
    border-style: dotted;
    animation-direction: reverse;
}

@keyframes rotate-circle {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile List View */
.mobile-gods-list {
    display: none;
    width: 100%;
    max-width: 600px;
    padding: 1rem;
    margin: 0 auto;
}

.mobile-god-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.mobile-god-card:active {
    transform: scale(0.97);
    background: rgba(255,255,255,0.1);
}

.mobile-god-card h3 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
    color: #fff;
}

.mobile-god-card span {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.05rem;
}

.mobile-god-card i {
    opacity: 0.5;
    font-size: 0.9rem;
}

/* Detail Intro Section */
.myth-intro-section {
    padding: 4rem 1rem;
    margin-top: 2rem;
}

.section-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
}

.section-container::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.intro-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    color: var(--gold);
}

.intro-header i { font-size: 1.5rem; }

.intro-header h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    letter-spacing: 0.1rem;
}

.intro-body p {
    margin-bottom: 1.5rem;
    color: var(--text-main);
    line-height: 2;
    text-align: justify;
}

.lore-box {
    margin-top: 2.5rem;
    padding: 2rem;
    background: rgba(212, 175, 55, 0.05);
    border-left: 2px solid var(--gold);
    border-radius: 0 16px 16px 0;
    font-style: italic;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
    .myth-header h1 { font-size: 2.2rem; }
    
    .mandala-wrapper {
        display: none; /* Hide mandala on mobile */
    }
    
    .mobile-gods-list {
        display: block; /* Show list on mobile */
    }
    
    .section-container {
        padding: 2rem 1.5rem;
    }
    
    .intro-header h2 { font-size: 1.4rem; }
    
    .intro-body p { font-size: 0.95rem; line-height: 1.8; }
}

/* 320px Optimization */
@media (max-width: 360px) {
    .myth-header h1 { font-size: 1.8rem; }
    .myth-header p { font-size: 0.9rem; letter-spacing: 0.1rem; }
    
    .mobile-god-card {
        padding: 1rem;
    }
    
    .mobile-god-card h3 { font-size: 1.1rem; }
    
    .section-container {
        padding: 1.5rem 1rem;
        border-radius: 20px;
    }
    
    .intro-body p { font-size: 0.9rem; }
    
    .lore-box { padding: 1.2rem; }
}

/* Footer */
.myth-footer {
    text-align: center;
    padding: 3rem 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    margin-top: 5rem;
}
