/* style.css - 遺族年金「パパ死亡時のチート」チェッカー */

.bg-guardian {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    /* 厳かで安心感のある紫、白、ゴールドのセーフティネットグラデーション */
    background: linear-gradient(135deg, #f8fafc 0%, #ede9fe 30%, #c4b5fd 70%, #8b5cf6 100%);
    background-size: 300% 300%;
    animation: guardianAura 15s ease infinite;
    z-index: -1;
}

@keyframes guardianAura {
    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: #6d28d9;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.9);
    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: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.main-app-card.guardian-app-card {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 3px solid #ddd6fe;
    border-radius: 24px;
    padding: 32px 24px;
    box-shadow: 0 20px 60px rgba(109, 40, 217, 0.2), inset 0 0 20px rgba(255, 255, 255, 1);
}

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

.sim-header h2 {
    font-size: 1.8rem;
    background: linear-gradient(90deg, #6d28d9, #c026d3);
    -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;
}
.sim-header p strong {
    color: #9333ea;
}

/* 入力エリア */
.input-section {
    background: #faf5ff;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e9d5ff;
    margin-bottom: 1.5rem;
    box-shadow: inset 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; }

.work-group.input-group, .grid-inputs:nth-child(2) .input-group {
    grid-column: 1 / -1; 
}

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

.highlight-val {
    font-size: 1.5rem;
    font-weight: 900;
    color: #7e22ce;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    background: #e9d5ff;
    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 #a855f7;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ラジオボタン 働き方UI */
.work-selector {
    display: flex;
    gap: 15px;
}

.radio-card {
    cursor: pointer;
    flex: 1;
    position: relative;
}

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 15px 10px;
    background: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.radio-card input[type="radio"]:checked + .radio-label {
    background: #fdf4ff;
    border-color: #c026d3;
    color: #9333ea;
    box-shadow: 0 4px 6px rgba(192, 38, 211, 0.15);
    transform: translateY(-2px);
}

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

/* 視覚的アリーナ (年金の塔) */
.visual-section {
    background: #fff;
    padding: 25px 20px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
    text-align: center;
}

.guardian-title {
    font-weight: bold;
    margin-bottom: 25px;
    color: #6d28d9;
    font-size: 1.1rem;
}

/* 積み上げUI */
.pension-stack {
    display: flex;
    flex-direction: column-reverse; /* 下から上に積む */
    gap: 0;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.stack-item {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    transition: all 0.5s ease;
}
.stack-item:first-child { border-bottom: none; }

.item-base { 
    background: linear-gradient(90deg, #ec4899, #f472b6); 
    color: #fff;
}
.item-child { 
    background: linear-gradient(90deg, #3b82f6, #60a5fa); 
    color: #fff;
}
.item-welfare { 
    background: linear-gradient(90deg, #8b5cf6, #c084fc); 
    color: #fff;
}

.p-name {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
}

.stack-item strong {
    font-size: 1.25rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* 未発動・金額0の時の処理 */
.stack-zero {
    opacity: 0.3;
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    text-shadow: none;
}

/* 結果セクション */
.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: 20px 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: 8px;
    font-weight: bold;
    line-height: 1.4;
}

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

.safe { color: #8b5cf6; }

.sub-ratio {
    font-size: 0.8rem;
    color: #10b981;
    margin-top: 5px;
    font-weight: bold;
}

.net-box {
    background: rgba(250, 245, 255, 0.8);
    border-color: #d8b4fe;
    border-style: solid;
    border-width: 2px;
}
.net-box .stat-value.highlight {
    color: #a855f7;
    font-size: 2.3rem;
    background: linear-gradient(90deg, #9333ea, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.final-verdict h3 {
    margin-bottom: 10px;
    color: #86198f;
}

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

/* 悲惨(遺族年金がほぼ出ない)時のスタイル */
.verdict-danger {
    border-color: #ef4444;
    background: rgba(254, 226, 226, 0.4);
}
.verdict-danger h3 { color: #b91c1c; }

@media (max-width: 650px) {
    .grid-inputs:first-child .work-selector {
        flex-direction: column;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
