@charset "UTF-8";

/* Reset & Base */
:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --text-yellow: #ffff55;
    --accent-red: #ff3333;
    --accent-blue: #3333ff;
    --accent-green: #33ff33;
    --border-color: #ffffff;
    --font-jp: 'DotGothic16', sans-serif;
    --font-en: 'Press Start 2P', cursive;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-jp);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.container-center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

/* Utilities: Pixel Border (Box Shadow Trick) */
.pixel-border {
    box-shadow:
        -4px 0 0 0 white,
        4px 0 0 0 white,
        0 -4px 0 0 white,
        0 4px 0 0 white;
    margin: 4px;
    background: black;
}

/* Animations */
/* Animations */
@keyframes walk {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-10px);
    }
}

@keyframes talk {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.05);
        filter: brightness(1.2);
    }
}

/* Apply walk to the container (Character + Name) */
.character-portrait {
    /* animation: walk 0.8s ease-in-out infinite alternate; */
}

.pixel-char {
    display: block;
    width: 100px;
    /* Adjust as needed */
    height: auto;
    transform-origin: bottom center;
    image-rendering: pixelated;
}

.pixel-char.talking {
    animation: talk 0.15s steps(2) infinite;
}

/* 1. Hero Screen */
.hero-screen {
    background: #000;
    position: relative;
    border-bottom: 4px solid white;
}

/* Hero Battle Section (Parallax Background) */
.hero-battle-section {
    position: relative;
    background-image: url('battle_bg.png');
    background-size: 400px auto;
    background-position: center top;
    background-attachment: scroll;
    background-repeat: repeat;
    background-color: #4a8c4a;
}

.battle-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    /* Darker overlay (20% visibility) */
    pointer-events: none;
    z-index: 0;
}

.battle-content {
    position: relative;
    z-index: 1;
}

/* Back to Top Sword Button */
.back-to-top-sword {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #1a1a1a;
    border: 4px solid white;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.2s, box-shadow 0.2s;
    z-index: 9999;
    box-shadow: 4px 4px 0 #000;
}

.back-to-top-sword.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top-sword:hover {
    background: #333;
    transform: translateY(-5px);
    box-shadow: 4px 8px 0 #000, 0 0 20px rgba(255, 255, 85, 0.5);
}

.back-to-top-sword .sword-icon {
    font-size: 1.8rem;
    transform: rotate(-45deg);
    filter: drop-shadow(0 0 5px rgba(255, 255, 85, 0.8));
}

.back-to-top-sword:hover .sword-icon {
    animation: sword-pulse 0.5s ease-in-out infinite alternate;
}

@keyframes sword-pulse {
    from {
        filter: drop-shadow(0 0 5px rgba(255, 255, 85, 0.8));
    }

    to {
        filter: drop-shadow(0 0 15px rgba(255, 255, 85, 1));
    }
}

.game-title {
    font-family: var(--font-en);
    font-size: 3rem;
    color: var(--text-yellow);
    line-height: 1.2;
    text-shadow: 4px 4px var(--accent-red);
    margin-bottom: 2rem;
    text-align: center;
}

/* Promotion Alert */
.promotion-alert {
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 0.75rem;
    color: #888;
    margin: 0;
    z-index: 10;
}

.sub-title {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.pixel-subtitle {
    font-size: 1.5rem;
    /* Larger size */
    color: #ffffff;
    margin-bottom: 1rem;
    text-shadow: 2px 2px #000;
}

.pixel-text {
    font-size: 1rem;
    margin-bottom: 2rem;
    border: 2px solid white;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    display: inline-block;
}

.start-btn {
    font-size: 1.5rem;
    color: white;
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* 2. Prologue (Message Window) */
.prologue-section {
    padding: 4rem 0;
}

.message-window-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 3rem;
}

.message-window-wrapper.reverse {
    flex-direction: row-reverse;
}

.character-portrait {
    text-align: center;
}

.pixel-char {
    width: 80px;
    height: 80px;
    background: #000;
    border: 4px solid white;
    /* Simplified fallback */
    image-rendering: pixelated;
}

.char-name-box {
    background: #000;
    border: 2px solid white;
    padding: 2px 8px;
    margin-top: 5px;
    font-size: 0.8rem;
    display: inline-block;
}

.message-window {
    flex: 1;
    border: 4px solid white;
    padding: 20px;
    background: #000;
    position: relative;
    border-radius: 4px;
    min-height: 100px;
}

.typing-text {
    margin: 0;
    font-size: 1.1rem;
}

.blinking-cursor {
    display: inline-block;
    animation: blink 1s infinite;
    color: var(--text-yellow);
    margin-left: 5px;
}

/* 3. Weapon Shop (Rankings) - NEW DESIGN */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    padding: 10px;
    background: #000;
    border: 2px dashed white;
    text-align: center;
}

.weapon-card {
    background: #000;
    border: 4px solid white;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

/* Brand Branding Colors */
.weapon-card.brand-nuro .brand-header {
    background: linear-gradient(135deg, #000 0%, #cc0000 100%);
    border-bottom: 4px solid #cc0000;
}

.weapon-card.brand-au .brand-header {
    background: linear-gradient(135deg, #000 0%, #ff9900 100%);
    border-bottom: 4px solid #ff9900;
}

.weapon-card.brand-docomo .brand-header {
    background: linear-gradient(135deg, #000 0%, #cc0000 100%);
    border-bottom: 4px solid #cc0000;
}

.weapon-card.brand-softbank .brand-header {
    background: linear-gradient(135deg, #333 0%, #efefef 100%);
    border-bottom: 4px solid #ccc;
}

.weapon-card.brand-softbank .brand-name {
    color: #333;
    text-shadow: none;
}

/* Special case for softbank readability */
.weapon-card.brand-gmo .brand-header {
    background: linear-gradient(135deg, #000 0%, #003366 100%);
    border-bottom: 4px solid #003366;
}

.brand-header {
    padding: 20px;
    text-align: center;
}

.fantasy-badge {
    display: inline-block;
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-yellow);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid var(--text-yellow);
    margin-bottom: 10px;
}

.brand-name {
    font-size: 2.5rem;
    margin: 0;
    color: white;
    text-shadow: 3px 3px 0 #000;
    line-height: 1.2;
}

.weapon-body {
    padding: 20px;
}

.weapon-stats-grid {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.stat-box {
    flex: 1;
    background: #222;
    border: 2px solid #555;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-text {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.7rem;
    color: #aaa;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
}

.weapon-desc-simple {
    background: #111;
    padding: 15px;
    border: 1px dotted #666;
    margin-bottom: 15px;
}

/* Weapon Card Details (Always Visible) */
.weapon-separator {
    border: 0;
    border-top: 3px dashed #555;
    margin: 20px 0;
}

.weapon-details-open {
    background: #0a0a0a;
    border: 2px solid #333;
    padding: 15px;
    margin-bottom: 15px;
}

.details-section {
    margin-bottom: 15px;
}

.details-section:last-child {
    margin-bottom: 0;
}

.details-section h4 {
    margin: 0 0 10px 0;
    color: var(--text-yellow);
    font-size: 0.95rem;
}

.details-section ul {
    margin: 0;
    padding-left: 20px;
}

.details-section li {
    margin-bottom: 5px;
}

.details-section p {
    margin: 0;
    line-height: 1.6;
}

.weapon-action {
    text-align: center;
    padding: 20px;
    background: #111;
    border-top: 2px solid #333;
}

.equip-btn {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background: #cc0000;
    border: 4px solid white;
    color: white;
    padding: 15px;
    font-size: 1.3rem;
    font-weight: bold;
    transition: all 0.2s;
    box-shadow: 0 4px 0 #880000;
}

.equip-btn:hover {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #880000;
    background: #ff3333;
}

/* 4. Destiny Junction (Flow) */
.dungeon-fork {
    margin-top: 4rem;
    text-align: center;
}

.flow-chart {
    display: flex;
    justify-content: center;
}

.flow-box {
    background: #000;
    border: 2px solid white;
    padding: 15px;
    display: inline-block;
    margin: 10px;
}

.flow-arrows {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
}

.arrow-path {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.arrow-label {
    background: #222;
    padding: 2px 10px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.flow-line {
    width: 2px;
    height: 20px;
    background: white;
    margin-bottom: 10px;
}

.flow-box.answer {
    border-color: var(--text-yellow);
    color: var(--text-yellow);
}

/* 4. Comparison Matrix (Pixel Table) */
.rpg-section {
    margin-bottom: 4rem;
}

.table-scroll {
    overflow-x: auto;
    border: 4px solid white;
    background: #000;
}

.pixel-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    color: white;
    font-size: 0.9rem;
}

.pixel-table th,
.pixel-table td {
    border: 2px solid #555;
    padding: 10px;
    text-align: center;
}

.pixel-table th {
    background: #222;
    color: var(--text-yellow);
    font-weight: bold;
    white-space: nowrap;
}

.pixel-table tr:nth-child(even) {
    background: #111;
}

.pixel-table tr:nth-child(odd) {
    background: #000;
}

.bold-text {
    font-weight: bold;
    color: var(--text-yellow);
}

.col-highlight {
    color: #ff6666;
    font-weight: bold;
}

/* 5. Detailed Guides (Card Style) */
.guide-card {
    background: #000;
    border: 4px solid white;
    padding: 20px;
    margin-bottom: 30px;
    color: white;
}

/* Brand borders for cards */
.guide-card.brand-nuro {
    border-color: #ff3333;
}

.guide-card.brand-au {
    border-color: #ff9900;
}

.guide-card.brand-gmo {
    border-color: #3366ff;
}

.guide-card.brand-docomo {
    border-color: #cc0000;
}

.guide-card.brand-softbank {
    border-color: #cccccc;
}

.guide-card h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--text-yellow);
    border-bottom: 2px dashed #555;
    padding-bottom: 10px;
}

.guide-card .desc {
    margin-bottom: 20px;
    line-height: 1.8;
}

.pros-cons {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
    background: #111;
    padding: 15px;
    border-radius: 4px;
    /* Slight round for readability inside pixel box? No, keep it square for pixel feel */
    border: 1px solid #333;
}

.pros-cons li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.pros-cons li:last-child {
    margin-bottom: 0;
}

.pixel-btn {
    display: inline-block;
    background: #cc0000;
    color: white;
    text-decoration: none;
    padding: 12px 30px;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 4px 4px 0 #000;
    /* Simple block shadow */
    transition: transform 0.1s, box-shadow 0.1s;
}

.pixel-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
    background: #ff3333;
}

/* Monster Info (Pixel Style) */
.monster-section {
    padding: 3rem 0;
}

.pixel-heading {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 5px solid var(--accent-red);
}

.pixel-box {
    background: #000;
    border: 4px solid white;
    padding: 20px;
    color: white;
    font-size: 1rem;
    line-height: 1.8;
    box-shadow: 5px 5px 0 #333;
}

.pixel-hr {
    border: 0;
    border-top: 2px dashed #666;
    margin: 20px 0;
}

/* Detailed Status Window (Accordion) */
details.weapon-details {
    margin-bottom: 20px;
    border: 2px solid #555;
    background: #111;
}

summary.details-summary {
    cursor: pointer;
    padding: 10px;
    background: #333;
    color: white;
    font-weight: bold;
    list-style: none;
    /* Hide default triangle */
    text-align: center;
}

summary.details-summary:hover {
    background: #555;
}

.details-content {
    padding: 20px;
    border-top: 2px solid #555;
    background: #000;
}

.details-section {
    margin-bottom: 20px;
}

.details-section h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--text-yellow);
    font-size: 1rem;
    border-bottom: 1px solid #444;
}

.skill-list li {
    margin-bottom: 5px;
    color: #88ff88;
}

/* Tavern Rumors (Q&A) */
.faq-list {
    background: #000;
    border: 4px solid white;
    padding: 20px;
    margin: 0;
}

.faq-list dt {
    color: var(--text-yellow);
    font-weight: bold;
    margin-bottom: 10px;
    border-bottom: 1px dashed #666;
    padding-bottom: 5px;
}

.bbs-body {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 600px) {
    .weapon-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .message-window-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .message-window-wrapper.reverse {
        flex-direction: column;
    }

    .flow-arrows {
        flex-direction: column;
        gap: 10px;
    }
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}

.footer-links a {
    color: #888;
    font-size: 0.8rem;
    text-decoration: none;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}
