/* style.css - ボーナス「税金ドロボー」手取り絶望チェッカー */

.bg-bonus {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    /* ボーナスの夢（ゴールド）から、明細を見た後の絶望（ダークパープル/ブラック）へのグラデーション */
    background: linear-gradient(135deg, #fef08a 0%, #a16207 30%, #312e81 70%, #0f172a 100%);
    background-size: 300% 300%;
    animation: illusionShatter 12s ease infinite;
    z-index: -1;
}

@keyframes illusionShatter {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    color: #334155;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
}

.sim-container {
    width: 100%;
    max-width: 800px;
    padding: 60px 20px 40px;
    position: relative;
    z-index: 10;
}

.back-link {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #1e293b;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}
.back-link:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.main-app-card.bonus-app-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 3px solid #facc15;
    border-radius: 20px;
    padding: 32px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(250, 204, 21, 0.3);
}

.sim-header {
    text-align: center;
    margin-bottom: 2rem;
}

.sim-header h2 {
    font-size: 1.8rem;
    background: linear-gradient(90deg, #b45309, #ca8a04);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.sim-header p {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 入力エリア */
.input-section {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.grid-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 20px;
}
.grid-inputs:last-child { margin-bottom: 0; }

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #334155;
    font-size: 0.95rem;
}

.highlight-val {
    font-size: 1.4rem;
    font-weight: 900;
    color: #ca8a04;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    background: #fef08a;
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #fff;
    border: 4px solid #eab308;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sub-hint {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 8px;
}

.options-box {
    background: #f8fafc;
    padding: 15px;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
    text-align: center;
}

/* 視覚的アリーナ (一本バー) */
.visual-section {
    background: #f8fafc;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.bar-title {
    text-align: center;
    font-weight: bold;
    margin-bottom: 15px;
    color: #334155;
}

.bar-title span {
    color: #b45309;
    font-size: 1.2rem;
    font-weight: 900;
}

.bonus-bar-wrapper {
    width: 100%;
    height: 40px;
    background: #e2e8f0;
    border-radius: 20px;
    display: flex;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.bar-segment {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* お役所の天引き色 */
.segment-shakaihoken { background: repeating-linear-gradient(45deg, #475569, #475569 10px, #334155 10px, #334155 20px); }
.segment-tax { background: repeating-linear-gradient(45deg, #ef4444, #ef4444 10px, #dc2626 10px, #dc2626 20px); }
.segment-net { background: linear-gradient(90deg, #facc15, #eab308); color: #713f12; text-shadow: 0 1px 0 rgba(255,255,255,0.4); }

.breakdown-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    font-size: 0.9rem;
    color: #475569;
}

.bd-item strong {
    color: #dc2626;
    font-size: 1rem;
}

.dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    margin-right: 4px;
}
.dot-soc { background: #334155; }
.dot-tax { background: #ef4444; }

/* 結果セクション */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 20px;
}

.stat-box {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.stat-title {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 5px;
    font-weight: bold;
    line-height: 1.4;
}

.stat-value {
    font-size: 2rem;
    font-weight: 900;
}

.danger { color: #dc2626; }

.ratio-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 5px;
    font-weight: bold;
}
.ratio-label span { color: #ef4444; font-size: 1rem;}

.net-box {
    background: rgba(254, 252, 232, 0.8);
    border-color: #facc15;
    border-style: solid;
}
.net-box .stat-value.highlight {
    color: #b45309;
    font-size: 2.3rem;
}

.final-verdict {
    background: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.final-verdict h3 {
    margin-bottom: 10px;
    color: #0f172a;
}

.final-verdict p {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.6;
}

/* 悲惨な宣告スタイル */
.verdict-hell {
    border-color: #ef4444;
    background: rgba(254, 226, 226, 0.4);
}
.verdict-hell h3 { color: #b91c1c; }

@media (max-width: 650px) {
    .grid-inputs, .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
