:root {
    --bg-color: #080a0f;
    --surface-color: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);

    --tier-s: #ff2a55;
    --tier-a: #ffaa00;
    --tier-b: #00d4ff;
    --tier-c: #4ade80;
    --tier-d: #a8b2c1;

    --font-en: 'Rajdhani', sans-serif;
    --font-ja: 'Noto Sans JP', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-ja);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(0, 212, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(255, 42, 85, 0.03) 0%, transparent 50%);
    background-attachment: fixed;
}

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

.en-font {
    font-family: var(--font-en);
    letter-spacing: 0.05em;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(8, 10, 15, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 160;
    padding: 15px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-en);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--tier-s);
}

.nav-costs {
    display: flex;
    gap: 10px;
}

.cost-tab {
    text-decoration: none;
    display: inline-block;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 16px;
    border-radius: 20px;
    font-family: var(--font-en);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.cost-tab.active {
    background: var(--text-main);
    color: var(--bg-color);
    border-color: var(--text-main);
}

.cost-tab:hover:not(.active) {
    background: var(--surface-hover);
    color: var(--text-main);
}

/* Hero */
.hero {
    padding: 120px 0 60px;
    text-align: center;
    position: relative;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
    z-index: -1;
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

.update-badge {
    display: inline-block;
    background: rgba(0, 212, 255, 0.1);
    color: var(--tier-b);
    border: 1px solid rgba(0, 212, 255, 0.2);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 15px;
    text-transform: uppercase;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 30px;
}

/* Tier Board */
.tier-board {
    padding: 0 0 80px;
}

.tier-row {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    overflow: hidden;
    backdrop-filter: blur(4px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tier-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.tier-label {
    width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-en);
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
    flex-shrink: 0;
}

.tier-row[data-tier="S"] .tier-label { background: linear-gradient(135deg, rgba(255, 42, 85, 0.2), rgba(255, 42, 85, 0.05)); color: var(--tier-s); border-right: 2px solid var(--tier-s); }
.tier-row[data-tier="A"] .tier-label { background: linear-gradient(135deg, rgba(255, 170, 0, 0.2), rgba(255, 170, 0, 0.05)); color: var(--tier-a); border-right: 2px solid var(--tier-a); }
.tier-row[data-tier="B"] .tier-label { background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.05)); color: var(--tier-b); border-right: 2px solid var(--tier-b); }
.tier-row[data-tier="C"] .tier-label { background: linear-gradient(135deg, rgba(74, 222, 128, 0.2), rgba(74, 222, 128, 0.05)); color: var(--tier-c); border-right: 2px solid var(--tier-c); }
.tier-row[data-tier="D"] .tier-label { background: linear-gradient(135deg, rgba(168, 178, 193, 0.2), rgba(168, 178, 193, 0.05)); color: var(--tier-d); border-right: 2px solid var(--tier-d); }

/* Sub Groups */
.tier-sub-groups {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tier-sub-group {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tier-sub-group:last-child {
    border-bottom: none;
}

.sub-label {
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-en);
    font-size: 1.1rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.tier-row[data-tier="S"] .sub-label { color: var(--tier-s); }
.tier-row[data-tier="A"] .sub-label { color: var(--tier-a); }
.tier-row[data-tier="B"] .sub-label { color: var(--tier-b); }
.tier-row[data-tier="C"] .sub-label { color: var(--tier-c); }
.tier-row[data-tier="D"] .sub-label { color: var(--tier-d); }

/* Unit Cards */
.tier-items {
    flex-grow: 1;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.unit-card {
    background: transparent;
    border: none;
    padding: 0;
    display: block;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.unit-card:hover {
    transform: translateY(-3px) scale(1.02);
    z-index: 10;
}

.tier-row[data-tier="S"] .unit-card:hover { filter: drop-shadow(0 0 12px rgba(255, 42, 85, 0.6)); }
.tier-row[data-tier="A"] .unit-card:hover { filter: drop-shadow(0 0 12px rgba(255, 170, 0, 0.6)); }
.tier-row[data-tier="B"] .unit-card:hover { filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.6)); }
.tier-row[data-tier="C"] .unit-card:hover { filter: drop-shadow(0 0 12px rgba(74, 222, 128, 0.6)); }
.tier-row[data-tier="D"] .unit-card:hover { filter: drop-shadow(0 0 12px rgba(168, 178, 193, 0.6)); }

.unit-icon {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
}

.unit-icon img {
    width: 100%;
    height: auto;
    display: block;
}

.unit-name {
    display: none;
}

/* Meta Analysis */
.meta-analysis {
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
}

.section-title {
    font-family: var(--font-en);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title::after {
    content: '';
    height: 1px;
    flex-grow: 1;
    background: linear-gradient(to right, var(--border-color), transparent);
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.analysis-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
}

.analysis-card h3 {
    color: var(--tier-s);
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.analysis-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
}

.analysis-cta {
    text-align: center;
    margin-top: 40px;
}

.analysis-cta p {
    margin-bottom: 10px;
}

/* CTA Button */
.cta-button {
    display: inline-block;
    background: var(--text-main);
    color: var(--bg-color);
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 700;
    margin-top: 20px;
    transition: transform 0.2s;
}

.cta-button:hover {
    transform: scale(1.05);
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

footer p + p {
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }

    .tier-row { flex-direction: column; }
    .tier-label { width: 100%; height: 50px; font-size: 1.8rem; border-right: none; border-bottom: 2px solid; }
    .tier-row[data-tier="S"] .tier-label { border-bottom-color: var(--tier-s); }
    .tier-row[data-tier="A"] .tier-label { border-bottom-color: var(--tier-a); }
    .tier-row[data-tier="B"] .tier-label { border-bottom-color: var(--tier-b); }
    .tier-row[data-tier="C"] .tier-label { border-bottom-color: var(--tier-c); }
    .tier-row[data-tier="D"] .tier-label { border-bottom-color: var(--tier-d); }

    .tier-sub-group { flex-direction: column; }
    .sub-label {
        width: 100%;
        height: 24px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        background: rgba(0, 0, 0, 0.3);
        justify-content: flex-start;
        padding-left: 12px;
        font-size: 0.85rem;
    }

    .tier-items {
        grid-template-columns: repeat(3, 1fr);
        padding: 8px;
        gap: 8px;
    }

    .analysis-grid { grid-template-columns: 1fr; }
    .nav-costs { display: none; }
}

/* Hamburger Button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 200;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: transform 0.35s ease, opacity 0.35s ease;
    transform-origin: center;
}

.hamburger.open span { background: #ffffff; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav Overlay */
@keyframes nav-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes nav-fade-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes link-slide-in {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mobile-nav {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 6, 10, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 155;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav.open {
    pointer-events: all;
    opacity: 1;
}

/* リンクのスライドイン（openクラスがついたとき） */
.mobile-nav.open .mobile-nav-link {
    animation: link-slide-in 0.4s ease forwards;
    opacity: 0;
}

.mobile-nav.open .mobile-nav-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-nav.open .mobile-nav-link:nth-child(2) { animation-delay: 0.12s; }
.mobile-nav.open .mobile-nav-link:nth-child(3) { animation-delay: 0.19s; }
.mobile-nav.open .mobile-nav-link:nth-child(4) { animation-delay: 0.26s; }

.mobile-nav-link {
    font-family: var(--font-en);
    font-size: 4rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.05em;
    padding: 12px 40px;
    border-radius: 8px;
    transition: background 0.2s ease, transform 0.2s ease;
    position: relative;
}

/* イメージカラー */
.mobile-nav-link[href="3000.html"] { color: var(--tier-s); }
.mobile-nav-link[href="2500.html"] { color: var(--tier-a); }
.mobile-nav-link[href="2000.html"] { color: var(--tier-b); }
.mobile-nav-link[href="1500.html"] { color: var(--tier-c); }

.mobile-nav-link:hover { transform: scale(1.06); }

.mobile-nav-link[href="3000.html"]:hover { background: rgba(255, 42, 85, 0.1); }
.mobile-nav-link[href="2500.html"]:hover { background: rgba(255, 170, 0, 0.1); }
.mobile-nav-link[href="2000.html"]:hover { background: rgba(0, 212, 255, 0.1); }
.mobile-nav-link[href="1500.html"]:hover { background: rgba(74, 222, 128, 0.1); }

/* アクティブ：グロー */
.mobile-nav-link[href="3000.html"].active { text-shadow: 0 0 20px rgba(255, 42, 85, 0.8); }
.mobile-nav-link[href="2500.html"].active { text-shadow: 0 0 20px rgba(255, 170, 0, 0.8); }
.mobile-nav-link[href="2000.html"].active { text-shadow: 0 0 20px rgba(0, 212, 255, 0.8); }
.mobile-nav-link[href="1500.html"].active { text-shadow: 0 0 20px rgba(74, 222, 128, 0.8); }

.mobile-nav-link:not(.active) {
    opacity: 0.55;
}

.mobile-nav-link:not(.active):hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .hamburger { display: flex; }
}
