:root {
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.6);
    --bg-card-border: rgba(148, 163, 184, 0.1);

    --text-main: #f1f5f9;
    --text-muted: #94a3b8;

    --accent-cyan: #22d3ee;
    --accent-cyan-glow: rgba(34, 211, 238, 0.3);

    --accent-gold: #facc15;
    --accent-gold-glow: rgba(250, 204, 21, 0.3);

    --accent-danger: #f43f5e;

    --font-jp: 'Noto Sans JP', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --line-height: #06c755;
    /* LINE Brand Color */
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-jp);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    padding-bottom: 180px;
}

/* Background Effects */
.background-glob {
    position: fixed;
    top: -20%;
    left: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
    filter: blur(80px);
    z-index: -1;
    animation: drift 20s infinite alternate;
}

@keyframes drift {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(20px, 40px);
    }
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.1) 51%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 100;
    opacity: 0.3;
}

.container {
    max-width: 480px;
    /* Mobile First Wrapper */
    margin: 0 auto;
    padding: 24px 20px;
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

.profile-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
}

.profile-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-cyan), var(--accent-gold));
    filter: blur(15px);
    opacity: 0.6;
    animation: pulse-glow 3s infinite;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

.status-badge {
    position: absolute;
    bottom: -5px;
    right: -10px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 20px;
    z-index: 3;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

h1 {
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1.4;
    margin-bottom: 16px;
    letter-spacing: -0.05em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.highlight-bug {
    color: var(--accent-danger);
    background: rgba(244, 63, 94, 0.1);
    padding: 0 4px;
    border-radius: 4px;
    position: relative;
}

.highlight-bug::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--accent-danger);
}

.hero-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.mono-bg {
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-main);
    font-size: 0.8rem;
    display: inline-block;
    margin-top: 8px;
}

/* Dashboard Card */
.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 48px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.card-header {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    border-bottom: 1px solid var(--bg-card-border);
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.05em;
}

.stat-value.gold {
    color: var(--accent-gold);
    text-shadow: 0 0 10px var(--accent-gold-glow);
}

.stat-value.cyan {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan-glow);
}

.progress-bar-container {
    margin-top: 12px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-family: var(--font-mono);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    width: 82%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-gold));
    border-radius: 3px;
    box-shadow: 0 0 8px var(--accent-cyan-glow);
}

/* Concept Section */
.concept {
    margin-bottom: 48px;
    text-align: center;
}

.section-title {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.section-title i {
    color: var(--accent-cyan);
}

.story-box {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 24px;
    font-size: 0.95rem;
    line-height: 1.8;
    position: relative;
    border-left: 2px solid var(--accent-cyan);
}

.story-box.highlight-box {
    border-left: 2px solid var(--accent-gold);
    background: rgba(250, 204, 21, 0.05);
}

.text-cyan {
    color: var(--accent-cyan);
    font-weight: 700;
}

.arrow-down {
    margin: 24px 0;
    color: var(--text-muted);
    animation: bounce 2s infinite;
}

/* Portfolio Section */
.portfolio-section {
    margin-bottom: 48px;
}

.portfolio-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pie-chart-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 24px;
}

.pie-chart {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--accent-cyan) 0% 60%,
            /* US Stocks */
            var(--accent-gold) 60% 80%,
            /* J-REIT */
            var(--accent-danger) 80% 90%,
            /* Crypto */
            #334155 90% 100%
            /* Cash */
        );
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    position: relative;
    filter: drop-shadow(0 0 8px var(--accent-cyan-glow));
}

.chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: var(--bg-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.update-notice {
    position: relative;
    z-index: 10;
    width: 100%;
    font-size: 0.7rem;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(250, 204, 21, 0.1);
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid rgba(250, 204, 21, 0.3);
    animation: pulse-simple 2s infinite;
}

@keyframes pulse-simple {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

.chart-legend {
    list-style: none;
    width: 100%;
}

.chart-legend li {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.chart-legend li:last-child {
    border-bottom: none;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 12px;
}

.d-us {
    background: var(--accent-cyan);
    box-shadow: 0 0 5px var(--accent-cyan);
}

.d-reit {
    background: var(--accent-gold);
    box-shadow: 0 0 5px var(--accent-gold);
}

.d-cry {
    background: var(--accent-danger);
    box-shadow: 0 0 5px var(--accent-danger);
}

.d-cash {
    background: #334155;
}

.percent {
    margin-left: auto;
    font-family: var(--font-mono);
    font-weight: 700;
}

.portfolio-note {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: center;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 64px;
}



/* Lock Screen */
.lock-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #0f172a;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.83, 0, 0.17, 1);
}

.lock-screen.unlocked {
    transform: translateY(-100%);
}

.lock-content {
    padding: 24px;
    max-width: 320px;
}

.lock-icon {
    font-size: 3rem;
    color: var(--accent-danger);
    margin-bottom: 24px;
    animation: pulse-glow 2s infinite;
}

.lock-content h2 {
    font-family: var(--font-mono);
    color: var(--accent-danger);
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.lock-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.input-group {
    display: flex;
    gap: 8px;
    justify-content: center;
}

#passcode {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--accent-danger);
    color: white;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    padding: 12px;
    border-radius: 8px;
    width: 140px;
    text-align: center;
    letter-spacing: 0.2em;
    outline: none;
}

#passcode:focus {
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.3);
}

#unlock-btn {
    background: var(--accent-danger);
    color: white;
    border: none;
    border-radius: 8px;
    width: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.1s;
}

#unlock-btn:active {
    transform: scale(0.95);
}

.error-msg {
    color: var(--accent-danger);
    font-size: 0.75rem;
    height: 20px;
    margin-top: 16px;
    font-weight: 700;
}

/* Portfolio Graph */
.portfolio-section {
    margin: 32px 0;
}

.section-title-sm {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.portfolio-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 24px;
    padding: 32px 24px;
    position: relative;
    overflow: hidden;
}

.portfolio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.1), transparent 60%);
    pointer-events: none;
}

.chart-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 32px;
}

.donut-chart {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.donut-chart::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: #1e293b;
    /* Should match card bg roughly or be darker hole */
    background: #151d2f;
    border-radius: 50%;
}

.chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.total-amount {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    display: block;
}

.chart-legend {
    list-style: none;
    width: 100%;
}

.chart-legend li {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chart-legend li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.chart-legend .dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 12px;
    flex-shrink: 0;
}

.chart-legend .label {
    margin-right: auto;
    font-weight: 500;
}

.chart-legend .percent {
    font-family: var(--font-mono);
    font-weight: 700;
}

.portfolio-note {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 24px;
    text-align: center;
    opacity: 0.6;
}

/* CTA Section */
.cta-section {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, var(--bg-dark) 80%, transparent);
    z-index: 50;
    display: flex;
    justify-content: center;
}

.cta-card {
    width: 100%;
    max-width: 480px;
    text-align: center;
}

.cta-micro {
    font-size: 0.75rem;
    color: var(--accent-gold);
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    background: rgba(15, 23, 42, 0.8);
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
}

.cta-button {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #4f46e5, #9333ea);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.5);
    position: relative;
    overflow: hidden;
    transition: transform 0.1s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-button:active {
    transform: scale(0.98);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg);
    animation: shine 3s infinite;
}

.btn-icon {
    font-size: 2rem;
    margin-right: 12px;
}

.btn-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.btn-main {
    font-size: 1.0rem;
    font-weight: 900;
    line-height: 1.2;
    white-space: normal;
}

.btn-sub {
    font-size: 0.7rem;
    opacity: 0.9;
    font-weight: 500;
}

.btn-arrow {
    background: rgba(0, 0, 0, 0.1);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    margin-left: 8px;
}

.cta-note {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 8px;
    opacity: 0.7;
}

/* Animations */
@keyframes pulse-glow {
    0% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1.05);
    }

    100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }

    20% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}