/* 基本レイアウト */
body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f9fafb;
}

.subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

/* 設定セクション */
.settings-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.setting-label {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 入力グループ */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.input-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.input-item label {
    font-size: 0.875rem;
    color: #4b5563;
}

.input-item input {
    padding: 0.5rem 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #374151;
    background: white;
    transition: all 0.2s;
}

.input-item input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.unit {
    font-size: 0.75rem;
    color: #6b7280;
    margin-left: 0.5rem;
}

/* ラジオボタングループ */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #4b5563;
}

.radio-label input[type="radio"] {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
    accent-color: #3b82f6;
}

.radio-label:hover {
    color: #374151;
}

/* チェックボックスグループ */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #4b5563;
}

.checkbox-label input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
    accent-color: #3b82f6;
}

.checkbox-label:hover {
    color: #374151;
}

/* 統計表示 */
.stats-display {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f3f4f6;
    border-radius: 6px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.stat-label {
    color: #6b7280;
}

.stat-value {
    font-weight: 600;
    color: #374151;
}

/* 計算セクション */
.calculation-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.calculation-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: stretch;
}

/* 入力パネル */
.input-panel {
    display: flex;
    flex-direction: column;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: linear-gradient(to right, #f9fafb, #f3f4f6);
    border-bottom: 1px solid #e5e7eb;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.panel-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #3b82f6;
}

.panel-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    font-size: 0.875rem;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #f9fafb;
    color: #374151;
    border-color: #d1d5db;
}

.btn-icon {
    width: 1rem;
    height: 1rem;
}

.copy-btn:hover {
    border-color: #86efac;
    color: #22c55e;
    background: #f0fdf4;
}

/* 入力コンテナ */
.input-container {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.large-input-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.large-input {
    width: 200px;
    padding: 1rem;
    border: 3px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
    background: white;
    transition: all 0.2s;
}

.large-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.large-unit {
    font-size: 1.25rem;
    font-weight: 600;
    color: #6b7280;
}

/* 入力例 */
.input-examples {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.example-title {
    font-size: 0.875rem;
    color: #6b7280;
    margin-right: 0.5rem;
}

.example-btn {
    padding: 0.375rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #f9fafb;
    color: #374151;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.example-btn:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* 計算コントロール */
.calculate-controls {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    min-width: 60px;
}

.calculate-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
}

.calculate-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.calculate-icon {
    width: 2rem;
    height: 2rem;
}

/* 結果パネル */
.result-panel {
    display: flex;
    flex-direction: column;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.result-container {
    flex: 1;
    padding: 2rem;
}

.result-grid {
    display: grid;
    gap: 1rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 4px solid #3b82f6;
}

.result-label {
    font-size: 0.875rem;
    color: #4b5563;
    font-weight: 500;
}

.result-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.bonus-results {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.bonus-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
}


/* 比較セクション */
.comparison-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* 手取り目安カードセクション */
.takehome-guide-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.takehome-disclaimer {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.takehome-disclaimer p {
    color: #92400e;
    font-size: 0.875rem;
    margin: 0;
    font-weight: 500;
}

.takehome-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.takehome-card {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.takehome-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.takehome-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.takehome-yearly {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.takehome-rate {
    background: #dbeafe;
    color: #1d4ed8;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.takehome-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

.takehome-label {
    font-size: 0.875rem;
    color: #64748b;
}

.takehome-value {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
}

.takehome-monthly {
    background: #10b981;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 0.75rem;
    text-align: center;
}

.takehome-monthly-label {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.takehome-monthly-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.table-container {
    margin-top: 1.5rem;
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.comparison-table th {
    background: #f9fafb;
    color: #374151;
    font-weight: 600;
    padding: 1rem;
    text-align: center;
    border-bottom: 2px solid #e5e7eb;
}

.comparison-table td {
    padding: 0.75rem 1rem;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.comparison-table tr:hover {
    background: #f9fafb;
}

/* アクションセクション */
.action-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .calculation-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .calculate-controls {
        flex-direction: row;
        padding: 1rem;
        background: #f9fafb;
        border-radius: 8px;
    }
    
    .calculate-btn {
        flex-direction: row;
    }
}

@media (max-width: 640px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .large-input {
        width: 160px;
        font-size: 1.25rem;
    }
    
    .input-examples {
        flex-wrap: wrap;
    }
    
    .panel-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .comparison-table {
        font-size: 0.75rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem;
    }
    
    .takehome-cards {
        grid-template-columns: 1fr;
    }
    
    .takehome-card {
        padding: 1rem;
    }
    
    .takehome-yearly {
        font-size: 1.25rem;
    }
    
    .takehome-monthly-value {
        font-size: 1.125rem;
    }
}