/* style.css - YouTuber・SNS「夢の収益」皮算用チェッカー */

.bg-youtube {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    /* 動画プラットフォームを連想させるレッド×ダークスモーク系のグラデーション */
    background: linear-gradient(135deg, #111827 0%, #3f0f15 50%, #7f1d1d 100%);
    background-size: 400% 400%;
    animation: studioLights 20s ease infinite;
    z-index: -1;
}

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

body {
    color: #f1f5f9;
    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: #f87171;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 100;
    border: 1px solid rgba(248, 113, 113, 0.3);
    transition: all 0.3s ease;
}
.back-link:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-2px);
}

.main-app-card.youtube-app-card {
    background: rgba(255, 255, 255, 0.95); /* カード自体は白基調で読みやすく */
    color: #334155;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 32px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 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, #dc2626, #f87171);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    line-height: 1.3;
}

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

.grid-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.input-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.income-card {
    border-top: 4px solid #10b981;
}

.expense-card {
    border-top: 4px solid #ef4444;
}

.input-card h3 {
    margin-bottom: 15px;
    font-size: 1.05rem;
    color: #1e293b;
    border-bottom: 1px dashed #cbd5e1;
    padding-bottom: 10px;
}

.input-group { margin-bottom: 15px; }
.input-group:last-child { margin-bottom: 0; }

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

.income-card .highlight-val { color: #059669; }
.expense-card .highlight-val { color: #dc2626; }

.highlight-val {
    font-size: 1.3rem;
    font-weight: 900;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.income-card input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #fff;
    border: 4px solid #10b981;
    border-radius: 50%;
    cursor: pointer;
}
.expense-card input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #fff;
    border: 4px solid #ef4444;
    border-radius: 50%;
    cursor: pointer;
}

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

/* 視覚的アリーナ（水槽） */
.visual-section {
    margin: 2rem 0;
    padding: 2rem 0;
    position: relative;
    border-top: 1px dashed #cbd5e1;
    border-bottom: 1px dashed #cbd5e1;
    display: flex;
    justify-content: center;
}

.water-tank {
    width: 80%;
    max-width: 400px;
    text-align: center;
}

.gross-label {
    font-weight: bold;
    color: #475569;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.gross-label span {
    color: #059669;
    font-size: 1.3rem;
    font-weight: 900;
}

.tank-container {
    width: 100%;
    height: 120px;
    background: #f1f5f9;
    border: 3px solid #cbd5e1;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 上から迫ってくる「経費という名の重圧（赤）」 */
.expense-drain {
    background: repeating-linear-gradient(45deg, #fecaca, #fecaca 10px, #f87171 10px, #f87171 20px);
    width: 100%;
    height: 30%;
    transition: height 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}

.drain-text {
    color: #7f1d1d;
    font-weight: 900;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.7);
    padding: 2px 8px;
    border-radius: 12px;
}

/* 下に残る「手取り（利益・緑）」 */
.net-water {
    background: linear-gradient(180deg, #34d399, #059669);
    width: 100%;
    height: 70%;
    transition: height 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.net-text {
    color: #fff;
    font-weight: 900;
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

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

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

.net-box {
    background: rgba(209, 250, 229, 0.3);
    border-color: #6ee7b7;
}

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

.stat-value {
    font-size: 1.8rem;
    color: #334155;
    font-weight: bold;
}

.stat-value.highlight {
    color: #059669;
    font-size: 2.2rem;
    font-weight: 900;
}

.final-verdict {
    background: #f8fafc;
    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-danger {
    border-color: #ef4444;
    background: rgba(254, 226, 226, 0.4);
}
.verdict-danger h3 { color: #dc2626; }

@media (max-width: 600px) {
    .grid-inputs {
        grid-template-columns: 1fr;
    }
}
