/* ============================================================
   共通シミュレーターCSS
   ページごとのカラーテーマは各HTMLの :root {} ブロックで定義:
     --primary-start    : body背景グラデーション開始色
     --primary-end      : body背景グラデーション終了色
     --accent-color     : input focus枠・result-item border・result-value色
     --accent-shadow    : input focus box-shadow (rgba)
     --btn-hover-shadow : ボタンhover box-shadow (rgba)
     --green-color      : support-card border・calculator-icon色
   ============================================================ */

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

body {
    font-family: 'Hiragino Kaku Gothic Pro', 'Yu Gothic', 'Meiryo', sans-serif;
    background: linear-gradient(135deg, var(--primary-start) 0%, var(--primary-end) 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header h1 {
    color: white;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
    line-height: 1.6;
}

.data-source {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.data-source h3 {
    color: white;
    font-size: 1.2em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.data-source ul {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95em;
    margin-left: 20px;
    line-height: 1.5;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.input-panel, .result-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.panel-title {
    font-size: 1.8em;
    color: #4a5568;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-shadow);
}

.calculate-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-start) 0%, var(--primary-end) 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--btn-hover-shadow);
}

.result-item {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    border-left: 5px solid var(--accent-color);
    transition: transform 0.3s ease;
}

.result-item:hover {
    transform: translateX(5px);
}

.result-title {
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.result-value {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--accent-color);
}

.result-comparison {
    font-size: 0.9em;
    color: #718096;
    margin-top: 5px;
}

.savings {
    color: #38a169;
}

.increase {
    color: #e53e3e;
}

.support-info {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.support-card {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid var(--green-color);
}

.support-card h4 {
    color: #2d3748;
    margin-bottom: 10px;
}

.support-card p {
    color: #4a5568;
    line-height: 1.5;
}

.highlight-box {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7e2 100%);
    border: 2px solid #fc8181;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.highlight-box h3 {
    color: #c53030;
    margin-bottom: 10px;
}

.highlight-box .amount {
    font-size: 2em;
    font-weight: bold;
    color: #e53e3e;
}

.data-note {
    background: rgba(255, 248, 220, 0.9);
    border: 1px solid #d69e2e;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.data-note .icon {
    color: #d69e2e;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 2em;
    }

    .support-grid {
        grid-template-columns: 1fr;
    }
}

.mountain-icon {
    color: #ffffff;
}

.calculator-icon {
    color: var(--green-color);
}

.info-icon {
    color: #d69e2e;
}

.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    background: #2d3748;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8em;
    white-space: nowrap;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
}

/* ===== 結果表示アニメーション ===== */
@keyframes resultFadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-anim {
    opacity: 0;
    animation: resultFadeSlideIn 0.45s ease-out forwards;
    transition: none;
}

.result-anim.anim-done {
    transition: transform 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
    .result-anim {
        animation: none;
        opacity: 1;
    }
}
